An attempt to centralize the configuration and building of application environments at eLife, locally (Vagrant) and remotely (AWS).
Download:
git clone ssh://git@github.com/elifesciences/builder
Install:
./update.sh
Fix any missing pre-requisites and call ./update.sh
again until you see the happy
all done
message. Updating in the future is as simple as:
git pull
./update.sh
Your settings.yaml
file was created automatically and contains options for tweaking the behaviour of builder
, like the project file it should be using.
By default it points to the ./projects/elife.yaml
project file. This file describes all eLife projects that can be built and their environments. See here for more
project file documentation.
Project files and the settings.yml
file are the only two places where configuration is supported.
'configuration' also exists in
./src/buildercore/config.py
if you're abuilder
dev.
After successfully installing and configuring builder
, launching a Vagrant instance is a good test that all is working correctly.
The Vagrantfile
can build any project, you just need to tell it which one:
$ vagrant up
You must select a project:
1 - journal--vagrant
2 - api-gateway--vagrant
3 - ...
>
... or it can be done with environment variables:
$ PROJECT=journal vagrant up
The other half of the builder
project is the ability to create and manage AWS resources. This is controlled with the "bldr" script:
$ ./bldr -l
Will list all builder
tasks found in src/
. These tasks are just Python functions.
A master-server
instance must exist before project instances can be brought up. See here for a walkthrough.
To launch a project backed by a code repository to AWS:
$ ./bldr deploy
To launch an ad-hoc instance of any project to AWS, use:
$ ./bldr aws_launch_instance
General:
AWS:
Development
The builder
project is MIT licenced.
The builder
project was GPL3 licensed until this commit on 2016-07-13.