forked from bslatkin/dpxdt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworker_deploy.sh
executable file
·35 lines (31 loc) · 1.08 KB
/
worker_deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
source common.sh
ARCHIVE_NAME=dpxdt_deployment
TEMP_DIR=/tmp/$ARCHIVE_NAME
OUTPUT_ARCHIVE=/tmp/$ARCHIVE_NAME.tar.gz
INSTALL_PATH=/usr/local/share
rm -Rf $TEMP_DIR
cp -R -L deployment/worker $TEMP_DIR
find $TEMP_DIR -name '*.pyc' -or -name '.*' | xargs rm
cp $PHANTOMJS_DEPLOY_BINARY $TEMP_DIR
tar zcf $OUTPUT_ARCHIVE -C /tmp $ARCHIVE_NAME
echo "scp $OUTPUT_ARCHIVE foo@bar:/tmp"
echo
echo "# Modify /etc/apt/sources.list and add 'contrib' and 'non-free' repos"
echo "# You'll need this for the MS fonts package. Then as root:"
echo "apt-get update"
echo
echo "# On the host machine as root:"
echo "apt-get install imagemagick less libfreetype6 libfontconfig runit tmpreaper ttf-mscorefonts-installer"
echo
echo "cp /tmp/$ARCHIVE_NAME.tar.gz $INSTALL_PATH"
echo "cd $INSTALL_PATH"
echo "tar zxf $ARCHIVE_NAME.tar.gz"
echo "cp -R $ARCHIVE_NAME/runit /etc/service/dpxdt_worker"
echo
echo "# Modify dpxdt_worker/flags.cfg with your API keys"
echo "# Modify /etc/tmpreader.conf to enable /tmp file cleanups"
echo "# Rebuild the font cache with:"
echo "fc-cache -fv"
echo
echo "sv start dpxdt_worker"