http://www.slideshare.net/mumoshu/autoscaled-concourse-ci-on-aws-wo-bosh
Recommended Usage: Using concourse-aws binary
-
Install packer and terraform
-
Create 1 VPC and 2 subnets in it
-
Clone this repository
git clone https://github.com/mumoshu/concourse-aws
- Run
concourse-aws up
cd concourse-aws
# Obtain the latest concourse-aws binary from GitHub releases
curl -L https://github.com/mumoshu/concourse-aws/releases/download/latest/concourse-aws -o concourse-aws && chmod +x concourse-aws
./build-amis.sh
./concourse-aws up
And then, concourse-aws will prompt you to provide required parameters(region, availability zone, subnet id, cidr, and vice versa)
-
Install packer and terraform
-
Create 1 VPC and 2 subnets in it
-
Set up required environment variables required by the wrapper script for terraform
$ cat >> .envrc <<<'
export AWS_ACCESS_KEY_ID=<YOUR ACCESS KEY>
export AWS_SECRET_ACCESS_KEY=<YOUR SECRET ACCESS KEY>
export CONCOURSE_IN_ACCESS_ALLOWED_CIDR="<YOUR_PUBLIC_IP>/32"
export CONCOURSE_SUBNET_ID=<YOUR_SUBNET1_ID>,<YOUR_SUBNET2_ID>
export CONCOURSE_DB_SUBNET_IDS=<YOUR_SUBNET1_ID>,<YOUR_SUBNET2_ID>
'
Install direnv and allow it to read .envrc created in the previous step.
$ direnv allow
-
The same for optional ones
$ export CONCOURSE_WORKER_INSTANCE_PROFILE=<YOUR INSTANCE PROFILE NAME>
-
Run the following commands to build required AMIs and to provision a Concourse CI cluster
$ ./build-amis.sh
$ ./terraform.sh get
$ ./terraform.sh plan
$ ./terraform.sh apply
-
Open your browser and confirm that the Concourse CI is running on AWS:
# This will extract the public hostname for your load balancer from terraform output and open your default browser
$ open http://$(terraform output | ruby -e 'puts STDIN.first.split(" = ").last')
-
Follow the Concourse CI tutorial and experiment as you like:
$ export CONCOURSE_URL=http://$(terraform output | ruby -e 'puts STDIN.first.split(" = ").last')
$ fly -t test login -c $CONCOURSE_URL
$ fly -t test set-pipeline -p hello-world -c hello.yml
$ fly -t test unpause-pipeline -p hello-world
See http://concourse.ci/hello-world.html for more information and the hello.yml referenced in the above example.
-
Modify autoscaling groups' desired capacity to scale out/in webs or workers.
Why did you actually created this?
BOSH looks very promising to me according to what problems it solves.
However I was too lazy to learn it for now mainly because:
- I'm not going to use IaaS other than AWS for the time being
- learning it to JUST try Concourse CI might be too much in the short term though
You may also find those projects useful