You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
#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 \ libjpeg-dev libmysqlclient-dev -y --force-yes
set +eux source /srv/virtualenv/default/bin/activate set -eux
## install deps for PIL compilations ## from http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204
if ! [ -e "/usr/lib/libjpeg.so" ]; then apt-get build-dep python-imaging -y --force-yes ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/ ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/ ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/ fi
## Installing PIL with our archive is safer. #pip install pil ( 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 \ pywebdav==0.9.4 feedparser caldav pytz pydot \ python-dateutil==1.5 cherrypy==3.1.2 formencode==1.2.2 \ babel simplejson==2.0.9 python-openid mysql-python vatnumber \ mock unittest2 fudge docutils jinja2 gdata
## 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
)
## Install OOOP... from our git repo as: ## we have some bug correction and custom features
if ! [ -d "/opt/apps/ooop" ]; then ( 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 0k-oe ##
( 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
## XXXvlab: warning password in charm !! cp -i etc/openerp-server.conf /etc/ cp -i etc/init.d/openerp-server /etc/init.d/
chown openerp /etc/openerp-server.conf chmod 600 /etc/openerp-server.conf chown openerp /etc/init.d/openerp-server
update-rc.d openerp-server defaults
mkdir /var/log/openerp touch /var/log/openerp/openerp-server.log chown openerp /var/log/openerp -R
## Install add-ons ## make a better way for installing add-ons
#addons_path=/opt/apps/openobject-addons/0k #if ! [ -d "$addons_path" ]; then # mkdir -p $addons_path # for addons in $(/var/git/list-addons 0k/dev/master | grep ^0k); do # git clone -s /var/git/$addons /opt/apps/openobject-addons/${addons%.git} # (cd /opt/apps/openobject-addons/${addons%.git} # git checkout 6.1/0k/prod/master || # git checkout 0k/prod/master || # git checkout 0k/dev/master || # git checkout 6.1/simplee/prod/master || # git checkout simplee/prod/master || # git checkout simplee/dev/master || # git checkout master # ) # done #else # echo 'WARNING: skipping modules installation as directory was already existent !' #fi
## Install werkzeug from github last version ## because last PyPi version is 8.4 and we need the 9.0+
( cd /tmp && git clone https://github.com/mitsuhiko/werkzeug.git && cd werkzeug && python setup.py install )
## ## Linking with external filestore ! ##
( cd /opt/apps/0k-oe/openobject-server/openerp && ln -sf /var/openerp-filestore filestore && cd /var/openerp-filestore && chown openerp . )
|