Skip to content
mstuparuPublic

About

Go test app

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoApp

Tools used:

Bootstrap project

1. Environment variables:
export AWS_ACCESS_KEY_ID=XXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=XXXXXXXXXX
export TF_VAR_aws_access_key=$AWS_ACCESS_KEY_ID
export TF_VAR_aws_secret_key=$AWS_SECRET_ACCESS_KEY
export TF_VAR_aws_ssh_pub_key="XXXXXXXXXX"
2. Terraform - Provision AWS infrastructure
cd terraform
terraform apply
3. Ansible - Deploy application

(use the ssh private key corespondent to the one used in step 1)

cd ansible
ansible-playbook deploy.yml
4. CI/CD Pipeline

Integration configured with Circle CI. Every branch is tested for each commit. Pull requests that pass tests and get merged into master get tested and then deployed using the ansible playbook

5. Further improvments
  • Store terraform state file in remote S3/Atlas for colaboration
  • Extend tests to cover terraform and ansible files
  • Gracefull restart of nginx container: docker kill -s HUP
  • Wrap all useful commands with a Makefile

About

Go test app

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages