https://github.com/versent/buildkite-stack
https://github.com/versent/buildkite-stack
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/versent/buildkite-stack
- Owner: Versent
- Created: 2015-12-09T22:39:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-05T22:29:31.000Z (over 10 years ago)
- Last Synced: 2025-02-24T07:13:04.104Z (over 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# buildkite-stack
This is a pretty basic buildkite agent stack which starts a fixed number of agents using either on demand or spot pricing.
It is comprised of:
* [AWS Cloudformation](https://aws.amazon.com/cloudformation/)
* [coffer](https://github.com/wolfeidau/coffer)
* [buildkite agent](https://github.com/buildkite/agent)
* [buildkite-packer](https://github.com/wolfeidau/buildkite-packer)
# usage
* Use buildkite-packer to build an AMI in your AWS account, once this is done use this in the cloudformation.
* Create a KMS key in the region your using with the alias `coffer`.
* Create an S3 bucket to hold the coffer files.
* Setup an ssh key and put it in your coffer file.
```yaml
files:
"/var/lib/buildkite-agent/.ssh/id_rsa":
mode: 0600
content: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
```
* Encrypt and upload the coffer file
```
AWS_PROFILE=XX AWS_REGION=ap-southeast-2 coffer --coffer-file buildkite.coffer upload --bucket="XX-buildkite-coffers"
```
* Run the create stack passing in the required parameters.
```
AWS_DEFAULT_PROFILE=XX AWS_DEFAULT_REGION=ap-southeast-2 ./create-stack.sh \
Subnets="subnet-XX,subnet-XX" AMIID="ami-XX" CofferKeyARN="arn:aws:kms:ap-southeast-2:XXX:key/XXX" \
AgentToken="XXX" ArtifactsS3BucketName="XX-buildkite-artifacts" \
CofferS3BucketName="XX-buildkite-coffers" VpcId=vpc-XX AgentMetaData="gophers=true" \
EC2KeyName="XX-buildkite-agent"
```
# Sponsor
This project was made possible by [Versent](http://www.versent.com.au).
# License
BSD