Bundling virtualenv.py, wheels and you project as a relocatable tar.
That makes you have an enjoyment of deploy experience: fetch tar, extract tar, run install, and it' done!
Using pip:
$ pip install beeper
Example:
application: app
manifest:
- app/
- manage.py
postbuild:
- npm install
- ./node_modules/.bin/webpack
postinstall:
- echo "Done."
- define
application
, which will be prefix in the naming of tar - define
manifest
, which declares what files will be included into tar - define
scripts
, which will be executed in a row before packaging into a tar - define
postinstall
, which will be executed in a row after tar been deployed and relocated.
beeper build
is the most important command. It will run scripts, pack all of the manifest
files and wheels into a tar.
Example
$ ls
app beeper.yml manage.py
$ beeper build --version b3d53cf
...
$ tar -tzvf dist/app-b3d53cf.tgz
app/
.beeper-data/
virtualenv.py
requirements.txt
...
manage.py
A simple example of how to deploy a tar: use scp to upload tar to server, extract tar, run install.sh, and boom, run your server:
$ scp ./dist/app-b3d53cf.tgz deploy@your-server:/var/www/app/app-b3d53cf.tgz
$ ssh deploy@your-server /bin/bash -c "cd /var/www/app/; tar xzf app-b3d53cf.tgz; ./install.sh; venv/bin/python manage.py runserver"