This project gives you a simple way to get cog running on beanstalk. Simply clone down the repo, edit the tfvars file, and run terraform.
- Clone this repo
- Install the awsebcli
cd terraformcp terraform.tfvars.example terraform.tfvars- Edit
terraform.tfvars terraform planto see the changes.terraform applyto apply the changes.cd ..eb init [--profile profilename]and select the right region and environmenteb deploy
You have two choices.
-
Deal with the DNS yourself, this means after terraform applies the changes you will need to create a CNAME record from the elastic beanstalk hostname to
cog.[yourdomain.com], you must still setroot_domainin theterraform.tfvarscorrectly -
In your
terraform.tfvarsfile setroot_domainandroute53_zone_idcorrectly and adjustdomain_countto1. This requires your domain to be hosted by AWS on Route53.
There is only one small difference to using the official docs for configuring cog.
First, you need to find and ssh into your EC2 instance. You will need
to check the amazon web console to get the IP. SSH using ssh ec2-user@[ip]
Once in, you can use the sudo docker ps command to find the container
ID for the operable/cog container, and then get into it by using sudo docker exec -it [container-id] bash.
You can then follow along with the rest of the documentation.