1 | - requirements |
---|
2 | - CentOS 6 |
---|
3 | - outgoing internet access (port 80) |
---|
4 | - Forge svn repository access |
---|
5 | - installation instructions |
---|
6 | - LibIGCM AMQP agent installation |
---|
7 | - see CNClient/README |
---|
8 | - Broker installation |
---|
9 | - see Broker/README |
---|
10 | - Supervisor installation |
---|
11 | - add user in /etc/passwd |
---|
12 | - adduser -m -d /home/cssupervisor -s /sbin/nologin cssupervisor |
---|
13 | - create directories |
---|
14 | - mkdir /var/log/cssupervisor |
---|
15 | - mkdir /var/lib/cssupervisor |
---|
16 | - set owner |
---|
17 | - chown -R cssupervisor /var/log/cssupervisor |
---|
18 | - chown -R cssupervisor /var/lib/cssupervisor |
---|
19 | - copy startup script below in /etc/init/cssupervisor.conf |
---|
20 | - |
---|
21 | description "Climate Simulation Supervisor" |
---|
22 | |
---|
23 | start on runlevel [2345] |
---|
24 | stop on runlevel [016] |
---|
25 | |
---|
26 | chdir /home/cssupervisor |
---|
27 | |
---|
28 | # debug |
---|
29 | #script |
---|
30 | # exec >>/tmp/deb 2>&1 |
---|
31 | # exec sudo -u cssupervisor /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch |
---|
32 | #end script |
---|
33 | |
---|
34 | #need upstart 1.4+ (for gid/uid support) |
---|
35 | #exec sudo -u cssupervisor /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch |
---|
36 | |
---|
37 | exec su -s /bin/sh -c 'exec "$0" "$@"' cssupervisor -- /opt/python2.6_ve/bin/python /opt/supervisor/Monitoring/Watch/watch |
---|
38 | |
---|
39 | respawn |
---|
40 | - reload upstart |
---|
41 | - initctl reload-configuration |
---|
42 | - check if EPEL repository is configured, if not, do steps below |
---|
43 | - for CENTOS 6 |
---|
44 | (from http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/) |
---|
45 | - wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
---|
46 | - rpm -ivh epel-release-6-8.noarch.rpm |
---|
47 | - Python installation |
---|
48 | - if python version < 2.6, do |
---|
49 | - yum install python26 |
---|
50 | - yum install python26-devel |
---|
51 | - yum install python-devel |
---|
52 | - yum install sqlite |
---|
53 | - yum install sqlite-devel |
---|
54 | - yum install python-sqlite |
---|
55 | - Virtualenv installation |
---|
56 | - mkdir /opt/src |
---|
57 | - cd /opt/src/ |
---|
58 | - wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz |
---|
59 | - tar xzvf virtualenv-1.10.1.tar.gz |
---|
60 | - rm virtualenv-1.10.1.tar.gz |
---|
61 | - cd /opt/src/virtualenv-1.10.1 |
---|
62 | - check if python use the 2.6 version with |
---|
63 | - python -V |
---|
64 | - yum install python-pip |
---|
65 | - /usr/bin/python virtualenv.py --distribute --unzip-setuptools /opt/python2.6_ve |
---|
66 | - source /opt/python2.6_ve/bin/activate |
---|
67 | - Python PYPI libraries installation |
---|
68 | - procedure (as root) |
---|
69 | - cd /opt |
---|
70 | - cd python2.6_ve/ |
---|
71 | - cd bin |
---|
72 | - source activate |
---|
73 | - pip install <package name> |
---|
74 | - packages list |
---|
75 | - pika # RabbitMQ client library |
---|
76 | - networkx # graph library |
---|
77 | - #pip amqplib # not used for now |
---|
78 | - Prodiguer library installation |
---|
79 | - dependencies (PYPI packages) |
---|
80 | - |
---|
81 | - yum install gcc |
---|
82 | - yum install postgresql-devel |
---|
83 | - pip install psycopg2 |
---|
84 | - doesn't work (Error: pg_config executable not found) |
---|
85 | - solution is |
---|
86 | - yum install python-psycopg2.x86_64 |
---|
87 | - yum install libpqxx-devel |
---|
88 | - yum install python-devel |
---|
89 | - pip install psycopg2 |
---|
90 | - works |
---|
91 | - pip install Sqlalchemy |
---|
92 | - pip install elixir |
---|
93 | - pip install simplejson |
---|
94 | - notes |
---|
95 | - some Elixir/SQLAlchemy versions are not compatible. |
---|
96 | - to be sure, you can use version below which are compatible |
---|
97 | - Elixir-0.7.1-py2.6.egg-info |
---|
98 | - SQLAlchemy-0.7.8-py2.6.egg-info |
---|
99 | - to install specific version with pip, do |
---|
100 | - pip install SQLAlchemy==0.7.8 |
---|
101 | - Prodiguer package |
---|
102 | - mkdir -p /opt/supervisor/prodiguer_lib |
---|
103 | - cd /opt/supervisor/prodiguer_lib |
---|
104 | - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/prodiguer/svn/sw/src/python/trunk/prodiguer_shared/src |
---|
105 | - Supervisor python script installation |
---|
106 | - mkdir /opt/supervisor/local_db |
---|
107 | - mkdir /opt/supervisor/log |
---|
108 | - svn co svn+ssh://<login here>@forge.ipsl.jussieu.fr/ipsl/forge/projets/libigcm/svn/trunk/Monitoring |
---|
109 | - edit "watch" script and edit line below accordingly |
---|
110 | - sys.path.append("<snapshot_dir>/src") |
---|
111 | - smon/repo_io.py |
---|
112 | - sys.path.append("<snapshot_dir>/src") |
---|
113 | - usage (as root) |
---|
114 | - start |
---|
115 | - start cssupervisor |
---|
116 | - stop |
---|
117 | - stop cssupervisor |
---|
118 | - status |
---|
119 | - status cssupervisor |
---|
120 | - unit test |
---|
121 | - TODO |
---|
122 | - integration test |
---|
123 | - connectivity test |
---|
124 | - run command below on supervisor |
---|
125 | - telnet pp-db-dev.private.ipsl.fr 5432 |
---|
126 | # vim: set ts=4 : |
---|