From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v3 0/6] Replace terraform update_ssh_config module
Date: Mon, 24 Feb 2025 14:12:09 -0500 [thread overview]
Message-ID: <20250224191215.637818-1-cel@kernel.org> (raw)
From: Chuck Lever <chuck.lever@oracle.com>
Luis suggested merging the way guestfs and terraform handle ssh
host config. This series is a step in that direction.
guestfs provisioning is currently implemented nearly entirely by
shell scripts. That makes it somewhat high risk to re-write both
terraform and guestfs to use shared infrastructure at the same time.
So instead of building infrastructure that guestfs and terraform can
share, I'm leaving guestfs out of the equation for the moment. All
this series does is make terraform ssh configuration behave more
like guestfs.
Subsequent work can replace the current set of guestfs scripts with
Ansible playbooks, and then more common ssh infrastructure can be
introduced that both provisioning methods can utilize.
Change since v2:
- Move terraform bringup/destroy into an Ansible playbook
- Move terraform's ssh configuration into that playbook
- Tested with AWS, Azure, and OCI
Changes since RFC:
- Split the RFC series into smaller patches for easier review
- The "Include" directive now follows CONFIG_KDEVOPS_SSH_CONFIG
- Various bug fixes and optimizations
Chuck Lever (6):
terraform: Replace scripts/*_terraform.sh with an Ansible playbook
ssh.Makefile: Define a kdevops_ssh_config variable
terraform: Clean up ssh configuration during "make destroy"
terraform: Add ssh hosts to ~/.ssh/config_kdevops_{{ sha1sum }}
terraform: "make mrproper" should remove terraform/*/.terraform
terraform: Remove the terrraform update_ssh_config module
Makefile | 1 +
kconfigs/Kconfig.ssh | 19 +++-
playbooks/roles/terraform/defaults/main.yml | 3 +
playbooks/roles/terraform/tasks/main.yml | 86 +++++++++++++++++++
.../roles/terraform/templates/ssh_config.j2 | 15 ++++
playbooks/terraform.yml | 5 ++
scripts/bringup_terraform.sh | 12 ---
scripts/destroy_terraform.sh | 10 ---
scripts/ssh.Makefile | 10 ++-
scripts/terraform.Makefile | 35 ++++++--
terraform/aws/output.tf | 30 ++-----
terraform/aws/update_ssh_config.tf | 1 -
terraform/aws/update_ssh_config_use.tf | 12 ---
terraform/azure/output.tf | 22 ++---
terraform/azure/update_ssh_config.tf | 1 -
terraform/azure/update_ssh_config_use.tf | 4 -
terraform/gce/output.tf | 31 ++-----
terraform/gce/update_ssh_config.tf | 1 -
terraform/gce/update_ssh_config_use.tf | 4 -
terraform/oci/output.tf | 9 ++
terraform/oci/update_ssh_config.tf | 1 -
terraform/oci/update_ssh_config_use.tf | 8 --
terraform/openstack/output.tf | 9 ++
terraform/openstack/update_ssh_config.tf | 1 -
terraform/openstack/update_ssh_config_use.tf | 4 -
terraform/update_ssh_config.tf | 17 ----
26 files changed, 198 insertions(+), 153 deletions(-)
create mode 100644 playbooks/roles/terraform/defaults/main.yml
create mode 100644 playbooks/roles/terraform/tasks/main.yml
create mode 100644 playbooks/roles/terraform/templates/ssh_config.j2
create mode 100644 playbooks/terraform.yml
delete mode 100755 scripts/bringup_terraform.sh
delete mode 100755 scripts/destroy_terraform.sh
delete mode 120000 terraform/aws/update_ssh_config.tf
delete mode 100644 terraform/aws/update_ssh_config_use.tf
delete mode 120000 terraform/azure/update_ssh_config.tf
delete mode 100644 terraform/azure/update_ssh_config_use.tf
delete mode 120000 terraform/gce/update_ssh_config.tf
delete mode 100644 terraform/gce/update_ssh_config_use.tf
create mode 100644 terraform/oci/output.tf
delete mode 120000 terraform/oci/update_ssh_config.tf
delete mode 100644 terraform/oci/update_ssh_config_use.tf
delete mode 120000 terraform/openstack/update_ssh_config.tf
delete mode 100644 terraform/openstack/update_ssh_config_use.tf
delete mode 100644 terraform/update_ssh_config.tf
--
2.48.1
next reply other threads:[~2025-02-24 19:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 19:12 cel [this message]
2025-02-24 19:12 ` [PATCH v3 1/6] terraform: Replace scripts/*_terraform.sh with an Ansible playbook cel
2025-02-24 19:12 ` [PATCH v3 2/6] ssh.Makefile: Define a kdevops_ssh_config variable cel
2025-02-24 19:12 ` [PATCH v3 3/6] terraform: Clean up ssh configuration during "make destroy" cel
2025-02-24 19:12 ` [PATCH v3 4/6] terraform: Add ssh hosts to ~/.ssh/config_kdevops_{{ sha1sum }} cel
2025-02-24 19:12 ` [PATCH v3 5/6] terraform: "make mrproper" should remove terraform/*/.terraform cel
2025-02-24 19:12 ` [PATCH v3 6/6] terraform: Remove the terrraform update_ssh_config module cel
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=20250224191215.637818-1-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--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