Status: Running TeamCity connected to a public EC2 container this is bare minimum, there's no disaster recovery, auto-scaling, IP limitations etc
I am polishing my article that explains everything I have built step by step. The article is still in progress as of Dec 30th, but you need it immediate you can read it on my WIP blog.
If you want to skip the tutorial and just get TeamCity up and running:
This is a great source for aws instance price information and region availability: ec2instances
- I am using us-east-2 and instances that are available in that region for DB and EC2, if you are using other regions please change those instances. You may change the following:
- region in variables.tf
- debian_ami in variables.tf
- instance_type in ec2/main.tf
- instance_class in rds/main.tf
DB name (db_name) is teamcity you can change it in variables.tf
Pick a globally unique name for your S3, unique_s3_name in variables.tf
- Have your aws_access_key, aws_secret_key, and db_password them handy for when you get prompted
- Export aws_access_key and aws_secret_key to the shell (remove them from main.tf and variables.tf) OR
- Change terraform.tfvars.sample to terraform.tfvars Add your aws_access_key, aws_secret_key, and db_password to terraform.tfvars
Make sure you have correct accesses on AWS: my blog > Getting started:
The module creates a key pair name teamcity and uploads it to aws to be used for ec2 creation
Notice that I am using debian image: debian_ami for the EC2
We will using make later in the tutorial. You need you install
brew install make --with-default-nameswhich depends on XCode.
- If you use windows, improvise appropriately.
- If you don't want to use make file, copy the ssh-key command from the makefile and run it manually in your terminal
$ terraform init $ terraform apply