From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 5/8] bringup: match default distro to user's distro
Date: Thu, 7 Mar 2024 16:03:56 -0800 [thread overview]
Message-ID: <20240308000400.1646823-6-mcgrof@kernel.org> (raw)
In-Reply-To: <20240308000400.1646823-1-mcgrof@kernel.org>
We've had kconfigs/Kconfig.distro for a while which let's us pick
up on the distro the user of kdevops is using but haven't used it
extensively. Heavy users of kdevops want sensible defaults so you
have to do less configuration of kdevops, one of the things we could
do to make things smoother is match the target distro to use with the
user's distro. So do that and be consistent over vagrant / guestfs and
promote the same best practice when using terraform to use the cloud.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
kconfigs/Kconfig.guestfs | 4 +++-
terraform/aws/Kconfig | 1 +
terraform/azure/Kconfig | 2 +-
terraform/gce/Kconfig | 3 ++-
terraform/openstack/Kconfig | 2 +-
vagrant/Kconfig | 4 +++-
6 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index 58c0c69a..03e0fb86 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -2,7 +2,9 @@ if GUESTFS
choice
prompt "Guestfs Linux distribution to use"
- default GUESTFS_FEDORA
+ default GUESTFS_FEDORA if DISTRO_FEDORA || DISTRO_REDHAT
+ default GUESTFS_FEDORA if DISTRO_OPENSUSE || DISTRO_SUSE
+ default GUESTFS_DEBIAN if DISTRO_DEBIAN || DISTRO_UBUNTU
config GUESTFS_FEDORA
bool "Fedora (or derived distro)"
diff --git a/terraform/aws/Kconfig b/terraform/aws/Kconfig
index 9f4f9070..db8a5f76 100644
--- a/terraform/aws/Kconfig
+++ b/terraform/aws/Kconfig
@@ -96,6 +96,7 @@ config TERRAFORM_AWS_AV_REGION
choice
prompt "AWS AMI owner"
+ default TERRAFORM_AWS_AMI_DEBIAN if DISTRO_DEBIAN
default TERRAFORM_AWS_AMI_AMAZON_X86_64 if TARGET_ARCH_X86_64
default TERRAFORM_AWS_AMI_AMAZON_ARM64 if TARGET_ARCH_ARM64
diff --git a/terraform/azure/Kconfig b/terraform/azure/Kconfig
index 97513c7a..30acefd3 100644
--- a/terraform/azure/Kconfig
+++ b/terraform/azure/Kconfig
@@ -80,7 +80,7 @@ if TERRAFORM_AZURE_IMAGE_PUBLISHER_DEBIAN
choice
prompt "Azure image offer"
- default TERRAFORM_AZURE_IMAGE_OFFER_DEBIAN_10
+ default TERRAFORM_AZURE_IMAGE_OFFER_DEBIAN_10 if DISTRO_DEBIAN
config TERRAFORM_AZURE_IMAGE_OFFER_DEBIAN_10
bool "debian-10"
diff --git a/terraform/gce/Kconfig b/terraform/gce/Kconfig
index df17078d..6fedb2bc 100644
--- a/terraform/gce/Kconfig
+++ b/terraform/gce/Kconfig
@@ -57,7 +57,8 @@ config TERRAFORM_GCE_SCRATCH_DISK_INTERFACE
config TERRAFORM_GCE_IMAGE
string "GCE image to use"
- default "debian-cloud/debian-10"
+ default "debian-cloud/debian-10" if DISTRO_DEBIAN
+ default "debian-cloud/debian-10" if !DISTRO_DEBIAN
help
This option will set GCE image to debian-cloud/debian-10.
diff --git a/terraform/openstack/Kconfig b/terraform/openstack/Kconfig
index 9b1f324d..61167ad1 100644
--- a/terraform/openstack/Kconfig
+++ b/terraform/openstack/Kconfig
@@ -47,7 +47,7 @@ endchoice
config TERRAFORM_OPENSTACK_IMAGE_NAME
string "OpenStack image name"
- default "Debian 10 ppc64le" if TERRAFORM_OPENSTACK_IMAGE_DEBIAN_10_PPC64LE
+ default "Debian 10 ppc64le" if TERRAFORM_OPENSTACK_IMAGE_DEBIAN_10_PPC64LE && DISTRO_DEBIAN
help
This option will set OpenStack image name to use.
diff --git a/vagrant/Kconfig b/vagrant/Kconfig
index fc322438..b5abba76 100644
--- a/vagrant/Kconfig
+++ b/vagrant/Kconfig
@@ -97,7 +97,9 @@ config HAVE_SUSE_VAGRANT
choice
prompt "Vagrant guest Linux distribution to use"
- default VAGRANT_DEBIAN if !HAVE_SUSE_VAGRANT
+ default VAGRANT_DEBIAN if DISTRO_DEBIAN || DISTRO_UBUNTU
+ default VAGRANT_FEDORA if DISTRO_FEDORA
+ default VAGRANT_OPENSUSE if DISTRO_OPENSUSE
default VAGRANT_SUSE if HAVE_SUSE_VAGRANT
config VAGRANT_DEBIAN
--
2.43.0
next prev parent reply other threads:[~2024-03-08 0:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 0:03 [PATCH 0/8] guestfs: fixes and enhancements Luis Chamberlain
2024-03-08 0:03 ` [PATCH 1/8] guestfs: use macros for drives for aarch64 Luis Chamberlain
2024-03-08 0:03 ` [PATCH 2/8] bringup: disable ZNS and CXL for guestfs Luis Chamberlain
2024-03-08 0:03 ` [PATCH 3/8] libvirt: move zns, largio and cxl to its own files Luis Chamberlain
2024-03-08 0:03 ` [PATCH 4/8] guestfs: move options to its own file Luis Chamberlain
2024-03-08 0:03 ` Luis Chamberlain [this message]
2024-03-08 0:03 ` [PATCH 6/8] guestfs: remove explicit tap0 device name Luis Chamberlain
2024-03-08 0:03 ` [PATCH 7/8] destroy_guestfs.sh: remove known ssh key Luis Chamberlain
2024-03-08 0:03 ` [PATCH 8/8] guestfs: verify new line on ssh include directive Luis Chamberlain
2024-03-08 9:55 ` [PATCH 0/8] guestfs: fixes and enhancements Luis Chamberlain
2024-03-08 14:14 ` Chuck Lever III
2024-03-08 14:26 ` Chuck Lever III
2024-03-08 15:44 ` Luis Chamberlain
2024-03-08 15:46 ` Chuck Lever III
2024-03-08 15:56 ` Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240308000400.1646823-6-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox