public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Replace terraform update_ssh_config module
@ 2025-02-24 19:12 cel
  2025-02-24 19:12 ` [PATCH v3 1/6] terraform: Replace scripts/*_terraform.sh with an Ansible playbook cel
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cel @ 2025-02-24 19:12 UTC (permalink / raw)
  To: kdevops; +Cc: Chuck Lever

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-24 19:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 19:12 [PATCH v3 0/6] Replace terraform update_ssh_config module cel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox