From 40215c745ce941932b660bda4d4321fe7af5042f Mon Sep 17 00:00:00 2001 From: Curtis Wilson Date: Mon, 13 Dec 2021 19:59:30 -0500 Subject: [PATCH] Moved everything from k8s-nodes to the top-level. --- README.md | 29 ++++++++++++++++++- k8s-nodes/cloud_init.cfg => cloud_init.cfg | 0 k8s-nodes/example.tfvars => example.tfvars | 0 ...s-node-status.sh => get-aws-node-status.sh | 0 ...bridge-ips.sh => get-libvirt-bridge-ips.sh | 0 k8s-nodes/get-vm-ips.sh => get-vm-ips.sh | 0 k8s-nodes/README.md | 29 ------------------- k8s-nodes/main.tf => main.tf | 0 .../modules => modules}/aws-amis/main.tf | 0 .../modules => modules}/aws-amis/outputs.tf | 0 .../aws-network-existing/main.tf | 0 .../aws-network-existing/outputs.tf | 0 .../aws-network-existing/variables.tf | 0 .../aws-network-from-scratch/main.tf | 0 .../aws-network-from-scratch/outputs.tf | 0 .../aws-network-from-scratch/variables.tf | 0 .../modules => modules}/aws-nodes/main.tf | 0 .../modules => modules}/aws-nodes/outputs.tf | 0 .../aws-nodes/variables.tf | 0 .../cloud-init-config/main.tf | 0 .../cloud-init-config/outputs.tf | 0 .../cloud-init-config/variables.tf | 0 .../modules => modules}/libvirt-nodes/main.tf | 0 .../libvirt-nodes/network_config.cfg | 0 .../libvirt-nodes/outpus.tf | 0 .../libvirt-nodes/variables.tf | 0 k8s-nodes/providers.tf => providers.tf | 0 k8s-nodes/variables.tf => variables.tf | 0 28 files changed, 28 insertions(+), 30 deletions(-) rename k8s-nodes/cloud_init.cfg => cloud_init.cfg (100%) rename k8s-nodes/example.tfvars => example.tfvars (100%) rename k8s-nodes/get-aws-node-status.sh => get-aws-node-status.sh (100%) rename k8s-nodes/get-libvirt-bridge-ips.sh => get-libvirt-bridge-ips.sh (100%) rename k8s-nodes/get-vm-ips.sh => get-vm-ips.sh (100%) delete mode 100644 k8s-nodes/README.md rename k8s-nodes/main.tf => main.tf (100%) rename {k8s-nodes/modules => modules}/aws-amis/main.tf (100%) rename {k8s-nodes/modules => modules}/aws-amis/outputs.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-existing/main.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-existing/outputs.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-existing/variables.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-from-scratch/main.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-from-scratch/outputs.tf (100%) rename {k8s-nodes/modules => modules}/aws-network-from-scratch/variables.tf (100%) rename {k8s-nodes/modules => modules}/aws-nodes/main.tf (100%) rename {k8s-nodes/modules => modules}/aws-nodes/outputs.tf (100%) rename {k8s-nodes/modules => modules}/aws-nodes/variables.tf (100%) rename {k8s-nodes/modules => modules}/cloud-init-config/main.tf (100%) rename {k8s-nodes/modules => modules}/cloud-init-config/outputs.tf (100%) rename {k8s-nodes/modules => modules}/cloud-init-config/variables.tf (100%) rename {k8s-nodes/modules => modules}/libvirt-nodes/main.tf (100%) rename {k8s-nodes/modules => modules}/libvirt-nodes/network_config.cfg (100%) rename {k8s-nodes/modules => modules}/libvirt-nodes/outpus.tf (100%) rename {k8s-nodes/modules => modules}/libvirt-nodes/variables.tf (100%) rename k8s-nodes/providers.tf => providers.tf (100%) rename k8s-nodes/variables.tf => variables.tf (100%) diff --git a/README.md b/README.md index be47577..e495e0a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,29 @@ -# terraform +A Terraform script to create k8s nodes. This script has modules for creating the +nodes on a KVM/QEMU (libvirt) hypervisor or creating the nodes via AWS. +The modules allow you create N VMs of a specific type. So you could create 1 +master node and 3 worker nodes or you could create 3 Ubuntu VMs and 5 CentOS +VMs, or whatever fits your needs. + +Cloud-Init +---------------------------------------- + +Both the libvirt and aws modules use cloud-init for initial configuration of the +VMs. + +Dependencies +---------------------------------------- + +TODO REM add libvirt provider +libvirt provider depends on mkisofs + +security_driver = none for ubuntu host, link github issue. +https://github.com/dmacvicar/terraform-provider-libvirt/issues/546 + +Other +---------------------------------------- + +Create a password hash. +```shell +python3 -c 'import crypt; print(crypt.crypt("test", crypt.mksalt(crypt.METHOD_SHA512)))' +``` diff --git a/k8s-nodes/cloud_init.cfg b/cloud_init.cfg similarity index 100% rename from k8s-nodes/cloud_init.cfg rename to cloud_init.cfg diff --git a/k8s-nodes/example.tfvars b/example.tfvars similarity index 100% rename from k8s-nodes/example.tfvars rename to example.tfvars diff --git a/k8s-nodes/get-aws-node-status.sh b/get-aws-node-status.sh similarity index 100% rename from k8s-nodes/get-aws-node-status.sh rename to get-aws-node-status.sh diff --git a/k8s-nodes/get-libvirt-bridge-ips.sh b/get-libvirt-bridge-ips.sh similarity index 100% rename from k8s-nodes/get-libvirt-bridge-ips.sh rename to get-libvirt-bridge-ips.sh diff --git a/k8s-nodes/get-vm-ips.sh b/get-vm-ips.sh similarity index 100% rename from k8s-nodes/get-vm-ips.sh rename to get-vm-ips.sh diff --git a/k8s-nodes/README.md b/k8s-nodes/README.md deleted file mode 100644 index e495e0a..0000000 --- a/k8s-nodes/README.md +++ /dev/null @@ -1,29 +0,0 @@ -A Terraform script to create k8s nodes. This script has modules for creating the -nodes on a KVM/QEMU (libvirt) hypervisor or creating the nodes via AWS. - -The modules allow you create N VMs of a specific type. So you could create 1 -master node and 3 worker nodes or you could create 3 Ubuntu VMs and 5 CentOS -VMs, or whatever fits your needs. - -Cloud-Init ----------------------------------------- - -Both the libvirt and aws modules use cloud-init for initial configuration of the -VMs. - -Dependencies ----------------------------------------- - -TODO REM add libvirt provider -libvirt provider depends on mkisofs - -security_driver = none for ubuntu host, link github issue. -https://github.com/dmacvicar/terraform-provider-libvirt/issues/546 - -Other ----------------------------------------- - -Create a password hash. -```shell -python3 -c 'import crypt; print(crypt.crypt("test", crypt.mksalt(crypt.METHOD_SHA512)))' -``` diff --git a/k8s-nodes/main.tf b/main.tf similarity index 100% rename from k8s-nodes/main.tf rename to main.tf diff --git a/k8s-nodes/modules/aws-amis/main.tf b/modules/aws-amis/main.tf similarity index 100% rename from k8s-nodes/modules/aws-amis/main.tf rename to modules/aws-amis/main.tf diff --git a/k8s-nodes/modules/aws-amis/outputs.tf b/modules/aws-amis/outputs.tf similarity index 100% rename from k8s-nodes/modules/aws-amis/outputs.tf rename to modules/aws-amis/outputs.tf diff --git a/k8s-nodes/modules/aws-network-existing/main.tf b/modules/aws-network-existing/main.tf similarity index 100% rename from k8s-nodes/modules/aws-network-existing/main.tf rename to modules/aws-network-existing/main.tf diff --git a/k8s-nodes/modules/aws-network-existing/outputs.tf b/modules/aws-network-existing/outputs.tf similarity index 100% rename from k8s-nodes/modules/aws-network-existing/outputs.tf rename to modules/aws-network-existing/outputs.tf diff --git a/k8s-nodes/modules/aws-network-existing/variables.tf b/modules/aws-network-existing/variables.tf similarity index 100% rename from k8s-nodes/modules/aws-network-existing/variables.tf rename to modules/aws-network-existing/variables.tf diff --git a/k8s-nodes/modules/aws-network-from-scratch/main.tf b/modules/aws-network-from-scratch/main.tf similarity index 100% rename from k8s-nodes/modules/aws-network-from-scratch/main.tf rename to modules/aws-network-from-scratch/main.tf diff --git a/k8s-nodes/modules/aws-network-from-scratch/outputs.tf b/modules/aws-network-from-scratch/outputs.tf similarity index 100% rename from k8s-nodes/modules/aws-network-from-scratch/outputs.tf rename to modules/aws-network-from-scratch/outputs.tf diff --git a/k8s-nodes/modules/aws-network-from-scratch/variables.tf b/modules/aws-network-from-scratch/variables.tf similarity index 100% rename from k8s-nodes/modules/aws-network-from-scratch/variables.tf rename to modules/aws-network-from-scratch/variables.tf diff --git a/k8s-nodes/modules/aws-nodes/main.tf b/modules/aws-nodes/main.tf similarity index 100% rename from k8s-nodes/modules/aws-nodes/main.tf rename to modules/aws-nodes/main.tf diff --git a/k8s-nodes/modules/aws-nodes/outputs.tf b/modules/aws-nodes/outputs.tf similarity index 100% rename from k8s-nodes/modules/aws-nodes/outputs.tf rename to modules/aws-nodes/outputs.tf diff --git a/k8s-nodes/modules/aws-nodes/variables.tf b/modules/aws-nodes/variables.tf similarity index 100% rename from k8s-nodes/modules/aws-nodes/variables.tf rename to modules/aws-nodes/variables.tf diff --git a/k8s-nodes/modules/cloud-init-config/main.tf b/modules/cloud-init-config/main.tf similarity index 100% rename from k8s-nodes/modules/cloud-init-config/main.tf rename to modules/cloud-init-config/main.tf diff --git a/k8s-nodes/modules/cloud-init-config/outputs.tf b/modules/cloud-init-config/outputs.tf similarity index 100% rename from k8s-nodes/modules/cloud-init-config/outputs.tf rename to modules/cloud-init-config/outputs.tf diff --git a/k8s-nodes/modules/cloud-init-config/variables.tf b/modules/cloud-init-config/variables.tf similarity index 100% rename from k8s-nodes/modules/cloud-init-config/variables.tf rename to modules/cloud-init-config/variables.tf diff --git a/k8s-nodes/modules/libvirt-nodes/main.tf b/modules/libvirt-nodes/main.tf similarity index 100% rename from k8s-nodes/modules/libvirt-nodes/main.tf rename to modules/libvirt-nodes/main.tf diff --git a/k8s-nodes/modules/libvirt-nodes/network_config.cfg b/modules/libvirt-nodes/network_config.cfg similarity index 100% rename from k8s-nodes/modules/libvirt-nodes/network_config.cfg rename to modules/libvirt-nodes/network_config.cfg diff --git a/k8s-nodes/modules/libvirt-nodes/outpus.tf b/modules/libvirt-nodes/outpus.tf similarity index 100% rename from k8s-nodes/modules/libvirt-nodes/outpus.tf rename to modules/libvirt-nodes/outpus.tf diff --git a/k8s-nodes/modules/libvirt-nodes/variables.tf b/modules/libvirt-nodes/variables.tf similarity index 100% rename from k8s-nodes/modules/libvirt-nodes/variables.tf rename to modules/libvirt-nodes/variables.tf diff --git a/k8s-nodes/providers.tf b/providers.tf similarity index 100% rename from k8s-nodes/providers.tf rename to providers.tf diff --git a/k8s-nodes/variables.tf b/variables.tf similarity index 100% rename from k8s-nodes/variables.tf rename to variables.tf