Updated documentation for the new way to deploy Blender Cloud

This commit is contained in:
2018-02-02 11:47:29 +01:00
parent 94ef616593
commit bef402a6b0
2 changed files with 26 additions and 33 deletions

View File

@@ -30,18 +30,20 @@ After these commands, run `deploy.sh` to build the static files and deploy
those too (see below). those too (see below).
## Deploying to production server ## Preparing the production branch for deployment
First of all, add those aliases to the `[alias]` section of your `~/.gitconfig` All revisions to deploy to production should be on the `production` branches of all the relevant
repositories.
Make sure you have these aliases in the `[alias]` section of your `~/.gitconfig`:
``` ```
prod = "!git checkout production && git fetch origin production && gitk --all" prod = "!git checkout production && git fetch origin production && gitk --all"
ff = "merge --ff-only" ff = "merge --ff-only"
pp = "!git push && if [ -e deploy.sh ]; then ./deploy.sh; fi && git checkout master"
``` ```
The following commands should be executed for each subproject; specifically for The following commands should be executed for each (sub)project; specifically for
Pillar and Attract: the current repository, Pillar, Attract, Flamenco, and Pillar-SVNMan:
``` ```
cd $projectdir cd $projectdir
@@ -64,35 +66,22 @@ git ff master
# Run tests again # Run tests again
py.test py.test
# Push the production branch and run dummy deploy script. # Push the production branch.
git pp # pp = "Push to Production" git push
# The above alias waits for [ENTER] until all deploys are done.
# Let it wait, perform the other commands in another terminal.
``` ```
Now follow the above receipe on the Blender Cloud project as well. ## Deploying to production server
Contrary to the subprojects, `git pp` will actually perform the deploy
for real.
Now you can press `[ENTER]` in the Pillar, Attract, and Flamenco terminals ```
that were still waiting for it. workon blender-cloud # activate your virtualenv
cd $projectdir/deploy
./2docker.sh
cd $projectdir/docker
./full_rebuild.sh # or one of the other build scripts, if you know what you're doing.
docker push armadillica/blender_cloud:latest
cd $projectdir/deploy
./2server.sh
```
After everything is done, your (sub)projects should all be back on To deploy another branch than `production`, do `export DEPLOY_BRANCH=otherbranch` before starting
the master branch. the above commands.
## Updating dependencies via Docker images
To update dependencies that need compiling, you need the `2_build` docker
container. To rebuild the lot, run `docker/build.sh`.
Follow these steps to deploy the new container on production:
1. run `docker/build.sh`
2. `docker push armadillica/blender_cloud`
On the production machine:
1. `docker pull armadillica/blender_cloud`
2. `docker-compose up -d` (from the `/data/git/blender-cloud/docker` directory)

View File

@@ -58,6 +58,7 @@ Place TLS certificates in `/data/certs/{cloud,cloudapi}.blender.org.pem`.
They should contain (in order) the private key, the host certificate, and the They should contain (in order) the private key, the host certificate, and the
CA certificate. CA certificate.
## 6. Create a local config ## 6. Create a local config
Blender Cloud expects the following files to exist: Blender Cloud expects the following files to exist:
@@ -65,6 +66,9 @@ Blender Cloud expects the following files to exist:
- `/data/git/blender_cloud/config_local.py` with machine-local configuration overrides - `/data/git/blender_cloud/config_local.py` with machine-local configuration overrides
- `/data/config/google_app.json` with Google Cloud Storage credentials. - `/data/config/google_app.json` with Google Cloud Storage credentials.
When run from Docker, the `docker/4_run/config_local.py` file will be used. Overrides for that file
can be placed in `/data/config/config_secrets.py`.
## 7. ElasticSearch & kibana ## 7. ElasticSearch & kibana