- Terraform
- Ansible
- Python
- aws CLI
Packer:
Terraform:
Ansible:
python -m -venv venv
source venv/bin/activate
pip install ansible
To configure your aws cli run
aws configure
Afterwards insert your credentials. This should look like:
$ aws configure
AWS Access Key ID [None]: <Your AWS ACCESS KEY>
AWS Secret Access Key [None]: <Your AWS Secret Access Key>
Default region name [us-west-2]: <Region you want operate in>
Default output format [json]: <Output format of CLI>
create a new role in ~/.aws/config
[profile your profile name] region = your region output = json
Run packer with a Makefile command
make packer-build
Run terraform plan to validate the script and see the changes terraform intends to perform
make terraform-init
Run terraform apply to setup the infrastructure with AWS, this command is going to prompt you. Type yes
to actually deploy the VMs
make terraform-apply
To use the generated ssh-config file you have to either
- use the connect make command
- move the config file to the specific location
~/.ssh/config
Connect to the Perfoce Instance:
make connect
or use the following command to move the file and overwrite the old ssh-config:
move-ssh-config-to-ssh-directory
make provisioning
for a more verbose provisioning use:
make provisioning-verbose
The .pem file needs to have a specific permission. AWS is going to complain if the file doesn't meet the required permission.
chmod 400 <name of keypair pem file>.pem