From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C77B1223DCE for ; Wed, 3 Sep 2025 09:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756890183; cv=none; b=XMx9Jn/zmajOp65fGUFpRhK83mtWf78OSDXSva+KlBPnYCplwnFa1Lyc9FfJHNRLVtprqV6RPR4HrqJJsT9BZNiNN/1riey7FYCBS9IezYTIWx3kZaAo1MKHGzAziV/m7P3v7BIZ6gLj6ZIeqhGoxmreDkibs5FLuzE17m8er20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756890183; c=relaxed/simple; bh=fOCAxew8WX8j1GovwIO1Jadhh9auiD1dLwkXYzoGdw8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JLPPKYJd/aKK8vGeQVX0a314Kg17DXtlW0JjoiwyubsR4Ob/U5c6uw43MFJy4v7eT8tK/OE+G9Si3EbspW+l7FNh4Lbu58ova6GfpZcf0fq/0oWEammgKRCWmNHgenVD04G+j1nccN6k9TcQwjy/e5EE+tWP2KGcp1mRE9ewwmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=miFiaO5r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="miFiaO5r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3F1EC4CEF0; Wed, 3 Sep 2025 09:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756890183; bh=fOCAxew8WX8j1GovwIO1Jadhh9auiD1dLwkXYzoGdw8=; h=Date:Reply-To:Subject:To:Cc:References:From:In-Reply-To:From; b=miFiaO5rReT72YrbuPvqrxnfbHo4iyZvAMSGNDGULKe2Mfl//b1iPv9dQhEUKdN4/ K0eOuFDaJ5B4968jYkxCy61SYBScZxO786LwhjZHVq5qOCu1XUWBNjKkMOzpR2LD2u LzglyQUSkmSyGMlk/+JMiIM7FsVsVBDa9RoKwgtmugs7kzwIe6Y/B7TZA/5Jsjjq0S g1Hmnb+/oJh90WCyD/iosuN6k7fwTiZjlASs25awWg8YskcqzN/ekKU9f1leiiaE20 jG2JiGOvl2hlJz+r6Fd2ud0IZbjdssl76gb9vd/TnyRJ9r2MoMGGKunj50z7X97MNk JseNGhZzIv3mQ== Message-ID: Date: Wed, 3 Sep 2025 11:02:59 +0200 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: Daniel Gomez Subject: Re: [PATCH v3 2/3] declared_hosts: add support for pre-existing infrastructure To: Luis Chamberlain , Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: hui81.qi@samsung.com, kundan.kumar@samsung.com References: <20250902235356.639271-1-mcgrof@kernel.org> <20250902235356.639271-3-mcgrof@kernel.org> Content-Language: en-US From: Daniel Gomez Organization: kernel.org In-Reply-To: <20250902235356.639271-3-mcgrof@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 03/09/2025 01.53, Luis Chamberlain wrote: > This adds support for using pre-existing infrastructure (bare metal servers, > pre-provisioned VMs, cloud instances) that users already have SSH access to, > bypassing the kdevops bringup process. > > We borrow the DECLARE_* foo practice from the Linux kernel to ensure the > user will declare the hosts they already have set up with: > > make DECLARE_HOSTS="foo bar" defconfig-foo > or > make DECLARE_HOSTS="foo bar" menuconfig > > We just skip the data partition setup, at the role level. The user > is encouraged to set DATA_PATH if they want something other than /data/ > to be expected to be used. The onus is on them to ensure that the > DATA_PATH works for the user the the host is configured to ssh access > to already. > > Currently no workflows are fully supported with declared hosts. > Each workflow requires individual review and testing to ensure proper > operation with pre-existing infrastructure before being enabled. > > Generated-by: Claude AI > Signed-off-by: Luis Chamberlain > --- ... > diff --git a/kconfigs/Kconfig.declared_hosts b/kconfigs/Kconfig.declared_hosts > new file mode 100644 > index 00000000..cfdae8fa > --- /dev/null > +++ b/kconfigs/Kconfig.declared_hosts > @@ -0,0 +1,71 @@ > +# Configuration for declared hosts that skip bringup process > + > +config KDEVOPS_USE_DECLARED_HOSTS > + bool "Use declared hosts (skip bringup process)" > + select WORKFLOW_INFER_USER_AND_GROUP > + output yaml > + help > + Enable this option to use pre-existing hosts that you have already > + configured with SSH access. This is useful for: > + > + * Bare metal systems > + * Pre-provisioned VMs or cloud instances > + * Systems managed by other infrastructure tools > + > + When this option is enabled: > + - SSH keys will not be generated (assumes you already have access) > + - Bringup and teardown operations will be skipped > + - User and group settings will be inferred from the target hosts > + - You must provide the list of hosts in KDEVOPS_DECLARED_HOSTS > + > + This option automatically: > + - Selects WORKFLOW_INFER_USER_AND_GROUP to detect the correct > + user and group on the target systems > + - Assumes SSH access is already configured > + > +if KDEVOPS_USE_DECLARED_HOSTS > + > +config KDEVOPS_DECLARED_HOSTS > + string "List of declared hosts" > + output yaml > + default "$(shell, echo ${DECLARED_HOSTS})" > + default "" > + help > + Provide a list of hostnames or IP addresses for the pre-existing > + systems you want to use. These hosts must already be accessible > + via SSH with the appropriate keys configured. > + > + Format: Space or comma-separated list > + Example: "host1 host2 host3" or "host1,host2,host3" > + > + These hosts will be used directly without any bringup process. > + Make sure you have: > + - SSH access configured > + - Required packages installed > + - Appropriate user permissions > + > +config KDEVOPS_DECLARED_HOSTS_PYTHON_INTERPRETER > + string "Python interpreter path on declared hosts" > + default "/usr/bin/python3" > + output yaml > + help > + Specify the path to the Python interpreter on the declared hosts. > + This is required for Ansible to function properly. > + > + Common values: > + - /usr/bin/python3 (most modern systems) > + - /usr/bin/python (older systems) > + - /usr/local/bin/python3 (custom installations) Isn't this redundant? In the hosts template files, this patch does this: ansible_python_interpreter = "{{ kdevops_declared_hosts_python_interpreter | default(kdevops_python_interpreter) }}" I think, using the kdevops_python_interperter config/yaml directly should be sufficient. Or what I am missing?