- requirements - CentOS 6 - outgoing internet access (port 80) - Forge svn repository access - installation instructions - LibIGCM AMQP agent installation - see CNClient/README - Broker installation - see Broker/README - Supervisor installation - add user in /etc/passwd - adduser -m -d /home/cssupervisor -s /sbin/nologin cssupervisor - create directories - mkdir /var/log/cssupervisor - mkdir /var/lib/cssupervisor - set owner - chown -R cssupervisor /var/log/cssupervisor - chown -R cssupervisor /var/lib/cssupervisor - copy startup script below in /etc/init/cssupervisor.conf - description "Climate Simulation Supervisor" start on runlevel [2345] stop on runlevel [016] chdir /home/cssupervisor # debug #script # exec >>/tmp/deb 2>&1 # exec sudo -u cssupervisor /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch #end script #need upstart 1.4+ (for gid/uid support) #exec sudo -u cssupervisor /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch exec su -s /bin/sh -c 'exec "$0" "$@"' cssupervisor -- /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch respawn - reload upstart - initctl reload-configuration - check if EPEL repository is configured, if not, do steps below - for CENTOS 6 (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/) - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm - rpm -ivh epel-release-6-8.noarch.rpm - Python installation - if python version < 2.6, do - yum install python26 - yum install python26-devel - yum install python-devel - yum install sqlite - yum install sqlite-devel - yum install python-sqlite - Virtualenv installation - mkdir /opt/src - cd /opt/src/ - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz - tar xzvf virtualenv-1.10.1.tar.gz - rm virtualenv-1.10.1.tar.gz - cd /opt/src/virtualenv-1.10.1 - check if python use the 2.6 version with - python -V - yum install python-pip - /usr/bin/python virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve - source /opt/python2.6_ve/bin/activate - Python PYPI libraries installation - procedure (as root) - cd /opt - cd python2.6_ve/ - cd bin - source activate - pip install - packages list - pika # RabbitMQ client library - networkx # graph library - #pip amqplib # not used for now - Prodiguer library installation - dependencies (PYPI packages) - - yum install gcc - yum install postgresql-devel - pip install psycopg2 - doesn't work (Error: pg_config executable not found) - solution is - yum install python-psycopg2.x86_64 - yum install libpqxx-devel - yum install python-devel - pip install psycopg2 - works - pip install Sqlalchemy - pip install elixir - pip install simplejson - notes - some Elixir/SQLAlchemy versions are not compatible. - to be sure, you can use version below which are compatible - Elixir-0.7.1-py2.6.egg-info - SQLAlchemy-0.7.8-py2.6.egg-info - to install specific version with pip, do - pip install SQLAlchemy==0.7.8 - Prodiguer package - mkdir -p /opt/supervisor/prodiguer_lib - cd /opt/supervisor/prodiguer_lib - svn co svn+ssh://@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src - Supervisor python script installation - mkdir /opt/supervisor/local_db - mkdir /opt/supervisor/log - svn co svn+ssh://@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring - edit "watch" script and edit line below accordingly - sys.path.append("/src") - smon/repo_io.py - sys.path.append("/src") - usage (as root) - start - start cssupervisor - stop - stop cssupervisor - status - status cssupervisor - unit test - TODO - integration test - connectivity test - run command below on supervisor - telnet pp-db-dev.private.ipsl.fr 5432 # vim: set ts=4 :