One time stuff:
- Install or update
pip
: https://pip.pypa.io/en/latest/installing.html - Install
virtualenvwrapper
: https://virtualenvwrapper.readthedocs.org/en/latest/install.html - Add
virtualenvwrapper
to your startup scripts: https://virtualenvwrapper.readthedocs.org/en/latest/install.html#shell-startup-file - Create a virtual environment for this project:
$ mkvirtualenv lemongrab
- Clone the
lemongrab
repository. - Get to work.
Getting to work:
$ cd lemongrab
$ workon lemongrab # set the virtual environment
$ pip install -r requirements.txt # install latest python dependencies
$ # ... make some changes
$ pip freeze > requirements.txt # ensure dependencies are up to date
$ deactivate # when you're done, un-set the environment
$ ./run-server.bash # starts the server listening on port 5000
To run the server unit tests:
$ ./run-tests.bash
One time stuff:
- Install elastic beanstalk CLI,
eb
, with pip: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-getting-set-up.html#eb_cli3-install-with-pip - Ensure you have IAM role keys in
~/.aws/credentials
(with elastic beanstalk permissions). - Run
eb init
and pull downlemongrab
fromus-west-2 : US West (Oregon)
.
# deploy the latest commit on the master branch
$ ./deploy.bash
You can also use eb deploy
to force deployment of the latest git commit of the current working branch.
It might be a good idea to test the containerized app before deploying. This can be done with docker
. To install: https://docs.docker.com/installation/. Once installed, you can use ./run-dockerized-server.bash
to start a container that contains the running server.