|
|
@ -3,15 +3,10 @@ |
|
|
|
set -eux # -x for verbose logging to juju debug-log |
|
|
|
|
|
|
|
|
|
|
|
cat <<EOF >> /etc/fstab |
|
|
|
lxc-nfs-datastore:/srv/lxc-datastore/data/git/var/git /var/git nfs4 timeo=14,intr,bootwait,auto 0 0 |
|
|
|
EOF |
|
|
|
|
|
|
|
mkdir -p /var/git |
|
|
|
mount /var/git || exit 1 |
|
|
|
|
|
|
|
[ -d "/var/git/0k" ] || exit 1 |
|
|
|
|
|
|
|
#PASSWD= |
|
|
|
GIT_BASE=${GIT_BASE:-"git.0k.io:/var/git"} |
|
|
|
GIT_CLONE_OPTIONS="" |
|
|
|
GIT_CHECKOUT_REF="7.0/0k/dev/master" ## can be a branch, a tag or a commit SHA1 |
|
|
|
|
|
|
|
apt-get install sudo libxml2-dev libxslt-dev libpq-dev libyaml-dev \ |
|
|
|
zlib1g-dev libfreetype6-dev \ |
|
|
@ -33,11 +28,12 @@ fi |
|
|
|
|
|
|
|
## Installing PIL with our archive is safer. |
|
|
|
#pip install pil |
|
|
|
(cd /tmp && |
|
|
|
cp /var/git/archives/PIL-1.1.7.tar.gz . && |
|
|
|
tar xvzf PIL-1.1.7.tar.gz && |
|
|
|
cd PIL-1.1.7 && |
|
|
|
python setup.py install |
|
|
|
( |
|
|
|
cd /tmp && |
|
|
|
scp "$GIT_BASE"/archives/PIL-1.1.7.tar.gz . && |
|
|
|
tar xvzf PIL-1.1.7.tar.gz && |
|
|
|
cd PIL-1.1.7 && |
|
|
|
python setup.py install |
|
|
|
) |
|
|
|
|
|
|
|
pip install lxml pyparsing==1.5.7 psycopg2 pyyaml reportlab mako \ |
|
|
@ -50,11 +46,12 @@ pip install lxml pyparsing==1.5.7 psycopg2 pyyaml reportlab mako \ |
|
|
|
## Install pychart... from our repo as : |
|
|
|
## download link in PyPi is dead, |
|
|
|
## and gna.org was down recently |
|
|
|
( |
|
|
|
scp "$GIT_BASE/archives/PyChart-1.39.tar.gz" /tmp && |
|
|
|
cd /tmp && tar xvzf PyChart*.tar.gz && |
|
|
|
cd PyChart* && |
|
|
|
python setup.py install |
|
|
|
|
|
|
|
cp /var/git/archives/PyChart-1.39.tar.gz /tmp |
|
|
|
(cd /tmp ; tar xvzf PyChart*.tar.gz |
|
|
|
cd PyChart* |
|
|
|
python setup.py install |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -62,27 +59,29 @@ python setup.py install |
|
|
|
## we have some bug correction and custom features |
|
|
|
|
|
|
|
if ! [ -d "/opt/apps/ooop" ]; then |
|
|
|
( |
|
|
|
cd /opt/apps && |
|
|
|
git clone -s /var/git/0k/ooop.git && |
|
|
|
cd /opt/apps/ooop && |
|
|
|
git checkout 0k/prod/master && |
|
|
|
|
|
|
|
## beurk |
|
|
|
ln -sf /opt/apps/ooop/ooop.py /srv/virtualenv/default/lib/python2.7/ooop.py |
|
|
|
) |
|
|
|
( |
|
|
|
cd /opt/apps && |
|
|
|
git clone $GIT_CLONE_OPTIONS "$GIT_BASE/0k/ooop.git" && |
|
|
|
cd /opt/apps/ooop && |
|
|
|
git checkout 0k/prod/master && |
|
|
|
|
|
|
|
## beurk |
|
|
|
ln -sf /opt/apps/ooop/ooop.py /srv/virtualenv/default/lib/python2.7/ooop.py |
|
|
|
) |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
## |
|
|
|
## Install openobject-server from 0k GIT version |
|
|
|
## Install 0k-oe |
|
|
|
## |
|
|
|
|
|
|
|
( |
|
|
|
cd /opt/apps |
|
|
|
git clone -s /var/git/0k/openobject-server.git |
|
|
|
cd /opt/apps/openobject-server |
|
|
|
git checkout 6.1/0k/prod/master |
|
|
|
cd /opt/apps && |
|
|
|
git clone $GIT_CLONE_OPTIONS "$GIT_BASE"/0k/0k-oe.git && |
|
|
|
cd /opt/apps/0k-oe && |
|
|
|
git checkout "$GIT_CHECKOUT_REF" && |
|
|
|
git sub setup |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
adduser --system --home=/var/lib/openerp --group openerp |
|
|
@ -125,25 +124,6 @@ chown openerp /var/log/openerp -R |
|
|
|
#fi |
|
|
|
|
|
|
|
|
|
|
|
## install addons |
|
|
|
|
|
|
|
( |
|
|
|
mkdir -p /opt/apps/openobject-addons/ && |
|
|
|
cd /opt/apps/openobject-addons/ && |
|
|
|
git clone -s /var/git/0k/openobject-addons legacy && |
|
|
|
cd /opt/apps/openobject-addons/legacy && |
|
|
|
git checkout 6.1/0k/dev/master |
|
|
|
) |
|
|
|
|
|
|
|
## Install from 0k GIT version |
|
|
|
## because we have bug corrections and new features |
|
|
|
( |
|
|
|
cd /opt/apps && |
|
|
|
git clone -s /var/git/0k/openerp-web.git && |
|
|
|
cd /opt/apps/openerp-web && |
|
|
|
git checkout 6.1/0k/dev/master |
|
|
|
) |
|
|
|
|
|
|
|
## Install werkzeug from github last version |
|
|
|
## because last PyPi version is 8.4 and we need the 9.0+ |
|
|
|
|
|
|
@ -165,5 +145,3 @@ ln -sf /var/openerp-filestore filestore && |
|
|
|
cd /var/openerp-filestore && |
|
|
|
chown openerp . |
|
|
|
) |
|
|
|
|
|
|
|
|