From 2990d96ab712eb89c2b878d9b06df7c4fe55bad6 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:25:27 -0400 Subject: [PATCH 1/7] docs: Remove OpenStack documentation Remove all OpenStack-related documentation from kdevops-terraform.md including the general OpenStack section and the minicloud-specific configuration instructions. Generated-by: Claude AI Signed-off-by: Chuck Lever --- docs/kdevops-terraform.md | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/docs/kdevops-terraform.md b/docs/kdevops-terraform.md index 3291444d2..8f511ef5e 100644 --- a/docs/kdevops-terraform.md +++ b/docs/kdevops-terraform.md @@ -11,7 +11,6 @@ Below are the list of clouds providers currently supported: * aws - Amazon Web Service * gce - Google Cloud Compute * oci - Oracle Cloud Infrastructure - * openstack (special minicloud support added) You configure which cloud provider you want to use, what feature from that cloud provider you want to use, and then you can use kdevops to select which @@ -173,40 +172,6 @@ application id. Set these values via "make menuconfig" in the Terraform Providers submenu. -### Openstack - -Openstack is supported. This solution relies on the clouds.yaml file for -openstack configuration. This simplifies setting up authentication -considerably. - -#### Minicloud Openstack support - -minicloud has a custom setup where the you have to SSH with a special port -depending on the IP address you get, if you enable minicloud we do this -computation for you and tell you where to SSH to, but we also have support -to update your ~/ssh/config for you. - -Please note that minicloud takes a while to update its ports / mac address -tables, and so you may not be able to log in until after about 5 minutes after -you are able to create the nodes. Have patience. - -Your terraform.tfvars may look something like: - -``` -instance_prefix = "my-random-project" - -image_name = "Debian 10 ppc64le" -flavor_name = "minicloud.tiny" - -ssh_config_pubkey_file = "~/.ssh/minicloud.pub" -ssh_config = "~/.ssh/config" -ssh_config_user = "debian" -ssh_config_update = "true" -ssh_config_use_strict_settings = "true" -ssh_config_backup = "true" - -``` - ### AWS - Amazon Web Services AWS is supported. For authentication, kdevops relies on a shared From 69ab09aee043ee37168c57d55e487cfb4fdbf4d6 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:31:38 -0400 Subject: [PATCH 2/7] CLAUDE.md: Remove OpenStack from infrastructure list Remove OpenStack from the cloud provider support list in the project instructions document. Generated-by: Claude AI Signed-off-by: Chuck Lever --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 188e6dc96..aabf543ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -220,7 +220,7 @@ make mmtests-compare # Generate comparison reports ### Infrastructure Support - **Virtualization**: libguestfs with libvirt (recommended), legacy Vagrant -- **Cloud**: AWS, Azure, GCE, OCI, OpenStack support via Terraform +- **Cloud**: AWS, Azure, GCE, OCI support via Terraform - **PCIe Passthrough**: Real hardware testing in VMs with dynamic device assignment - **Mirror Support**: For air-gapped environments From ed860e8b5ecc76adfa8f3fc2435312dd92c355ab Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:29:58 -0400 Subject: [PATCH 3/7] kconfigs: Remove remaining OpenStack references Remove OpenStack references from various Kconfig files including: - Remove OpenStack example from guestfs cloud-init documentation - Remove OpenStack nova reference from libvirt aio mode documentation - Remove OpenStack from bringup terraform cloud provider list - Remove TERRAFORM_OPENSTACK dependency from TERRAFORM_PRIVATE_NET Generated-by: Claude AI Signed-off-by: Chuck Lever --- kconfigs/Kconfig.bringup | 1 - kconfigs/Kconfig.guestfs | 2 +- kconfigs/Kconfig.libvirt | 4 ---- terraform/Kconfig | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/kconfigs/Kconfig.bringup b/kconfigs/Kconfig.bringup index 0b1c8805d..39bd93b86 100644 --- a/kconfigs/Kconfig.bringup +++ b/kconfigs/Kconfig.bringup @@ -45,7 +45,6 @@ config TERRAFORM * Azure * AWS - * OpenStack * GCE Enabling this option will enable installing terraform dependencies diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs index 3bc4b0603..75996c5eb 100644 --- a/kconfigs/Kconfig.guestfs +++ b/kconfigs/Kconfig.guestfs @@ -147,7 +147,7 @@ choice config GUESTFS_DEBIAN_TRIXIE_GENERIC_AMD64 bool "debian-13-generic-amd64-daily" help - Should run in any environment using cloud-init, for e.g. OpenStack, + Should run in any environment using cloud-init, for e.g. DigitalOcean and also on bare metal. This is the image you should try to use and stick to for kernel testing. diff --git a/kconfigs/Kconfig.libvirt b/kconfigs/Kconfig.libvirt index 4f2963091..cadec787b 100644 --- a/kconfigs/Kconfig.libvirt +++ b/kconfigs/Kconfig.libvirt @@ -936,13 +936,9 @@ config LIBVIRT_AIO_MODE_NATIVE aio=native on sparsefiles. The claim seems to be that a host filesystems metadata write can block the AIO io_submit() call and therefore block QEMU threads which expect AIO behaviour on the guest. - This is documented when on Openstack nova an aio mode option was - requested to be available for different backends: If you want to use PCIe passthrough you cannot use aio=native. - https://review.opendev.org/c/openstack/nova-specs/+/232514/7/specs/mitaka/approved/libvirt-aio-mode.rst - config LIBVIRT_AIO_MODE_THREADS bool "aio=threads" help diff --git a/terraform/Kconfig b/terraform/Kconfig index c0b2bfb03..62d138b62 100644 --- a/terraform/Kconfig +++ b/terraform/Kconfig @@ -10,7 +10,7 @@ endmenu config TERRAFORM_PRIVATE_NET bool "Add a private network for the guests" - depends on TERRAFORM_OPENSTACK || TERRAFORM_AZURE + depends on TERRAFORM_AZURE default y help This option adds a private network between the various guests From b9ea010f8e6b5a9621094e5be4c09c6b875c5ad6 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:27:38 -0400 Subject: [PATCH 4/7] scripts: Remove OpenStack from terraform.Makefile Remove OpenStack cloud provider configuration and variable handling from the terraform Makefile. This includes the KDEVOPS_CLOUD_PROVIDER export for OpenStack and all OpenStack-specific terraform variables. Generated-by: Claude AI Signed-off-by: Chuck Lever --- scripts/terraform.Makefile | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scripts/terraform.Makefile b/scripts/terraform.Makefile index 1c9850356..e18e12b6c 100644 --- a/scripts/terraform.Makefile +++ b/scripts/terraform.Makefile @@ -18,9 +18,6 @@ endif ifeq (y,$(CONFIG_TERRAFORM_OCI)) export KDEVOPS_CLOUD_PROVIDER=oci endif -ifeq (y,$(CONFIG_TERRAFORM_OPENSTACK)) -export KDEVOPS_CLOUD_PROVIDER=openstack -endif ifeq (y,$(CONFIG_TERRAFORM_LAMBDALABS)) export KDEVOPS_CLOUD_PROVIDER=lambdalabs endif @@ -53,16 +50,6 @@ KDEVOPS_MRPROPER += $(KDEVOPS_NODES) DEFAULT_DEPS_REQS_EXTRA_VARS += $(KDEVOPS_TFVARS) -ifeq (y,$(CONFIG_TERRAFORM_OPENSTACK)) -TERRAFORM_EXTRA_VARS += terraform_openstack_cloud_name=$(subst ",,$(CONFIG_TERRAFORM_TERRAFORM_OPENSTACK_CLOUD_NAME)) -TERRAFORM_EXTRA_VARS += terraform_openstack_instance_prefix=$(subst ",,$(CONFIG_TERRAFORM_TERRAFORM_OPENSTACK_INSTANCE_PREFIX)) -TERRAFORM_EXTRA_VARS += terraform_openstack_flavor=$(subst ",,$(CONFIG_TERRAFORM_OPENSTACK_FLAVOR)) -TERRAFORM_EXTRA_VARS += terraform_openstack_ssh_pubkey_name=$(subst ",,$(CONFIG_TERRAFORM_OPENSTACK_SSH_PUBKEY_NAME)) -TERRAFORM_EXTRA_VARS += terraform_openstack_public_network_name=$(subst ",,$(CONFIG_TERRAFORM_OPENSTACK_PUBLIC_NETWORK_NAME)) - -ANSIBLE_EXTRA_ARGS_SEPARATED += terraform_openstack_image_name=$(subst $(space),+,$(CONFIG_TERRAFORM_OPENSTACK_IMAGE_NAME)) -endif - ifeq (y,$(CONFIG_TERRAFORM_PRIVATE_NET)) TERRAFORM_EXTRA_VARS += terraform_private_net_enabled='true' TERRAFORM_EXTRA_VARS += terraform_private_net_prefix=$(subst ",,$(CONFIG_TERRAFORM_PRIVATE_NET_PREFIX)) From 61f5c3786ceaee32c514220cd20db4d95f2c2ed0 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:24:28 -0400 Subject: [PATCH 5/7] playbooks: Remove OpenStack ansible support Remove OpenStack-related ansible configurations including the volume_group tasks, gen_tfvars template, and default variables for OpenStack terraform settings. Generated-by: Claude AI Signed-off-by: Chuck Lever --- playbooks/roles/gen_tfvars/defaults/main.yml | 6 ------ .../templates/openstack/terraform.tfvars.j2 | 18 ------------------ .../volume_group/tasks/terraform/openstack.yml | 4 ---- 3 files changed, 28 deletions(-) delete mode 100644 playbooks/roles/gen_tfvars/templates/openstack/terraform.tfvars.j2 delete mode 100644 playbooks/roles/volume_group/tasks/terraform/openstack.yml diff --git a/playbooks/roles/gen_tfvars/defaults/main.yml b/playbooks/roles/gen_tfvars/defaults/main.yml index c9e531bce..a435fb351 100644 --- a/playbooks/roles/gen_tfvars/defaults/main.yml +++ b/playbooks/roles/gen_tfvars/defaults/main.yml @@ -31,12 +31,6 @@ terraform_aws_ebs_volume_type: "gp3" terraform_oci_assign_public_ip: false terraform_oci_use_existing_vcn: false -terraform_openstack_cloud_name: "invalid" -terraform_openstack_instance_prefix: "invalid" -terraform_openstack_flavor: "invalid" -terraform_openstack_image_name: "invalid" -terraform_openstack_ssh_pubkey_name: "invalid" - # Lambda Labs defaults terraform_lambdalabs_region: "us-west-1" terraform_lambdalabs_instance_type: "gpu_1x_a10" diff --git a/playbooks/roles/gen_tfvars/templates/openstack/terraform.tfvars.j2 b/playbooks/roles/gen_tfvars/templates/openstack/terraform.tfvars.j2 deleted file mode 100644 index a50468072..000000000 --- a/playbooks/roles/gen_tfvars/templates/openstack/terraform.tfvars.j2 +++ /dev/null @@ -1,18 +0,0 @@ -openstack_cloud = "{{ terraform_openstack_cloud_name }}" -instance_prefix = "{{ terraform_openstack_instance_prefix }}" -flavor_name = "{{ terraform_openstack_flavor }}" -image_name = "{{ terraform_openstack_image_name }}" -ssh_pubkey_name = "{{ terraform_openstack_ssh_pubkey_name }}" - -ssh_config_pubkey_file = "{{ kdevops_terraform_ssh_config_pubkey_file }}" -ssh_config_user = "{{ kdevops_terraform_ssh_config_user }}" -ssh_config = "{{ sshconfig }}" -ssh_config_port = {{ ansible_cfg_ssh_port }} - -ssh_config_update = "{{ kdevops_terraform_ssh_config_update | lower }}" -ssh_config_use_strict_settings = "{{ kdevops_terraform_ssh_config_update_strict | lower }}" -ssh_config_backup = "{{ kdevops_terraform_ssh_config_update_backup | lower }}" - -private_net_enabled = "{{ terraform_private_net_enabled | lower }}" -private_net_prefix = "{{ terraform_private_net_prefix }}" -private_net_mask = "{{ terraform_private_net_mask }}" diff --git a/playbooks/roles/volume_group/tasks/terraform/openstack.yml b/playbooks/roles/volume_group/tasks/terraform/openstack.yml deleted file mode 100644 index f5b6fbdf5..000000000 --- a/playbooks/roles/volume_group/tasks/terraform/openstack.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: OpenStack - ansible.builtin.fail: - msg: Support for OpenStack has not yet been implemented From d2e21c55e1e7bbaaebff80c02600f5e2bcd2e2fa Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:23:43 -0400 Subject: [PATCH 6/7] terraform: Remove OpenStack from Kconfig.providers Remove the TERRAFORM_OPENSTACK configuration option from the cloud provider choice menu and remove the source line for the OpenStack Kconfig file. Generated-by: Claude AI Signed-off-by: Chuck Lever --- terraform/Kconfig.providers | 7 ------- 1 file changed, 7 deletions(-) diff --git a/terraform/Kconfig.providers b/terraform/Kconfig.providers index 652c89309..7813c52fa 100644 --- a/terraform/Kconfig.providers +++ b/terraform/Kconfig.providers @@ -31,12 +31,6 @@ config TERRAFORM_OCI Enabling this means you are going to use OCI for your cloud solution. -config TERRAFORM_OPENSTACK - bool "OpenStack" - help - Enabling this means you are going to use OpenStack for your cloud - solution. - config TERRAFORM_LAMBDALABS bool "Lambda Labs" depends on TARGET_ARCH_X86_64 @@ -62,6 +56,5 @@ source "terraform/gce/Kconfig" source "terraform/aws/Kconfig" source "terraform/azure/Kconfig" source "terraform/oci/Kconfig" -source "terraform/openstack/Kconfig" source "terraform/lambdalabs/Kconfig" source "terraform/rcloud/Kconfig" From 5ff22d6300d501ce42e87211fb2b3075c4eaa539 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 31 Oct 2025 20:22:19 -0400 Subject: [PATCH 7/7] terraform: Remove OpenStack provider directory Remove the entire terraform/openstack directory and all its files including Kconfig, terraform configurations, and cloud provider setup. This removes support for deploying kdevops on OpenStack clouds. Generated-by: Claude AI Signed-off-by: Chuck Lever --- terraform/openstack/Kconfig | 66 ----------- terraform/openstack/ansible_provision_cmd.tpl | 1 - terraform/openstack/clouds-public.yaml | 19 ---- terraform/openstack/main.tf | 107 ------------------ terraform/openstack/output.tf | 28 ----- terraform/openstack/output_minicloud.tf | 51 --------- terraform/openstack/provider.tf | 23 ---- terraform/openstack/shared.tf | 1 - .../openstack/update_ssh_config_minicloud.tf | 25 ---- terraform/openstack/vars.tf | 46 -------- 10 files changed, 367 deletions(-) delete mode 100644 terraform/openstack/Kconfig delete mode 120000 terraform/openstack/ansible_provision_cmd.tpl delete mode 100644 terraform/openstack/clouds-public.yaml delete mode 100644 terraform/openstack/main.tf delete mode 100644 terraform/openstack/output.tf delete mode 100644 terraform/openstack/output_minicloud.tf delete mode 100644 terraform/openstack/provider.tf delete mode 120000 terraform/openstack/shared.tf delete mode 100644 terraform/openstack/update_ssh_config_minicloud.tf delete mode 100644 terraform/openstack/vars.tf diff --git a/terraform/openstack/Kconfig b/terraform/openstack/Kconfig deleted file mode 100644 index 61167ad15..000000000 --- a/terraform/openstack/Kconfig +++ /dev/null @@ -1,66 +0,0 @@ -if TERRAFORM_OPENSTACK - -config TERRAFORM_TERRAFORM_OPENSTACK_CLOUD_NAME - string "OpenStack cloud name on your clouds.yaml" - default "minicloud" - help - This option sets the name of the cloud you will use which has - configuration settings described on the file clouds.yaml. - -config TERRAFORM_TERRAFORM_OPENSTACK_INSTANCE_PREFIX - string "Openstack instance prefix name for resources" - default "example" - help - This option will set a prefix name for openstack_compute_secgroup_v2. - This will likely be removed or replaced in the future. This is only - useful to distinguish one resource name right now. - -choice - prompt "Choose flavor name (machine type)" - default TERRAFORM_OPENSTACK_MINICLOUD_TINY - -config TERRAFORM_OPENSTACK_MINICLOUD_TINY - bool "minicloud.tiny" - depends on TARGET_ARCH_PPC64LE - help - This option will set the Openstack flavor to minicloud.tiny. - -endchoice - -config TERRAFORM_OPENSTACK_FLAVOR - string "OpenStack flavor" - default "minicloud.tiny" if TERRAFORM_OPENSTACK_MINICLOUD_TINY - help - This option will set the OpenStack flavor name. - -choice - prompt "Choose OpenStack image name" - default TERRAFORM_OPENSTACK_IMAGE_DEBIAN_10_PPC64LE - -config TERRAFORM_OPENSTACK_IMAGE_DEBIAN_10_PPC64LE - bool "Debian 10 ppc64le" - depends on TARGET_ARCH_PPC64LE - help - This option sets the image name to Debian 10 ppc64le. - -endchoice - -config TERRAFORM_OPENSTACK_IMAGE_NAME - string "OpenStack image name" - default "Debian 10 ppc64le" if TERRAFORM_OPENSTACK_IMAGE_DEBIAN_10_PPC64LE && DISTRO_DEBIAN - help - This option will set OpenStack image name to use. - -config TERRAFORM_OPENSTACK_SSH_PUBKEY_NAME - string "Name of already existing pubkey uploaded" - default "kdevops-pubkey" - help - Name of already existing pubkey or the new one you are about to - upload, this must be set - -config TERRAFORM_OPENSTACK_PUBLIC_NETWORK_NAME - string "Name of the public network" - default "public" - help - Name of an already existing public network in the cluster. -endif # TERRAFORM_OPENSTACK diff --git a/terraform/openstack/ansible_provision_cmd.tpl b/terraform/openstack/ansible_provision_cmd.tpl deleted file mode 120000 index 5c9265765..000000000 --- a/terraform/openstack/ansible_provision_cmd.tpl +++ /dev/null @@ -1 +0,0 @@ -../ansible_provision_cmd.tpl \ No newline at end of file diff --git a/terraform/openstack/clouds-public.yaml b/terraform/openstack/clouds-public.yaml deleted file mode 100644 index 1786a618a..000000000 --- a/terraform/openstack/clouds-public.yaml +++ /dev/null @@ -1,19 +0,0 @@ -clouds: - minicloud: - auth: - auth_url: http://minicloud.parqtec.unicamp.br:5000/v3/ - project_name: maria.quijote - user_domain_name: Default - project_domain_name: Default - username: maria.quijote - password: verysecret - # Set to True in your clouds.yaml to disable SSL certification verification - # if you really need it. - # verify: False - region_name: RegionOne - regions: - - name: RegionOne - values: - networks: - - name: public - routes_externally: true diff --git a/terraform/openstack/main.tf b/terraform/openstack/main.tf deleted file mode 100644 index c9037ca73..000000000 --- a/terraform/openstack/main.tf +++ /dev/null @@ -1,107 +0,0 @@ -# Openstack terraform provider main - -resource "openstack_networking_network_v2" "kdevops_private_net" { - count = var.private_net_enabled ? 1 : 0 - name = "kdevops_private_net" - admin_state_up = "true" -} - -resource "openstack_networking_subnet_v2" "kdevops_private_subnet" { - count = var.private_net_enabled ? 1 : 0 - name = "kdevops_private_subnet" - network_id = "${openstack_networking_network_v2.kdevops_private_net[0].id}" - cidr = format("%s/%d", var.private_net_prefix, var.private_net_mask) -} - -resource "openstack_compute_secgroup_v2" "kdevops_security_group" { - name = format("%s-%s", var.instance_prefix, "kdevops_security_group") - description = "security group for kdevops" - - # SSH - rule { - from_port = var.ssh_config_port - to_port = var.ssh_config_port - ip_protocol = "tcp" - cidr = "0.0.0.0/0" - } - - # All TCP high ports - rule { - from_port = 1024 - to_port = 65535 - ip_protocol = "tcp" - cidr = "0.0.0.0/0" - } -} - -# You can upload your ssh key to the OpenStack interface and just set -# ssh_config_pubkey_file = "" on your terraform.tfvars, this will just use the -# already existing and uploaded key. Even if you already uplaoded the key, -# if you set the ssh_config_pubkey_file variable to the same key, this will just -# upload the same pubkey key again and just use the name in ssh_pubkey_name. -# -# If you haven't yet uploaded your key through the web interface, you can -# set ssh_config_pubkey_file to your pubkey file path, and it will be uplaoded -# and the key name associated with it. Once you 'terraform destroy' only -# the public key resource will be destroyed. -# -# If you want to create a new random key this allows you to do that as well, -# just set ssh_pubkey_data = "" and ssh_config_pubkey_file = "" in your -# terraform.tfvars and a new key pair will be created for you on the fly. -# However note that once this resource is destroyed the private key will -# also be destroyed if you asked terraform to create a new key for you. -resource "openstack_compute_keypair_v2" "kdevops_keypair" { - name = var.ssh_pubkey_name - public_key = var.ssh_pubkey_data != "" ? var.ssh_pubkey_data : var.ssh_config_pubkey_file != "" ? file(var.ssh_config_pubkey_file) : "" -} - -resource "openstack_compute_instance_v2" "kdevops_instances" { - count = local.kdevops_num_boxes - name = element(var.kdevops_nodes, count.index) - image_name = var.image_name - flavor_name = var.flavor_name - key_pair = var.ssh_pubkey_name - security_groups = [openstack_compute_secgroup_v2.kdevops_security_group.name] - user_data = templatefile("${path.module}/../scripts/cloud-init.sh", { - user_data_log_dir = "/var/log/kdevops" - user_data_enabled = "yes" - ssh_config_user = var.ssh_config_user - ssh_config_port = var.ssh_config_port - new_hostname = element(var.kdevops_nodes, count.index) - }) - network { - name = var.public_network_name - } -} - -resource "openstack_compute_interface_attach_v2" "kdevops_net_attach" { - count = var.private_net_enabled ? local.kdevops_num_boxes : 0 - instance_id = "${openstack_compute_instance_v2.kdevops_instances[count.index].id}" - network_id = "${openstack_networking_network_v2.kdevops_private_net[0].id}" - # needed to work around race in openstack provider - depends_on = [openstack_networking_subnet_v2.kdevops_private_subnet] -} - -resource "openstack_blockstorage_volume_v3" "kdevops_data_disk" { - count = local.kdevops_num_boxes - name = format("kdevops-data-disk-%02d", count.index + 1) - size = 80 -} - -resource "openstack_blockstorage_volume_v3" "kdevops_scratch_disk" { - count = local.kdevops_num_boxes - name = format("kdevops-scratch-disk-%02d", count.index + 1) - size = 80 -} - -resource "openstack_compute_volume_attach_v2" "kdevops_data_disk_attach" { - count = local.kdevops_num_boxes - volume_id = openstack_blockstorage_volume_v3.kdevops_data_disk[count.index].id - instance_id = element(openstack_compute_instance_v2.kdevops_instances.*.id, count.index) -} - -resource "openstack_compute_volume_attach_v2" "kdevops_scratch_disk_attach" { - count = local.kdevops_num_boxes - volume_id = openstack_blockstorage_volume_v3.kdevops_scratch_disk[count.index].id - instance_id = element(openstack_compute_instance_v2.kdevops_instances.*.id, count.index) -} diff --git a/terraform/openstack/output.tf b/terraform/openstack/output.tf deleted file mode 100644 index 1667521a4..000000000 --- a/terraform/openstack/output.tf +++ /dev/null @@ -1,28 +0,0 @@ -# All generic output goes here - -data "null_data_source" "group_hostnames_and_ips" { - count = local.kdevops_num_boxes - inputs = { - value = format( - "%30s : %s", - element(var.kdevops_nodes, count.index), - element( - openstack_compute_instance_v2.kdevops_instances.*.access_ip_v4, - count.index, - ), - ) - } -} - -output "kdevops_hosts_and_ipv4" { - value = data.null_data_source.group_hostnames_and_ips.*.outputs -} - -# Each provider's output.tf needs to define a controller_ip_map. This -# map is used to build the Ansible controller's ssh configuration. -# Each map entry contains the node's hostname and public/private IP -# address. -output "controller_ip_map" { - description = "The IP addresses assigned to each instance" - value = zipmap(var.kdevops_nodes[*], openstack_compute_instance_v2.kdevops_instances[*].access_ip_v4) -} diff --git a/terraform/openstack/output_minicloud.tf b/terraform/openstack/output_minicloud.tf deleted file mode 100644 index cf2b5f900..000000000 --- a/terraform/openstack/output_minicloud.tf +++ /dev/null @@ -1,51 +0,0 @@ -# minicloud specific output - -locals { - ssh_key_i = format( - " %s%s ", - var.ssh_config_pubkey_file != "" ? "-i " : "", - var.ssh_config_pubkey_file != "" ? replace(var.ssh_config_pubkey_file, ".pub", "") : "", - ) -} - -# If using minicloud the public IPs are actually mapped to ports. This does -# the tranlation for you. -# https://github.com/Unicamp-OpenPower/minicloud/wiki/Getting-Started-with-Minicloud -data "null_data_source" "group_hostnames_and_ports_v2" { - count = var.openstack_cloud != "minicloud" ? 0 : local.kdevops_num_boxes - inputs = { - value = format( - "%30s : %s%s%03d%s ", - element(var.kdevops_nodes, count.index), - "ssh debian@minicloud.parqtec.unicamp.br -p ", - element( - split( - ".", - element( - openstack_compute_instance_v2.kdevops_instances.*.access_ip_v4, - count.index, - ), - ), - 2, - ), - ceil( - element( - split( - ".", - element( - openstack_compute_instance_v2.kdevops_instances.*.access_ip_v4, - count.index, - ), - ), - 3, - ), - ), - local.ssh_key_i, - ) - } -} - -output "kdevops_minicloud_port_ip_access_v2" { - value = data.null_data_source.group_hostnames_and_ports_v2.*.outputs -} - diff --git a/terraform/openstack/provider.tf b/terraform/openstack/provider.tf deleted file mode 100644 index 6cc0145b8..000000000 --- a/terraform/openstack/provider.tf +++ /dev/null @@ -1,23 +0,0 @@ -terraform { - required_providers { - openstack = { - source = "terraform-provider-openstack/openstack" - version = "~>1.47.0" - } - null = { - source = "hashicorp/null" - version = "~>2.1" - } - } -} - -provider "openstack" { - # We prefer this method as it means you also get to use standard openstack - # utilities that also use and share the same configuration files. - # First clouds-public.yaml is read, then clouds.yaml and last secure.yaml. - # - # For more details or examples see: - # https://docs.openstack.org/os-client-config/latest/user/configuration.html - # https://www.inovex.de/blog/managing-secrets-openstack-terraform/ - cloud = var.openstack_cloud -} diff --git a/terraform/openstack/shared.tf b/terraform/openstack/shared.tf deleted file mode 120000 index c10b6106a..000000000 --- a/terraform/openstack/shared.tf +++ /dev/null @@ -1 +0,0 @@ -../shared.tf \ No newline at end of file diff --git a/terraform/openstack/update_ssh_config_minicloud.tf b/terraform/openstack/update_ssh_config_minicloud.tf deleted file mode 100644 index 4fd3f0851..000000000 --- a/terraform/openstack/update_ssh_config_minicloud.tf +++ /dev/null @@ -1,25 +0,0 @@ -locals { - shorthosts_minicloud = openstack_compute_instance_v2.kdevops_instances.*.name - ports_minicloud = [ - for ip in openstack_compute_instance_v2.kdevops_instances.*.access_ip_v4 : - format("%s%03d", element(split(".", ip), 2, ), ceil(element(split(".", ip), 3, ))) - ] -} - -module "ssh_config_update_host_entries_minicloud" { - source = "linux-kdevops/add-host-ssh-config/kdevops" - version = "3.0.0" - - ssh_config = var.ssh_config - update_ssh_config_enable = (var.openstack_cloud == "minicloud" && local.kdevops_num_boxes > 0) ? "true" : "" - cmd = "update" - shorthosts = join(",", slice(local.shorthosts_minicloud, 0, local.kdevops_num_boxes)) - hostnames = "minicloud.parqtec.unicamp.br" - ports = join(",", slice(local.ports_minicloud, 0, local.kdevops_num_boxes)) - user = var.ssh_config_user == "" ? "" : var.ssh_config_user - id = replace(var.ssh_config_pubkey_file, ".pub", "") - strict = var.ssh_config_use_strict_settings != "true" ? "" : "true" - use_backup = var.ssh_config_backup != "true" || var.ssh_config == "/dev/null" ? "" : "true" - backup_postfix = "kdevops" - kexalgorithms = var.ssh_config_kexalgorithms == "" ? "" : var.ssh_config_kexalgorithms -} diff --git a/terraform/openstack/vars.tf b/terraform/openstack/vars.tf deleted file mode 100644 index 1e6193124..000000000 --- a/terraform/openstack/vars.tf +++ /dev/null @@ -1,46 +0,0 @@ -# This is a relatively new feature, reading cloud.yaml and friends. Even -# though older openstack solutions don't support this, we keep things simple -# and ask you to use these files for now. -# -# If its a public cloud we may add support for extra processing / output -# for each one on its respective cloudname.tf file. -variable "openstack_cloud" { - description = "Name of your cloud on clouds.yaml" - default = "minicloud" -} - -variable "ssh_pubkey_name" { - description = "Name of already existing pubkey or the new one you are about to upload, this must be set" - default = "kdevops-pubkey" -} - -variable "ssh_pubkey_data" { - description = "The ssh public key data" - - # for instance it coudl be "ssh-rsa AAetcccc" - default = "" -} - -variable "image_name" { - description = "Type of image" - default = "Debian 10 ppc64le" -} - -# Note: at least if using minicloud you're allowed 5 instances but only -# 8 cores and 10 GiB of RAM. If you use minicloud.max you max out all -# core limits right away. By default we use here the minicloud.tiny -# to let at you at least create a few instances. -variable "flavor_name" { - description = "Flavor of image" - default = "minicloud.tiny" -} - -variable "instance_prefix" { - description = "The prefix of the VM instance name" - default = "my-fun" -} - -variable "public_network_name" { - description = "The name of the network" - default = "public" -}