The Python Developers slack community has a number of projects that we have started. This repository contains our deployment scripts 🎉
Interested in becoming a member? Get your invite here: http://pythondevelopers.herokuapp.com/
Ensure you have a .pass
file in the root of your project, populated with the ansible password.
$ ansible-playbook website.yml
TODO!
$ ansible-playbook sirbot.yml
You will need to already have your ssh keys included in our provisioning tasks. If you do not then you will need to have an admin run the
provisioning.yml
playbook.
Before deploying a new app read the app configuration section
Run the deployment.
$ ansible-playbook -i <inventory> deploy.yml --tags <app>
Tests are run via Travis CI's .travis.yml
. Unit tests can be manually via docker with:
$ docker run -t -i -v ${PWD}:/data geerlingguy/docker-ubuntu1604-ansible /data/run_tests.sh
Ensure that you have placed the Ansible vault password into .pass
beforehand.
ssh_keys
: Path to your ssh authorized_keys file
To run this playbook the host must be in the sirbot
group.
sirbot_token
: Your slack tokensirbot_name
: Name of the botsirbot_id
: ID of the bot
-
port
: Port for sirbot. Default is 8080 -
force_build
: Force the build of a new package -
local_deb
: Path to the localsirbot.deb
file to deploy -
local_run
: Path to the localrun.py
file to deploy
-
Install the
debhelper
anddh-virtualenv
packages$ apt-get install debhelper dh-virtualenv
-
Install the
make-deb
python module$ pip install make-deb
-
Configure the package
$ make-deb
-
Build the package
Make sure the package is being build with minimum a python3.5 executable
$ export VIRTUALENV_PYTHON=/usr/bin/python3.5 $ dpkg-buildpackage -us -uc
-
(Optional) Install the package
$ dpkg -i sirbot_<version>_amd64.deb