Blender Cloud
Go to file
Anna Sirota e7886261bd Work around cryptography requiring Rust compiler
Pins all the build dependencies required by poetry, otherwise
poetry installs arbitrary versions of them, which leads to a wrong
version of cryptography being installed and the build failing.
Note that Cloud dependencies (pillar and the like) has to have their
build dependencies pinned in the same exact manner, for the same reason.

Pins all the runtime dependencies as well, because Cloud can only use
poetry==1.0 due to its source dependencies, so there's no
"poetry lock --no-update" and each "poetry lock" updates arbitrary packages.
2021-03-18 18:42:10 +01:00
cloud Handle date_deletion_requested in user-modified webhook D10139 2021-01-20 10:43:11 +01:00
deploy Work around cryptography requiring Rust compiler 2021-03-18 18:42:10 +01:00
docker Work around cryptography requiring Rust compiler 2021-03-18 18:42:10 +01:00
jwtkeys Added jwtkeys/README.md 2019-03-27 12:58:08 +01:00
src Learn: New featured projects 2020-07-23 12:20:05 +02:00
static/assets/img Homepage: New featured projects 2020-07-23 12:19:37 +02:00
tests Handle date_deletion_requested in user-modified webhook D10139 2021-01-20 10:43:11 +01:00
.gitignore Renamed docker/4_run/deploy to docker/4_run/staging 2019-02-13 10:39:18 +01:00
cloud_share_img.py Fixed creation of image sharing group node 2017-11-21 15:16:38 +01:00
config_local.example.py Remove whitespace 2019-04-08 16:44:29 +02:00
gulp Tweak to gulp all command 2019-11-13 10:43:25 +01:00
gulpfile.js Upgraded Gulp 3.9 → 4.0 and removed gulp-livereload 2019-05-31 12:27:35 +02:00
LICENSE.txt Initial checkin of Blender Cloud Server. 2016-07-29 16:29:51 +02:00
maintenance_mode.html Template for maintenance mode 2016-08-18 12:08:26 +02:00
manage.py Introducing Cloud extension 2017-03-10 15:36:55 +01:00
package-lock.json Update gulp-sass 2020-07-23 18:43:17 +02:00
package.json Update gulp-sass 2020-07-23 18:43:17 +02:00
poetry.lock Work around cryptography requiring Rust compiler 2021-03-18 18:42:10 +01:00
poetry.toml Configured Poetry to not use virtualenvs in ./.venv 2020-03-19 17:42:45 +01:00
pyproject.toml Work around cryptography requiring Rust compiler 2021-03-18 18:42:10 +01:00
README.md Added little note about rerunning poetry update after dependencies changed 2019-05-14 12:02:14 +02:00
runserver.py Added SVNMan extension 2017-11-14 16:09:29 +01:00
runserver.wsgi Added SVNMan extension 2017-11-14 16:09:29 +01:00
setup.cfg Roles '{flamenco,attract}-user' are now linked to 'subscriber' 2017-07-11 12:40:13 +02:00

Blender Cloud

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

Development setup

Jumpstart Blender Cloud development with this simple guide.

System setup

Blender Cloud relies on a number of services in order to run. Check out the Pillar system setup to set this up.

Add cloud.local to the /etc/hosts file on localhost. This is a development convention.

Check out the code

Go to the local development directory and check out the following repositories, next to each other.

cd /home/guest/Developer
git clone git://git.blender.org/pillar-python-sdk.git
git clone git://git.blender.org/pillar.git
git clone git://git.blender.org/attract.git
git clone git://git.blender.org/flamenco.git
git clone git://git.blender.org/pillar-svnman.git
git clone git://git.blender.org/blender-cloud.git

Initial setup and configuration

Create a virtualenv for the project and install the requirements. Dependencies are managed via Poetry. Install it using pip install -U --user poetry.

cd blender-cloud
pip install --user -U poetry
poetry install

NOTE: After a dependency changed its own dependencies (say a new library was added as dependency of Pillar), you need to run poetry update. This will take the new dependencies into account and write them to the poetry.lock file.

Build assets and templates for all Blender Cloud dependencies using Gulp.

./gulp all

Make a copy of the config_local example, which will be further edited as the application is configured.

cp config_local.example.py config_local.py

Setup the database with the initial collections and the admin user.

poetry run ./manage.py setup setup_db your_email

The command will return the following message:

Created project <project_id> for user <user_id>

Copy the value of <project_id> and assign it as value for MAIN_PROJECT_ID.

Run the application:

poetry run ./manage.py runserver

Development

When ready to commit, change the remotes to work over SSH. For example:

git remote set-url origin git@git.blender.org:blender-cloud.git

For more information, check out this guide.

Preparing the production branch for deployment

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"
ff = "merge --ff-only"

The following commands should be executed for each (sub)project; specifically for the current repository, Pillar, Attract, Flamenco, and Pillar-SVNMan:

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
poetry run 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
poetry run py.test

# Push the production branch.
git push

Deploying to production server

See deploy/README.md.