Use Flamenco module
This commit is contained in:
@@ -22,6 +22,7 @@ cd /data/git
|
||||
git clone git://git.blender.org/pillar-python-sdk.git
|
||||
git clone git://git.blender.org/pillar-server.git pillar
|
||||
git clone git://git.blender.org/attract.git
|
||||
git clone git://git.blender.org/flamenco.git
|
||||
git clone git://git.blender.org/blender-cloud.git
|
||||
```
|
||||
|
||||
|
3
cloud.py
3
cloud.py
@@ -2,11 +2,14 @@
|
||||
|
||||
from pillar import PillarServer
|
||||
from attract import AttractExtension
|
||||
from flamenco import FlamencoExtension
|
||||
|
||||
attract = AttractExtension()
|
||||
flamenco = FlamencoExtension()
|
||||
|
||||
app = PillarServer('.')
|
||||
app.load_extension(attract, '/attract')
|
||||
app.load_extension(flamenco, '/flamenco')
|
||||
app.process_extensions()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
38
deploy.sh
38
deploy.sh
@@ -22,39 +22,35 @@ if [ -n "$(git log origin/production..production --oneline)" ]; then
|
||||
read dummy
|
||||
fi
|
||||
|
||||
# Find Pillar
|
||||
PILLAR_DIR=$(python <<EOT
|
||||
# Find Module
|
||||
function find_module()
|
||||
{
|
||||
MODULE_DIR=$(python <<EOT
|
||||
from __future__ import print_function
|
||||
import os.path
|
||||
try:
|
||||
import pillar
|
||||
import $1
|
||||
except ImportError:
|
||||
raise SystemExit('Pillar not found on Python path. Are you in the correct venv?')
|
||||
raise SystemExit('${1^} not found on Python path. Are you in the correct venv?')
|
||||
|
||||
print(os.path.dirname(os.path.dirname(pillar.__file__)))
|
||||
print(os.path.dirname(os.path.dirname($1)))
|
||||
EOT
|
||||
)
|
||||
if [ $(git -C $PILLAR_DIR rev-parse --abbrev-ref HEAD) != "production" ]; then
|
||||
echo "Pillar ($PILLAR_DIR) NOT on the production branch, refusing to deploy." >&2
|
||||
|
||||
if [ $(git -C $MODULE_DIR rev-parse --abbrev-ref HEAD) != "production" ]; then
|
||||
echo "${1^} ($MODULE_DIR) NOT on the production branch, refusing to deploy." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Find Pillar
|
||||
find_module pillar
|
||||
|
||||
# Find Attract
|
||||
ATTRACT_DIR=$(python <<EOT
|
||||
from __future__ import print_function
|
||||
import os.path
|
||||
try:
|
||||
import attract
|
||||
except ImportError:
|
||||
raise SystemExit('Attract not found on Python path. Are you in the correct venv?')
|
||||
find_module attract
|
||||
|
||||
print(os.path.dirname(os.path.dirname(attract.__file__)))
|
||||
EOT
|
||||
)
|
||||
if [ $(git -C $ATTRACT_DIR rev-parse --abbrev-ref HEAD) != "production" ]; then
|
||||
echo "Attract ($ATTRACT_DIR) NOT on the production branch, refusing to deploy." >&2
|
||||
exit 1
|
||||
fi
|
||||
# Find Flamenco
|
||||
find_module flamenco
|
||||
|
||||
# SSH to cloud to pull all files in
|
||||
function git_pull() {
|
||||
|
@@ -4,6 +4,7 @@
|
||||
XSendFilePath /data/storage/pillar
|
||||
XSendFilePath /data/git/pillar
|
||||
XSendFilePath /data/venv/lib/python2.7/site-packages/attract/static/
|
||||
XSendFilePath /data/venv/lib/python2.7/site-packages/flamenco/static/
|
||||
XsendFilePath /data/git/blender-cloud
|
||||
|
||||
ServerAdmin webmaster@localhost
|
||||
|
@@ -7,6 +7,8 @@ if [ ! -f /installed ]; then
|
||||
ln -s /data/git/pillar/pillar /data/venv/lib/python2.7/site-packages/pillar
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/attract
|
||||
ln -s /data/git/attract/attract /data/venv/lib/python2.7/site-packages/attract
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/flamenco
|
||||
ln -s /data/git/flamenco/flamenco /data/venv/lib/python2.7/site-packages/flamenco
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/pillar-python-sdk
|
||||
ln -s /data/git/pillar-python-sdk/pillarsdk /data/venv/lib/python2.7/site-packages/pillarsdk
|
||||
touch installed
|
||||
|
@@ -21,6 +21,7 @@ blender_cloud:
|
||||
volumes:
|
||||
- /data/git/blender-cloud:/data/git/blender-cloud:ro
|
||||
- /data/git/attract:/data/git/attract:ro
|
||||
- /data/git/flamenco:/data/git/flamenco:ro
|
||||
- /data/git/pillar:/data/git/pillar:ro
|
||||
- /data/git/pillar-python-sdk:/data/git/pillar-python-sdk:ro
|
||||
- /data/config:/data/config:ro
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# pillarsdk
|
||||
# pillar
|
||||
# attract
|
||||
# flamenco
|
||||
|
||||
# Secondary requirements (i.e. pulled in from primary requirements)
|
||||
algoliasearch==1.8.0
|
||||
|
Reference in New Issue
Block a user