The central for the backend services for CloudFleet blimps
528
So, you'd like to deploy Spire? Be my guest...
Duralumin and Spire repositories have to be in the same folder e.g.
cloudfleet/
duralumin/
spire/
Now enter the spire folder and issue
source scripts/bootstrap.sh
Create your local virtualenv.
virtualenv venv --distribute
Activate it.
source venv/bin/activate
Install the dependencies.
pip install -r requirements/dev.txt
As a Celery broker we need RabbitMQ - in Ubuntu...
sudo apt-get install rabbitmq-server
... or in OS X.
brew install rabbitmq
Start a worker in the background.
celery -A spire worker -l info
As a key-value store we need Redis - in Ubuntu...
# TODO
... or in OS X.
brew install redis
and set it to start automatically (yay, OS X :P).
A docker daemon is expected to be available.
Install it by following
the official instructions
and make it listen to HTTP connections
by editing /etc/default/docker and restarting the service
(sudo service docker restart):
DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://localhost:4243"
If you get permission issues, disable AppArmor for docker:
sudo ln -s /etc/apparmor.d/docker /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/docker
(though we had some problems with AppArmor, so hopefully you won't have to)
On OS X you would install it by following the official instructions.
Docker can also run on a different server.
You need to create an SSH keypair and copy it to the server that hosts
Docker containers - blimpyard. Then specify the path
to it in local_settings.py (such as ~/.ssh/blimpyard_rsa).
ssh-keygen
ssh-copy-id -i ~/.ssh/blimpyard_rsa [email protected]
An ssh tunnel to blimpyard should be established automatically, but you can also (your public key is in blimpyard's allowed hosts, right?) do it manually.
ssh -o BatchMode=yes -i ~/.ssh/blimpyard_rsa -f -N -L 4444:localhost:4243 [email protected]
If this is your first time run, initialize the DB.
./manage.py syncdb
On any other git pull you should check if the DB schema needs an update.
./manage.py migrate
Go to localhost:8000/admin/ and click add Site and create a site with your site's domain name (used in sign-up verification e-mails).
Start the dev server.
foreman start
Or optionally if you like interactive debugging on exceptions use Werkzeug.
./manage.py runserver_plus
Similar to dev, but you need PostgreSQL in Ubuntu...
sudo apt-get install libpq-dev
... or in OS X.
brew install postgresql
Install the production dependencies.
pip install -r requirements/prod.txt
Collect the static files.
./manage.py collectstatic
Content type
Image
Digest
Size
37.9 MB
Last updated
over 7 years ago
docker pull cloudfleet/spire