- First deploy the AWS infrastructure using Terraform
- Next install the needed packages using Ansible
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
- Make sure to export your terraform instalation to your PATH
- Use "aws configure" to set enviroment defaults
Set deplyoment defaults:
- Region
- Key
- Key path
- Instance class
- AMI's
- DB users
- You will be prompted for AWS user and localip_cidr at deployment.
- Use command ssh -i ~/.ssh/keyname ec2-user@instance_ip
- terraform plan (will generate a list of resoruces to be created in AWS)
- terraform apply (will deploy resources, or apply modifications)
- terraform destroy (will destroy all resoruces and create final snapshot of DB)
- Run command: sudo easy_install pip
- http://docs.ansible.com/ansible/latest/intro_installation.html#latest-releases-via-pip
- Run command: sudo pip install ansible
- Verify defaults in /etc/ansible/ansible.cfg
- Move /etc/ansible/hosts to /etc/ansible/hosts_default
- Create new /etc/ansible/hosts file as in the sample_hosts file (insert server public ip, and path to private key genrated by Terraform for AWS)
- Edit ./ansible/scripts/concourse/concourse_start_web.sh script (Add DB endpoint, UN, PW, domain)
- Edit ./ansible/scripts/nginx/your_ci_server_domain.conf script (enter server domain, verify path to certificate, verify upstream)
- Rename ./ansible/scripts/nginx/your_ci_server_domain.conf
- Enter email and domain for cert in ./ansible/tasks/certbot.yml
- Enter your project specifics in ./ansible/tasks/nginx_conf.yml
- While in directory containing main.yml file, run command: ansible-playbook main.yml
- This will install all concourse dependencies, and the concourse web & fly binairies
- You should now have https access to the concourse server
- Enter <your_ci_server_domain> into your browser and verify that http is upgraded to https