https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables
- Create and download a pem file private key from AWS.
ssh-keygen -y -f PRIVATE_KEY.pem > PUBLIC_KEY.pub
- Extract the public key from the private key.
ssh-keygen -y -f PRIVATE_KEY.pem > PUBLIC_KEY.pub
- Place the PUBLIC_KEY.pub file in the ./credentials directory
- Update the config.tfvars files ssh_key_filename field with the ssh key file name.
Update the config_sample.tfvars file with your desired values and save as config.tfvars. Don't forget to include the ssh public key.
This can help check to see if the terraform configuration is ok.
terraform plan -var-file=config.tfvars
This will actually create the infrastructure
terraform apply -var-file=config.tfvars
This will delete all the infrastructure resources created with Terraform
terraform destroy -var-file=config.tfvars
Copy the hosts file created by Terraform from the terraform/ansible/ directory into the ansible directory
cp ./terraform/ansible/hosts ./ansible
Edit the ./group_vars/all file and set the variables as needed.
Run the ansible playbook to generate the SSL certificates.
ansible-playbook ./playbooks/generate_certs.yaml
Run the ansible playbook to install DSE.
ansible-playbook ./playbooks/install_dse.yaml