This an attempt at building the a 3 worker and 3 controller environment based on https://github.com/kelseyhightower/kubernetes-the-hard-way, using Terraform and Ansible
-
update "credentials" and "project"
-
cd infrastructure
-
terraform plan
-
terraform apply
-
Use python script in bootstrap_hosts to initialise the Ansible host file
cd .. && python populate_hosts.py --tf_state infrastructure/terraform.tfstate --ansible_inv ./inventories/production/hosts.yaml --ssh_dir ./ssh_keys --json_v roles/configGeneration/files/
-
Use host file to setup bastion server and deploy other components from there
ansible-playbook bootstrap-automation-serv.yml --inventory=inventories
-
SSH into bastion server
ssh -i ssh_keys/bastion bastion@<ip>
-
cd /automation
-
ansible-playbook tlscertGenAndTransfer.yml --inventory=inventories
-
ansible-playbook configure-cluster.yml --inventory=inventories