SFT SERVER INSTALLATION (MONBOX):
- Install latest LCG MONBOX (using YAIM)
- Create
/etc/apt/sources.list.d/sft.list
file with the following line:
rpm http://grid-deployment.web.cern.ch/grid-deployment/gis/sft2 apt sft
- Install SFT server using the following commands
apt-get update
apt-get install perl-DBD-MySQL=2.1021.1-3lcg MySQL-python=0.9.1.1-6lcg mod_ssl lcg-sft-server
- Create archiver databases:
$ mysql -p
type your and then the following commands under MySQL shell:
create database latestProducer;
create database dbProducer;
grant all privileges on latestProducer.* to 'rgma'@'localhost' identified by 'test';
grant all privileges on latestProducer.* to 'rgma'@'%' identified by 'test';
grant all privileges on dbProducer.* to 'rgma'@'localhost' identified by 'test';
grant all privileges on dbProducer.* to 'rgma'@'%' identified by 'test';
[MASTER only]
grant replication slave on *.* to 'repl'@'%.your.domain' identified by 'rep_password';
[end of MASTER only]
flush privileges;
- Create SFT tables (only if running in other grid than LCG):
cd /opt/lcg/sft/web/
. tablesV0_4.sh
- Configure archiver: edit
/opt/lcg/etc/lcg-archiver.conf
and change the relevant lines as following:
tables = TestData_v0_2 TestDef_v0_2:LATEST TestEnv_v0_2 GocSite_v0_4:LATEST GocNode_v0_4:LATEST
db_user = rgma
db_passwd = test
db_latest = jdbc:mysql://localhost/latestProducer
db_hist= jdbc:mysql://localhost/dbProducer
- On the MASTER:
- Create a snapshot of the MySQL data directory:
cd /var/lib
tar cf /tmp/mysql-snapshot.tar mysql
- Copy the snapshot to safe place or any SLAVE machine and after finishing MASTER configuration follow instructions for SLAVE on the slave machine.
- Enable binary logging in mysql DB by editing /etc/my.cnf and making sure the following lines are present (create the file if it does not exist):
[mysqld]
log-bin=mysql-bin
server-id=1
- Restart the
mysql
daemon:
service mysql restart
- (re)start archiver:
service lcg-archiver restart
- Enable passwordless (key based) ssh authentication for root from any SLAVE machines.
- Create /etc/rsyncd.conf file with the following contents:
[info]
path = /opt/lcg/sft/web/info
comment = SFT2 logs directory
- On the SLAVE
- Stop the mysql daemon:
service mysql stop
- Unpack MASTER database snapshot:
cd /var/lib
tar xf <dir_with_snapshot>/mysql-snapshot.tar
- Set server ID for MySQL. Note: server ID must be different from Master's ID (1) and all other SLAVE IDs. Edit
/etc/my.cnf
and make sure the following lines are there:
[mysqld]
server-id=2
- Start the mysql daemon:
service mysql start
- Configure slave function in MySQL:
mysql -p
<root password>
in MySQL shell:
change master to master_host='MASTER-hostname', master_user='repl', master_password='rep_password',
master_log_file='mysql-bin.001', master_log_pos=0;
start slave;
- Set up a passwordless ssh authentication from SLAVE to MASTER.
- Add the following line to
/opt/lcg/sft/web/sft.conf
file:
sftMasterServer="MASTER-hostname"
- Setup a cron job that synchronises info directory with MASTER
crontab -e
*/5 * * * * /opt/lcg/sft/web/syncInfo.sh > /opt/lcg/var/log/lcg-syncInfo.log 2>&1
-- Main.jnovak - 17 Aug 2005
Topic revision: r4 - 2005-08-18
- unknown