This repo contains a small nodejs application, scripts to provision some GCE instances, scripts to build the application into a docker image, and an ansible playbook to deploy it.
App code is in app/
Scripts are in scripts/
Deployment code is in playbooks/
$ cd app
$ npm install
$ npm start
Example app listening at http://0.0.0.0:8080
- Create a jenkins instance using scripts/create-jenkins-instance.sh
- Log into your jenkins instance, and install the github plugin.
- Create a Freestyle project
- Replace the bucket in scripts/jenkins-build.sh
- Add a build step with the contents of scripts/jenkins-build.sh
- Build away!
- $ cd playbooks
- $ edit hosts to contain your IP addresses
- $ ansible-playbook playbook.yaml -i hosts --extra-vars "version=BUILD_NUMBER" --private-key=~/.ssh/google_compute_engine