Skip to content

Debian Installation TGZ

albanmartel edited this page May 6, 2014 · 1 revision

{{toc}}

Debian Installation TGZ without Python

Installation

Common installation

# SYNTHESE core installation
cd /opt
wget http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/synthese.tar.bz2
tar jxf synthese.tar.bz2
rm -f synthese.tar.bz2

# Standard installations
apt-get install libmysqlclient16
apt-get install supervisor
apt-get -y install libboost1.42

useradd synthese

# Getting configuration
cd /etc/supervisor/conf.d
wget https://extranet.rcsmobility.com/attachments/22509/synthese_supervisor.conf

# Creation of files
touch /var/log/synthese.log
chown synthese:users /var/log/synthese.log
chown -R synthese:users /var/lib/synthese

# Starting SYNTHESE
/etc/init.d/supervisor stop
/etc/init.d/supervisor start
supervisorctl restart all

MySQL (optional)

apt-get install mysql
cd /etc/supervisor/conf.d
wget https://extranet.rcsmobility.com/attachments/21576/synthese_proxy_supervisor.conf
cp /opt/synthese/lib/mysql_udf_plugin/libsynthese_mysql_udf.so /usr/lib64/mysql/plugin/synthese_mysql_udf.so
mysql -u root -h localhost mysql < /opt/synthese/share/synthese/mysql_udf_plugin/trigger_udf.sql

Configuration

MySQL

Edit /etc/supervisor/conf.d/synthese_supervisor.conf and replace the wollowing values :

  • check the SYNTHESE MySQL password
  • check the node_id (Get a new node id here)

Edit /etc/my.cnf and replace the following lines :

  • in [client] section,

    socket = /var/lib/mysql/mysql.sock
  • in [mysqld] section,

    socket = /var/lib/mysql/mysql.sock
    max_allowed_packet = 512M
  • in [mysqldump] section

    socket = /var/lib/mysql/mysql.sock

SQLite

Edit /etc/supervisor/conf.d/synthese_supervisor.conf and replace the wollowing values :

  • —dbconn sqlite://path=/var/lib/synthese/config.db3
  • check the node_id

Update

# SYNTHESE core installation
cd /opt
wget http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/synthese.tar.bz2
tar jxf synthese.tar.bz2
rm -f synthese.tar.bz2

# Restarting SYNTHESE
supervisorctl restart all

Installation of the release version containing debug informations

cd /opt
wget http://ci.rcsmobility.com/~build/synthese/lin/relwithdebinfo/trunk/latest/synthese.tar.bz2
tar jxf synthese.tar.bz2
rm synthese.tar.bz2

Activating core dumps (optional, useful to debug)

Core dumps are a valuable debug information for developers. It creates a memory dump of the SYNTHESE process at crash time allowing the developer to analyze where the process crashed.

As root, in /etc/security/limits.conf, add the line and reboot to activate it:

  • hard core unlimited

Then enter the commands:


mkdir -p /var/log/dumps
chmod -R 1777 /var/log/dumps
echo “/var/log/dumps/core.%e.%p.%h.%t” > /proc/sys/kernel/core_pattern

The dumps will be saved under the directory ‘/var/log/dumps/’. If you report a crash, you should attach the corresponding core to the ticket.

To make the configuration persistant add the following line to the file /etc/sysctl.conf:

  1. Own core file pattern…
    kernel.core_pattern=/var/log/dumps/core.%e.%p.%h.%t

If you are using the supervisor, you also have to update its default configuration:
echo “ulimit -c unlimited” >> /etc/default/supervisor

Python installation

Pre-requisites

OVH specific: the netstat command on the OVH servers doesn’t return the correct output unless run with root. To allow the synthese user to run it, add the following to the /etc/sudoers.d/synthese file:


Cmnd_Alias NETSTAT=/bin/netstat
Cmnd_Alias SYNTHESE=/usr/bin/python /opt/synthese/bin/synthese.py *

synthese ALL=(ALL) NOPASSWD: NETSTAT, SYNTHESE


(then, add netstat_cmd = ['sudo', 'netstat', '-pln'] option to your project config).
# Bootstrap dependencies
apt-get install curl python net-tools bzip2

First Install

To install the latest version (as root):


curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/install_synthese.py | python

If you want a specific revision, replace “latest” with the wanted revision (rNNN, see http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/?C=M;O=D).

Synthese is now installed. You can now create or run existing projects. See Projects Administration.

Updating Synthese

You can use the web interface: http://the-server/w/manager

From there, you can update Synthese with the “Update Synthese” button, and then click the “Update Project” button to restart the Synthese daemon and update the project.

Partial Updates

If you only want to update only part of Synthese, without touching the daemon:

Only packages


cd /tmp
rm -rf synthese
curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/synthese.tar.bz2 | tar jxf -
rm -rf /opt/synthese/share/synthese/packages
mv synthese/share/synthese/packages/ /opt/synthese/share/synthese/packages
rm -rf synthese

Packages and Python scripts


cd /tmp
rm -rf synthese
curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/synthese.tar.bz2 | tar jxf -
rm -rf /opt/synthese/share/synthese
mv synthese/share/synthese/ /opt/synthese/share/synthese/
rm -rf synthese

Install without running the the install script

curl -s http://ci.rcsmobility.com/~build/synthese/lin/release/trunk/latest/install_synthese.py | SYNTHESE_NO_SYSTEM_INSTALL=1 python

Developer instructions

See Synthesepy#package-command.

Clone this wiki locally