Francesco Siddi ae33a6f71e Moving Blender Cloud specific pages from Pillar
These pages were originally in the pillar repository, but they actually belong here. We also extended rsync_ui.sh to build and rsync to the Blender Cloud server.
2017-07-13 18:35:18 +02:00
2017-07-07 12:03:18 +02:00
2017-07-13 12:46:48 +02:00
2017-07-13 18:26:54 +02:00
2017-07-13 18:26:54 +02:00
2017-03-10 15:36:55 +01:00
2017-07-13 18:26:54 +02:00
2017-03-10 15:36:55 +01:00
2016-08-30 13:52:28 +02:00

Blender Cloud

Welcome to the Blender Cloud code repo! Blender Cloud runs on the Pillar framework.

Quick setup

Set up a node with these commands.

#!/usr/bin/env bash

sudo mkdir -p /data/{git,storage,config,certs}
sudo apt-get update
sudo apt-get -y install python3-pip
pip3 install docker-compose

cd /data/git
git clone git://git.blender.org/pillar-python-sdk.git
git clone git://git.blender.org/pillar.git -b production
git clone git://git.blender.org/attract.git -b production
git clone git://git.blender.org/flamenco.git -b production
git clone git://git.blender.org/blender-cloud.git -b production
git clone https://github.com/armadillica/grafista.git -b production

echo '0 8 * * * root docker exec -d grafista bash manage.sh collect' > /etc/cron.d/grafista

After these commands, run deploy.sh to build the static files and deploy those too (see below).

Deploying to production server

First of all, add those aliases to the [alias] section of your ~/.gitconfig

prod = "!git checkout production && git fetch origin production && gitk --all"
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 Pillar and Attract:

cd $projectdir

# Ensure there are no local, uncommitted changes.
git status
git stash  # if you still have local stuff.

# pull from master, run unittests, push your changes to master.
git pull
py.test
git push

# Switch to production branch, and investigate the situation.
git prod

# Fast-forward the production branch to the master branch.
git ff master

# Run tests again
py.test

# Push the production branch and run dummy deploy script.
git pp  # pp = "Push to Production"

# 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. 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.

After everything is done, your (sub)projects should all be back on the master branch.

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)
Description
Blender Cloud
Readme 18 MiB
Languages
Pug 51%
Python 33.9%
Sass 6.3%
Shell 5.4%
JavaScript 1.6%
Other 1.8%