Sample code for a continuous delivery infrastructure in pure code:
- Spin up a LambdaCD-Instance on DigitalOcean
- Use LambdaCD to compile, test, and deploy an dummy application on DigitalOcean
- inspired by devops-101
-
A DigitalOcean account
-
Ansible
-
Tugboat
-
Leiningen
-
Bash
(Note: this could be fully automated but for demonstration purposes currently isn't)
- fork and clone this repo
- configure your own fork as the repo in
src/devops_101_pipeline/meta
, commit and push your changes - call
bin/setup-env/set-up-env.sh
to set up an initial environment with two servers, one for you app, the other one for lambdacd - call
export LAMBDACD_HOST=<ci server ip>
- call
lein run
to start LambdaCD - open LambdaCD in your browser: http://localhost:8080
- run the meta-pipeline, this will deploy LambdaCD from the repository to the server you specified in
LAMBDACD_HOST
- after the meta-pipeline is done, you now have a fully functional LambdaCD instance on your server. You can stop the local instance. You can now run your pipeline to deploy a dummy app to the server. Make changes to your pipeline and push them. This will trigger the meta-pipeline, deploying a new version of LambdaCD with your changes.
This repo previously contained a demo application more closely inspired by devops-101 that deployed to AWS. This code is still available on the aws branch but currently not maintained anymore as it required too many moving parts that had nothing to do with LambdaCD.
Copyright © 2014 Florian Sellmayr
Distributed under the Apache License 2.0