|
@ -3,15 +3,10 @@ |
|
|
set -eux # -x for verbose logging to juju debug-log |
|
|
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 \ |
|
|
apt-get install sudo libxml2-dev libxslt-dev libpq-dev libyaml-dev \ |
|
|
zlib1g-dev libfreetype6-dev \ |
|
|
zlib1g-dev libfreetype6-dev \ |
|
@ -33,8 +28,9 @@ fi |
|
|
|
|
|
|
|
|
## Installing PIL with our archive is safer. |
|
|
## Installing PIL with our archive is safer. |
|
|
#pip install pil |
|
|
#pip install pil |
|
|
(cd /tmp && |
|
|
|
|
|
cp /var/git/archives/PIL-1.1.7.tar.gz . && |
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
cd /tmp && |
|
|
|
|
|
scp "$GIT_BASE"/archives/PIL-1.1.7.tar.gz . && |
|
|
tar xvzf PIL-1.1.7.tar.gz && |
|
|
tar xvzf PIL-1.1.7.tar.gz && |
|
|
cd PIL-1.1.7 && |
|
|
cd PIL-1.1.7 && |
|
|
python setup.py install |
|
|
python setup.py install |
|
@ -50,11 +46,12 @@ pip install lxml pyparsing==1.5.7 psycopg2 pyyaml reportlab mako \ |
|
|
## Install pychart... from our repo as : |
|
|
## Install pychart... from our repo as : |
|
|
## download link in PyPi is dead, |
|
|
## download link in PyPi is dead, |
|
|
## and gna.org was down recently |
|
|
## and gna.org was down recently |
|
|
|
|
|
|
|
|
cp /var/git/archives/PyChart-1.39.tar.gz /tmp |
|
|
|
|
|
(cd /tmp ; tar xvzf PyChart*.tar.gz |
|
|
|
|
|
cd PyChart* |
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
scp "$GIT_BASE/archives/PyChart-1.39.tar.gz" /tmp && |
|
|
|
|
|
cd /tmp && tar xvzf PyChart*.tar.gz && |
|
|
|
|
|
cd PyChart* && |
|
|
python setup.py install |
|
|
python setup.py install |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -64,7 +61,7 @@ python setup.py install |
|
|
if ! [ -d "/opt/apps/ooop" ]; then |
|
|
if ! [ -d "/opt/apps/ooop" ]; then |
|
|
( |
|
|
( |
|
|
cd /opt/apps && |
|
|
cd /opt/apps && |
|
|
git clone -s /var/git/0k/ooop.git && |
|
|
|
|
|
|
|
|
git clone $GIT_CLONE_OPTIONS "$GIT_BASE/0k/ooop.git" && |
|
|
cd /opt/apps/ooop && |
|
|
cd /opt/apps/ooop && |
|
|
git checkout 0k/prod/master && |
|
|
git checkout 0k/prod/master && |
|
|
|
|
|
|
|
@ -75,14 +72,16 @@ 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 |
|
|
adduser --system --home=/var/lib/openerp --group openerp |
|
@ -125,25 +124,6 @@ chown openerp /var/log/openerp -R |
|
|
#fi |
|
|
#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 |
|
|
## Install werkzeug from github last version |
|
|
## because last PyPi version is 8.4 and we need the 9.0+ |
|
|
## 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 && |
|
|
cd /var/openerp-filestore && |
|
|
chown openerp . |
|
|
chown openerp . |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|