Skip to content
Snippets Groups Projects
Commit 936ffcfc authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-2827: removed obsolete lofar-triggerservices

parent 721814e5
No related branches found
No related tags found
1 merge request!1192TMSS-2827
This commit is part of merge request !1192. Comments created here will be created in the context of that merge request.
Showing
with 0 additions and 1230 deletions
# This docker needs a ./LOFAR/ directory with the software stack to build.
#
# For a local mom database, a momdb_init.sql is required.
# For momqueryservice, a mom.ini has to be present
# For mom-otdb-adapter, a custom config directory has to be present
#
# Further, startup.sh as an entry point for the docker
#
#
# Furthermore, a hostname should be used by the container which CMake can use to
# lookup the corresponding variants file. This is done by running the container
# with:
# -h lofarbuildandtestdocker
#
#
# The rest interface on port 8000 has to be exposed in order to access it on localhost.
# Complete usage example:
#
# docker build -t lofarbuildandtestdocker .
# docker run -h lofarbuildandtestdocker -it -p 8000:8000 -p 5672:5672 lofarbuildandtestdocker:latest
# Note: centos/systemd depends on centos7
FROM centos/systemd
MAINTAINER "Joern Kuensemoeller" - This is based on Ruud Beukema's work
RUN systemctl enable dbus.service
# -------------------------------------------------------------------------------------
# Install packages required by Ansible
RUN yum -y install python-yaml python-jinja2 git
# -------------------------------------------------------------------------------------
# Download Ansible and set paths
RUN mkdir -p /opt/ansible
RUN git clone http://github.com/ansible/ansible.git /opt/ansible
ENV PATH /opt/ansible/bin:/sbin:/usr/sbin:/usr/bin
ENV ANSIBLE_LIBRARY /opt/ansible/library
ENV PYTHONPATH /opt/ansible/lib:$PYTHON_PATH
# Place LOFAR stack in Container for RT-Task10875, so ansible can build packages
COPY LOFAR /opt/LOFAR
COPY conf/momdb_init.sql /
COPY edit_these_files/mom.ini /root/.lofar/dbcredentials/
COPY conf/build.ini /
# Copy Apache configuration files
COPY conf/wsgi.conf /
# Inject Ansible playbook and run it
RUN mkdir -p /etc/ansible
COPY ansible/roles /etc/ansible
COPY ansible/hosts /etc/ansible
COPY ansible/bld.yaml /etc/ansible
RUN ansible-playbook -v /etc/ansible/bld.yaml -c local
# Try to reduce the image size
RUN yum clean all
# Give user SSH and local access (with set locale)
EXPOSE 22 3000
EXPOSE 8000
EXPOSE 5672
# Copy startup script as entry point (sets up queues and starts services)
COPY conf/startup.sh /
CMD /bin/bash /startup.sh
THIS IS IMPORTANT!
------------------
Before building the Docker image you have to modify the user and password in
the file edit_these_files/mom.ini! Please ask the LOFAR software support team
to provide you with proper user credentials. Please direct your inquiry to
<softwaresupport@astron.nl>.
Be aware that sharing your Docker image will result in sharing your MoM
credentials!
- hosts: local
user: root
roles:
- buildhostcentos7
[local]
localhost
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
---
# defaults file for buildhostcentos7
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
-----BEGIN RSA PRIVATE KEY-----
MIIEoQIBAAKCAQEAvjh5nLoHimZ8ZZIWEdFLaS6sfA5ZjTy+7WY+qNCFPhWxThDr
bCAuNRD4tkQoUGwZzlJrLVkF0ITq5rLz0NNRCqVBOt9NJfhVkybjnNxyvkMaIUUF
AnXGJ1+izRwB/PIC8yRS9qYu+in+Y/TymvjxtV56sLgvkw2O+5mX6juc5x0y+2qU
fRLCaSHfd3k7cGyBvcpNoHTiRMPdrXhkuMsANLoMvbu6VSaXwOw4nI8NeiURuhGL
Thq27lDJk9MgjqYu3aNGGIwC2Pr9y/iE2S80VTwNZi1Mc8uc8nHH4bFuEECMayFt
Qc2Yx9CTIOhmLrRZN8IfIbLpTHUGtx7NxE0D4QIBIwKCAQBBN+8ua6rQXab+QLcc
DT5tNJLotHZ5kSuEmBV7tTT/V+UE0pnb7cazG8L8qadsB85VXhYeLSaQopmuLrn+
dFZMyvHLCrtdebbwn55+7H8cqUrJlAG3s1nhnSHf7Fhz+zQ2GxUhXYxzBxVkGXfA
GtaHU5fHj5tIXGuJdn06XZThhcLBiXIUfaIN97bCoAZ481TafxwXNZi+d037JP/t
7tzP6OGJbdqypVEcxP1IbWjDvb8rDHDZcBEexWoy6JB1ru8m52lucYau2sVYadt/
WMVJpH1vJZJjbgGWn0XXlZrgjWQZV1tPA1qdD9sg6k0RuzGjiNZ01VsN1fx83ib9
edxLAoGBAPBEwraju/A0xJ4g3If1chmplX9CRDeL2WzzQIH1Kp+e99xs+uweDNb6
oOuolrqQ1pqG7fSRqrgvTo+4zWZGDEd2skvWpruaRgcIrt27wZ1vePS5HQcVFdy+
0slVZRStYKkNAZgjiQVCz5TFMgr3b3O0l9OIs2Ceobpzr5kjpke1AoGBAMqs1vvI
PbmLoBb0SfXvigXsQhHFKa04DnfzC/hNp7HiBZ5/6xBYt5QyYhTguTauZQmgP02X
k8zP7RlxNL+cBliKzga/xNPAtuHWv5GUqqzO+KrTjVpnX5Dm+R2CLVWpQ39pi7V3
0CCQPWnmYE/DjZS7hdoZkT8azdaB50LoA079AoGAdLOvCEDmQXi3RX2s8ZR5P6ok
CpyHiLGkHvnO4Ald2IBpwtXY9le9F/YTpamoS/01CTo5EGQCdrfkVG+0OP1zra6u
X1mhcRBrJ/znOH/EcQpCEHcrWzYgj8pmYcpkS98u8wZRO0R1wLoNDb7dys/0TiSE
Qix0YiEp+3oE1Vp1VgcCgYEAivotBGwNEYRQhMTFAGm9uusl/Y6C+m+U5IlnSy3v
VWfJVr4dh41KrsN2dLdabqN4e6EVdwjaYI6T9DBer0ZqwF8uMIN/pyUPsM3FMKB1
CMhwABwJKAxeycLz9vottxT7FYoz6iZFkqwM2ucdeIYX8PWdnN5U+BJhQqI4LeDs
U2sCgYA94BGiA+Smqp2QZ7o2c5X7QZ+rd3iPs2Wn5owoZJJCISSzSV3tQ+YakZC6
oi4IXq5XpAqni4gHADqpZUDSGxoEnaznKFJnrxwLsCwhBaVEfR3aLEOK3ojg48sr
laFEjoXmsJEepp5cOkQOtXrKIhVu5e4O3VW1/60+80OGd8aAAg==
-----END RSA PRIVATE KEY-----
# This is a config file for the Zabbix agent daemon (Unix)
# To get more information about Zabbix, visit http://www.zabbix.com
############ GENERAL PARAMETERS #################
### Option: PidFile
# Name of PID file.
#
# Mandatory: no
# Default:
PidFile=/run/zabbix/zabbix_agentd.pid
### Option: LogFile
# Name of log file.
# If not set, syslog is used.
#
# Mandatory: no
# Default:
# LogFile=
LogFile=/var/log/zabbix/zabbix_agentd.log
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
LogFileSize=0
### Option: DebugLevel
# Specifies debug level
# 0 - no debug
# 1 - critical information
# 2 - error information
# 3 - warnings
# 4 - for debugging (produces lots of information)
#
# Mandatory: no
# Range: 0-4
# Default:
# DebugLevel=3
### Option: SourceIP
# Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
# SourceIP=
### Option: EnableRemoteCommands
# Whether remote commands from Zabbix server are allowed.
# 0 - not allowed
# 1 - allowed
#
# Mandatory: no
# Default:
# EnableRemoteCommands=0
### Option: LogRemoteCommands
# Enable logging of executed shell commands as warnings.
# 0 - disabled
# 1 - enabled
#
# Mandatory: no
# Default:
# LogRemoteCommands=0
##### Passive checks related
### Option: Server
# List of comma delimited IP addresses (or hostnames) of Zabbix servers.
# Incoming connections will be accepted only from the hosts listed here.
# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server=
Server=10.149.64.103
### Option: ListenPort
# Agent will listen on this port for connections from the server.
#
# Mandatory: no
# Range: 1024-32767
# Default:
# ListenPort=10050
### Option: ListenIP
# List of comma delimited IP addresses that the agent should listen on.
# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
#
# Mandatory: no
# Default:
# ListenIP=0.0.0.0
### Option: StartAgents
# Number of pre-forked instances of zabbix_agentd that process passive checks.
# If set to 0, disables passive checks and the agent will not listen on any TCP port.
#
# Mandatory: no
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
### Option: ServerActive
# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
# If port is not specified, default port is used.
# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
# If port is not specified, square brackets for IPv6 addresses are optional.
# If this parameter is not specified, active checks are disabled.
# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=
ServerActive=10.149.64.103
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
# Value is acquired from HostnameItem if undefined.
#
# Mandatory: no
# Default:
# Hostname=
Hostname=Zabbix server
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
#
# Mandatory: no
# Default:
# HostnameItem=system.hostname
### Option: HostMetadata
# Optional parameter that defines host metadata.
# Host metadata is used at host auto-registration process.
# An agent will issue an error and not start if the value is over limit of 255 characters.
# If not defined, value will be acquired from HostMetadataItem.
#
# Mandatory: no
# Range: 0-255 characters
# Default:
# HostMetadata=
### Option: HostMetadataItem
# Optional parameter that defines an item used for getting host metadata.
# Host metadata is used at host auto-registration process.
# During an auto-registration request an agent will log a warning message if
# the value returned by specified item is over limit of 255 characters.
# This option is only used when HostMetadata is not defined.
#
# Mandatory: no
# Default:
# HostMetadataItem=
### Option: RefreshActiveChecks
# How often list of active checks is refreshed, in seconds.
#
# Mandatory: no
# Range: 60-3600
# Default:
# RefreshActiveChecks=120
### Option: BufferSend
# Do not keep data longer than N seconds in buffer.
#
# Mandatory: no
# Range: 1-3600
# Default:
# BufferSend=5
### Option: BufferSize
# Maximum number of values in a memory buffer. The agent will send
# all collected data to Zabbix Server or Proxy if the buffer is full.
#
# Mandatory: no
# Range: 2-65535
# Default:
# BufferSize=100
### Option: MaxLinesPerSecond
# Maximum number of new lines the agent will send per second to Zabbix Server
# or Proxy processing 'log' and 'logrt' active checks.
# The provided value will be overridden by the parameter 'maxlines',
# provided in 'log' or 'logrt' item keys.
#
# Mandatory: no
# Range: 1-1000
# Default:
# MaxLinesPerSecond=100
############ ADVANCED PARAMETERS #################
### Option: Alias
# Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one.
# Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed.
# Different Alias keys may reference the same item key.
# For example, to retrieve the ID of user 'zabbix':
# Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1]
# Now shorthand key zabbix.userid may be used to retrieve data.
# Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
#
# Mandatory: no
# Range:
# Default:
### Option: Timeout
# Spend no more than Timeout seconds on processing
#
# Mandatory: no
# Range: 1-30
# Default:
# Timeout=3
Timeout=5
### Option: AllowRoot
# Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
# 0 - do not allow
# 1 - allow
#
# Mandatory: no
# Default:
# AllowRoot=0
### Option: Include
# You may include individual files or all files in a directory in the configuration file.
# Installing Zabbix will create include directory in /etc, unless modified during the compile time.
#
# Mandatory: no
# Default:
# Include=
# Include=/etc/zabbix_agentd.userparams.conf
# Include=/etc/zabbix_agentd.conf.d/
####### USER-DEFINED MONITORED PARAMETERS #######
### Option: UnsafeUserParameters
# Allow all characters to be passed in arguments to user-defined parameters.
# 0 - do not allow
# 1 - allow
#
# Mandatory: no
# Range: 0-1
# Default:
# UnsafeUserParameters=0
### Option: UserParameter
# User-defined parameter to monitor. There can be several user-defined parameters.
# Format: UserParameter=<key>,<shell command>
# See 'zabbix_agentd' directory for examples.
#
# Mandatory: no
# Default:
# UserParameter=
####### LOADABLE MODULES #######
### Option: LoadModulePath
# Full path to location of agent modules.
# Default depends on compilation options.
#
# Mandatory: no
# Default:
# LoadModulePath=${libdir}/modules
### Option: LoadModule
# Module to load at agent startup. Modules are used to extend functionality of the agent.
# Format: LoadModule=<module.so>
# The modules must be located in directory specified by LoadModulePath.
# It is allowed to include multiple LoadModule parameters.
#
# Mandatory: no
# Default:
# LoadModule=
#
UserParameter=ntp.offset,/usr/sbin/ntpdate -d -p3 -t2 cn001 2> /dev/null | grep ^offs |cut -d" " -f2
---
# handlers file for buildhostcentos7
- name: restart ntpd
service: name=ntpd state=restarted
- name: restart ypbind
service: name=ypbind state=restarted
- name: restart zabbix
service: name=zabbix-agent state=restarted
- name: restart sshd
service: name=sshd state=restarted
- name: restart rsyslog
service: name=rsyslog state=restarted
- name: restart autofs
service: name=autofs state=restarted
- name: restart postfix
service: name=postfix state=restarted
galaxy_info:
author: your name
description:
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)
min_ansible_version: 1.2
# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If travis integration is cofigured, only notification for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:
#
# Below are all platforms currently available. Just uncomment
# the ones that apply to your role. If you don't see your
# platform on this list, let us know and we'll get it added!
#
#platforms:
#- name: EL
# versions:
# - all
# - 5
# - 6
# - 7
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: Solaris
# versions:
# - all
# - 10
# - 11.0
# - 11.1
# - 11.2
# - 11.3
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - 21
# - 22
# - 23
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
#- name: IOS
# versions:
# - all
# - any
#- name: SmartOS
# versions:
# - all
# - any
#- name: eos
# versions:
# - all
# - Any
#- name: Windows
# versions:
# - all
# - 2012R2
#- name: Amazon
# versions:
# - all
# - 2013.03
# - 2013.09
#- name: GenericBSD
# versions:
# - all
# - any
#- name: Junos
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 10.0
# - 10.1
# - 10.2
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
# - 9.3
#- name: Ubuntu
# versions:
# - all
# - lucid
# - maverick
# - natty
# - oneiric
# - precise
# - quantal
# - raring
# - saucy
# - trusty
# - utopic
# - vivid
# - wily
# - xenial
#- name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
#- name: GenericLinux
# versions:
# - all
# - any
#- name: NXOS
# versions:
# - all
# - any
#- name: Debian
# versions:
# - all
# - etch
# - jessie
# - lenny
# - sid
# - squeeze
# - stretch
# - wheezy
galaxy_tags: []
# List tags for your role here, one per line. A tag is
# a keyword that describes and categorizes the role.
# Users find roles by searching for tags. Be sure to
# remove the '[]' above if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of
# alphanumeric characters. Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
\ No newline at end of file
---
# tasks file for buildhostcentos7
# 2017-05-23 Ruud Beukema
# 2017-06-22 Joern Kuensemoeller
# 2017-07-18 Thomas Jürges
- name: Install group lofarbuild
group: name=lofarbuild
- name: Install user lofarbuild
user: name=lofarbuild shell=/bin/bash group="lofarbuild" generate_ssh_key=yes
- name: Install EPEL repo.
yum:
name: http://mirror.nl.leaseweb.net/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
state: present
- name: Import EPEL GPG key.
rpm_key:
key: /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
state: present
- name: Install packages
yum: pkg={{item}} state=installed
with_items:
- atop
- autoconf
- autogen
- bison
- bison
- blas
- blas-devel
- boost
- boost-devel
- boost-python
- cfitsio
- cfitsio-devel
- cmake
- cmake-gui
- docker
- fabric
- fftw
- fftw-devel
- flex
- gcc-c++
- gcc-gfortran
- gettext
- git
- hdf5
- hdf5-devel
- hdparm
- lapack
- lapack-devel
- libpqxx-devel
- libxml++-devel
- log4cplus-devel
- make
- mariadb
- mariadb-server
- mod_wsgi
- nano
- ncurses
- ncurses-devel
- ntp
- numpy
- boost-python
- openblas-devel
- postfix
- python2-mock
- python-devel
- python-ldap
- python-lxml
- python-pip
- python-qpid
- python-psycopg2
- qpid-cpp-server
- qpid-cpp-server-linearstore
- qpid-cpp-client
- qpid-tools
- qpid-cpp-client-devel
- readline
- readline-devel
- supervisor
- wcslib
- wcslib-devel
- wget
- xterm
- ypbind
- yp-tools
- zabbix22-agent
tags: packages
- name: Stop SELINUX
selinux: state=disabled
- name: Install PyPi packages
pip: name={{item}}
with_items:
- django
- djangorestframework
- djangorestframework-xml
- testing.mysqld
- xmljson
- mysql-connector==2.1.4
- django-auth-ldap
tags: packages
- name: get UnitTest++
get_url: url=https://github.com/unittest-cpp/unittest-cpp/archive/v1.6.1.tar.gz dest=/opt
tags:
- unittest++
# Install Postgres
- name: Create /opt/Postgresl
file: path=/opt/Postgresql owner=lofarbuild group=lofarbuild state=directory mode=0775
- name: download Postgres 9.6 repository rpm
get_url: url=https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm dest=/opt/Postgresql/pgdg-centos96-9.6-3.noarch.rpm mode=644
- name: add Postgres repository
yum: name=/opt/Postgresql/pgdg-centos96-9.6-3.noarch.rpm state=present
- name: install Postgres 9.6
yum: name='@postgresqldbserver96' state=present
- name: Postgres initdb
shell: /usr/pgsql-9.6/bin/initdb -D /var/lib/pgsql/9.6/data/
become: yes
become_user: postgres
become_method: su
- name: Changing config for OTDB
shell: echo {{item}} >> /var/lib/pgsql/9.6/data/postgresql.conf
with_items:
- "backslash_quote = on"
- "standard_conforming_strings = off"
- name: Starting postgres
shell: "(/usr/pgsql-9.6/bin/Postgres >/dev/null 2>&1 &)"
async: 300
poll: 0
become: yes
become_user: postgres
become_method: su
# todo: times out, need to listen on the dockeri, not the host
- wait_for:
port: 5432
delay: 5
timeout: 10
ignore_errors: yes
# RA
- name: add Postgres user for RA
shell: /usr/pgsql-9.6/bin/pg_ctl -D /var/lib/pgsql/9.6/data/ start
become: yes
become_user: postgres
become_method: su
- name: create Postgres role for RA
shell: /usr/pgsql-9.6/bin/psql -c "CREATE USER resourceassignment WITH SUPERUSER"
become: yes
become_user: postgres
become_method: su
- name: populate Postgres DB for RA
shell: |
cd /opt/LOFAR/SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/;
/usr/pgsql-9.6/bin/psql -f create_and_populate_database.sql
become: yes
become_user: postgres
become_method: su
# OTDB
- name: populate otdb db
shell: |
cd /opt/LOFAR/SAS/OTDB/sql;
psql -U postgres -f create_OTDB.sql -v ON_ERROR_STOP=1
become: yes
become_user: postgres
become_method: su
#ignore_errors: yes
# Setup Mysql
- name: Change shell for user mysql
shell: chsh -s /bin/bash mysql
- name: init Mysql db
shell: |
mysql_install_db
become: yes
become_user: mysql
become_method: su
- name: Starting Mysql
shell: /usr/bin/mysqld_safe --datadir='/var/lib/mysql' &
async: 300
poll: 0
become: yes
become_user: mysql
become_method: su
# todo: times out, need to listen on the docker, not the host
- wait_for:
port: 3306
delay: 5
timeout: 10
ignore_errors: yes
# MoM
- name: populate mom db
shell: |
mysql -u root < /momdb_init.sql
become: yes
become_user: mysql
become_method: su
# MoM - OTDB adapter (why is that supposed to run as tomcat ???)
- name: create user tomcat
shell: adduser tomcat && chsh -s /bin/bash tomcat
- name: create /opt/tomcat
file: path=/opt/tomcat/ owner=tomcat group=tomcat state=directory mode=0775
- name: get mom otdb adapter
get_url: url=https://support.astron.nl/nexus/content/groups/public/nl/astron/mom3/MoM-OTDB-adapter/2.7.0/MoM-OTDB-adapter-2.7.0.tar.gz dest=/opt/tomcat/MoM-OTDB-adapter-2.7.0.tar.gz mode=644
- name: deploy mom otdb adapter
shell: |
cd /opt/tomcat/;
tar -xzvf MoM-OTDB-adapter-2.7.0.tar.gz;
chown -R tomcat /opt/tomcat
# Postfix
- name: fix postfix config
shell: sed -i -e 's/inet_protocols = all/inet_protocols = ipv4/g' /etc/postfix/main.cf
# Build relevant LOFAR packages:
- name: /opt/LOFAR should exist
shell: ls -lta /opt/LOFAR
- name: create /opt/LOFAR/build
file: path=/opt/LOFAR/build/ owner=lofarbuild group=lofarbuild state=directory mode=0775
- name: create /opt/LOFAR/build/gnucxx11_opt
file: path=/opt/LOFAR/build/gnucxx11_opt owner=lofarbuild group=lofarbuild state=directory mode=0775
- name: Build trigger-related LOFAR packages
shell: cd /opt/LOFAR/build/gnucxx11_opt;
cmake
-DBUILD_PACKAGES={{item}}
../..;
make -j8;
make install;
with_items:
- MoMQueryService
- OTDBtoRATaskStatusPropagator
- RATaskSpecifiedService
- RAtoOTDBTaskSpecificationPropagator
- ResourceAssigner
- ResourceAssignmentDatabase
- ResourceAssignmentEditor
- ResourceAssignmentEstimator
- ResourceAssignmentService
- SpecificationServices
- SystemStatusDatabase
- SystemStatusService
- TriggerServices
- TriggerEmailService
- TaskPrescheduler
- DataManagement
- RAScripts
- StaticMetaData
- OTDB_Services
- SAS_OTDB
# rest interface
- name: configure ldap in restinterface
shell: |
sed -i -e 's/AUTH_LDAP_USER_DN_TEMPLATE="uid=%(user)s,ou=Users,o=lofar,c=eu?cn"/AUTH_LDAP_USER_DN_TEMPLATE="cn=%(user)s,ou=Users,o=lofar,c=eu"/g' /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/restinterface/credentials.py
sed -i -e 's/#AUTH_LDAP_CONNECTION_OPTIONS = { ldap.OPT_X_TLS_REQUIRE_CERT : ldap.OPT_X_TLS_NEVER }/AUTH_LDAP_GLOBAL_OPTIONS = { ldap.OPT_X_TLS_REQUIRE_CERT: ldap.OPT_X_TLS_NEVER } \nAUTH_LDAP_CONNECTION_OPTIONS = { ldap.OPT_X_TLS_REQUIRE_CERT : ldap.OPT_X_TLS_NEVER }/g' /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/restinterface/settings.py
sed -i -e 's/'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.AllowAny',),/'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',),/g' /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/restinterface/settings.py
- name: configure secret key in rest interface
shell: |
sed -i -e 's/SECRET_KEY = .*/SECRET_KEY = "{{ lookup('ini', 'secret_key section=restinterface file=/build.ini') }}"/g' /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/restinterface/credentials.py
- name: migrate django database
shell: |
. /opt/LOFAR/build/gnucxx11_opt/lofarinit.sh
python3 /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/manage.py migrate
- name: Export static content for the rest interface.
shell: |
. /opt/LOFAR/build/gnucxx11_opt/lofarinit.sh
python3 /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/manage.py collectstatic
- name: Copy the Apache configuration file for the rest interface.
copy:
src: /wsgi.conf
dest: /etc/httpd/conf.d
- name: Correct the group ownership and group permissions on a Django directory for apache access.
file:
path: /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices
group: apache
mode: 0775
- name: Correct the group ownership and group permissions on a Django SQLite DB for apache access.
file:
path: /opt/LOFAR/build/gnucxx11_opt/installed/lib64/python3.4/site-packages/lofar/triggerservices/db.sqlite3
group: apache
mode: 0664
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
{{ ansible_managed | comment }}
#logconfig =syncevents +peerevents +sysevents +allclock
logconfig =all
driftfile /var/lib/ntp/drift
logfile /var/log/ntpstats/ntpd
statsdir /var/log/ntpstats/
#
# Statistics logging
#
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server ntp1.control.lofar iburst
#server ntp2.control.lofar iburst
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
#
# ONCORE GPS on /dev/oncore.serial.0 and /dev/oncore.pss.0
#
# Make sure /dev/oncore.serial.0 points to the port on which the GPS
# is connected, e.g. "ln -s /dev/ttyS4 /dev/oncore.serial.0"
#
# The device /dev/oncore.pps.0 should point to the serial device where
# the PPS signal is received on the DCD pin,
# e.g. "ln -s /dev/ttyS0 /dev/oncore.pps.0"
#
enable pps
server 127.127.30.0 prefer # minpoll 4 maxpoll 4 # ONCORE GPS
#fudge 127.127.30.0 stratum 1
# prevent NTP from bailing out on a large offsets
tinker panic 0 stepout 0
#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client
# Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
# Disable the monitoring facility to prevent amplification attacks using ntpdc
# monlist command when default restrict does not include the noquery flag. See
# CVE-2013-5211 for more details.
# Note: Monitoring will not be disabled with the limited restriction flag.
disable monitor
localhost
\ No newline at end of file
---
- hosts: localhost
remote_user: root
roles:
- buildhostcentos7
\ No newline at end of file
---
# vars file for software support
#
sws:
- { name: beukema,
uid: 7821,
passwd: "TGnjx8jnImTho",
key: ""
}
- { name: klazema,
uid: 7824,
passwd: "bwmUHRi3n3oKk",
key: ""
}
- { name: jkuensem,
uid: 7699,
passwd: "MvTC31g.ZAPJI",
key: ""
}
- { name: mol,
uid: 7261,
passwd: "5xRrVn3oVDiuM",
key: ""
}
- { name: rbokhorst,
uid: 7808,
passwd: "$1$2HlbS0g1$k1FRcwuCWDuMWKcTq2o9I/",
key: ""
}
- { name: holties,
uid: 7038,
passwd: "nCtSnnNrI2uLo",
key: ""
}
- { name: renting,
uid: 7420,
passwd: "FjAow7BLuwAf",
key: ""
}
- { name: schaap,
uid: 7769,
passwd: "V1g5P3EBQW4Sc",
key: ""
}
- { name: schoenma,
uid: 7418,
passwd: "j92DvKseopOk6",
key: ""
}
- { name: vermaas,
uid: 7076,
passwd: "M619Idwr5cC1E",
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxjy91r2IeWt7gE7nurhNx5SQKPuwOtkIf9z6Dd8Crsaq3zfuCNcC24YYmMTVBomD5s4PqPGAe+j89AuCLxQcNqvvncuLhy0rGhpgipds7kRHJvYB7DBmr/H2KNdiAfZJPmGKsJsoisrryEZ7eGQZhR/o143mYzosv0Qq+YMAHL2V6GllgsuOjmnFvmdb2Or/pz3PHkglxXdTgl6KFSM8wsJ8uriAPq3VhUEVx62Y7GAqxWhJYnI7EkzUx5m3cspMmJQnZ06q+rxgnS2+KiMp+6gg8EE4JkVeVxrQB+mV4QppbnLIzyOp4osiB02zevOzIBJ0++fawlu5dON1Pp+vYw== rsa-key-20161215"
}
[restinterface]
secret_key=<redacted>
CREATE DATABASE useradministration;
CREATE TABLE useradministration.useraccount ( id int(11) NOT NULL AUTO_INCREMENT, userid int(11) NOT NULL DEFAULT '0', username varchar(20) NOT NULL DEFAULT '', password varchar(32) NOT NULL DEFAULT '', publickey varchar(32) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY useraccount_UNIQ (username) ) ENGINE=InnoDB AUTO_INCREMENT=1787 DEFAULT CHARSET=latin1;
CREATE TABLE useradministration.useraccountsystemrole (id int(11) NOT NULL AUTO_INCREMENT, useraccountid int(11) NOT NULL DEFAULT '0', systemroleid int(11) NOT NULL DEFAULT '0', indexid int(11) NOT NULL DEFAULT '0', PRIMARY KEY (id), KEY useraccount_useraccountsystemrole_IND (useraccountid), KEY systemrole_useraccountsystemrole_IND (systemroleid), KEY useraccount_index_useraccountsystemrole_IND (indexid) ) ENGINE=InnoDB AUTO_INCREMENT=3413 DEFAULT CHARSET=latin1;
CREATE TABLE useradministration.user ( id int(11) NOT NULL AUTO_INCREMENT, title varchar(100) DEFAULT NULL, firstname varchar(100) DEFAULT NULL, lastname varchar(100) NOT NULL DEFAULT '', email varchar(100) DEFAULT NULL, phone1 varchar(100) DEFAULT NULL, phone2 varchar(100) DEFAULT NULL, fax varchar(100) DEFAULT NULL, PRIMARY KEY (id), KEY user_lastname_IND (lastname) ) ENGINE=InnoDB AUTO_INCREMENT=1790 DEFAULT CHARSET=latin1;
# mom database
CREATE DATABASE mom;
USE mom;
CREATE TABLE mom2objectstatus ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) DEFAULT NULL, roles varchar(512) DEFAULT NULL, userid int(11) DEFAULT NULL, statusid int(11) DEFAULT NULL, mom2objectid int(11) DEFAULT NULL, indexid int(11) DEFAULT NULL, statustime datetime NOT NULL DEFAULT '1000-01-01 00:00:00.000000', pending tinyint(1) DEFAULT 0, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1725902 DEFAULT CHARSET=latin1;
CREATE TABLE mom2object (id int(11) NOT NULL AUTO_INCREMENT, parentid int(11) DEFAULT NULL, indexid int(11) DEFAULT NULL, mom2id int(11) NOT NULL DEFAULT 0, mom2objecttype char(25) NOT NULL, name varchar(100) NOT NULL DEFAULT '', description varchar(255) DEFAULT NULL, ownerprojectid int(11) DEFAULT NULL, currentstatusid int(11) DEFAULT NULL, topology varchar(100) DEFAULT NULL, predecessor varchar(512) DEFAULT NULL, topology_parent tinyint(1) DEFAULT 0, group_id int(11) DEFAULT 0, datasize bigint(20) DEFAULT 0, PRIMARY KEY (id), UNIQUE KEY mom2object_UNIQ (mom2id) ) ENGINE=InnoDB AUTO_INCREMENT=331855 DEFAULT CHARSET=latin1;
CREATE TABLE status (id int(11) NOT NULL AUTO_INCREMENT, code char(15) NOT NULL DEFAULT '', type char(20) NOT NULL, description varchar(100) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY status_UNIQ (code,type) ) ENGINE=InnoDB AUTO_INCREMENT=712 DEFAULT CHARSET=latin1;
CREATE TABLE member ( id int(11) NOT NULL AUTO_INCREMENT, projectid int(11) DEFAULT NULL, indexid int(11) DEFAULT NULL, PRIMARY KEY (id), KEY mom2object_member_FK (projectid), KEY indexid_IND (indexid) ) ENGINE=InnoDB AUTO_INCREMENT=1010 DEFAULT CHARSET=latin1;
CREATE TABLE registeredmember ( id int(11) NOT NULL AUTO_INCREMENT, memberid int(11) DEFAULT NULL, userid int(11) DEFAULT NULL, PRIMARY KEY (id), KEY member_registeredmember_FK (memberid), KEY userid_IND (userid) ) ENGINE=InnoDB AUTO_INCREMENT=768 DEFAULT CHARSET=latin1;
CREATE TABLE memberprojectrole ( id int(11) NOT NULL AUTO_INCREMENT, memberid int(11) DEFAULT NULL, indexid int(11) DEFAULT NULL, projectroleid int(11) DEFAULT NULL, PRIMARY KEY (id), KEY member_memberprojectrole_FK (memberid), KEY projectrole_memberprojectrole_FK (projectroleid), KEY indexid_IND (indexid) ) ENGINE=InnoDB AUTO_INCREMENT=1167 DEFAULT CHARSET=latin1;
CREATE TABLE projectrole ( id int(11) NOT NULL AUTO_INCREMENT, name char(15) NOT NULL DEFAULT '', description varchar(100) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY projectrole_UNIQ (name) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
CREATE TABLE project ( id int(11) NOT NULL AUTO_INCREMENT, mom2objectid int(11) DEFAULT NULL, releasedate date DEFAULT NULL, PRIMARY KEY (id), KEY mom2object_IND (mom2objectid) ) ENGINE=InnoDB AUTO_INCREMENT=149 DEFAULT CHARSET=latin1;
ALTER TABLE project ADD allowtriggers BOOLEAN NOT NULL DEFAULT FALSE AFTER releasedate, ADD priority int(11) NOT NULL DEFAULT 1000 AFTER allowtriggers;
CREATE TABLE lofar_trigger ( id int(11) NOT NULL AUTO_INCREMENT, username varchar(120) NOT NULL DEFAULT '', hostname varchar(128) NOT NULL DEFAULT '', arrivaltime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, projectname varchar(100) NOT NULL DEFAULT '', metadata TEXT NOT NULL, PRIMARY KEY (id), FOREIGN KEY (username) REFERENCES useradministration.useraccount(username)) ;
CREATE TABLE lofar_observation ( id int(11) NOT NULL AUTO_INCREMENT, mom2objectid int(11) DEFAULT NULL, observation_id int(11) DEFAULT NULL, instrument char(32) DEFAULT NULL, user_specification_id int(11) DEFAULT NULL, system_specification_id int(11) DEFAULT NULL,default_template varchar(50) DEFAULT NULL,tbb_template varchar(50) DEFAULT NULL,tbb_piggyback_allowed tinyint(1) DEFAULT '0',parset mediumtext,nr_output_correlated int(11) DEFAULT NULL,nr_output_beamformed int(11) DEFAULT NULL,nr_output_coherent_stokes int(11) DEFAULT NULL,nr_output_incoherent_stokes int(11) DEFAULT NULL,nr_output_flyseye int(11) DEFAULT NULL,nr_output_correlated_valid int(11) DEFAULT NULL,nr_output_beamformed_valid int(11) DEFAULT NULL,nr_output_coherent_stokes_valid int(11) DEFAULT NULL,nr_output_incoherent_stokes_valid int(11) DEFAULT NULL,nr_output_flyseye_valid int(11) DEFAULT NULL,feedback text,aartfaac_piggyback_allowed bit(1) DEFAULT b'1',storage_cluster_id int(11) DEFAULT NULL,processing_cluster_id int(11) DEFAULT NULL,nico_testing int(11) DEFAULT NULL,PRIMARY KEY (id),KEY lofar_observation_observation_id_IND (observation_id),KEY mom2object_lofar_observation_FK (mom2objectid),KEY user_specification_lofar_observation_FK (user_specification_id),KEY system_specification_lofar_observation_FK (system_specification_id)) ENGINE=InnoDB AUTO_INCREMENT=52874 DEFAULT CHARSET=latin1;
CREATE TABLE lofar_observation_specification (id int(11) NOT NULL AUTO_INCREMENT,type char(8) DEFAULT NULL,correlated_data tinyint(1) DEFAULT '1',filtered_data tinyint(1) DEFAULT '0',beamformed_data tinyint(1) DEFAULT '0',coherent_stokes_data tinyint(1) DEFAULT '0',incoherent_stokes_data tinyint(1) DEFAULT '0',antenna char(20) DEFAULT NULL,clock_mode char(10) DEFAULT NULL,instrument_filter char(15) DEFAULT NULL,integration_interval double DEFAULT NULL,channels_per_subband int(11) DEFAULT NULL,cn_integration_steps int(11) DEFAULT NULL,pencilbeams_flyseye tinyint(1) DEFAULT '0',pencilbeams_nr_pencil_rings int(11) DEFAULT NULL,pencilbeams_ring_size double DEFAULT NULL,stokes_selection char(4) DEFAULT NULL,stokes_integrate_channels tinyint(1) DEFAULT NULL,stokes_integration_steps int(11) unsigned DEFAULT NULL,station_set char(15) DEFAULT NULL,timeframe char(4) DEFAULT NULL,starttime datetime DEFAULT NULL,endtime datetime DEFAULT NULL,spec_duration double DEFAULT NULL,coherent_dedisperse_channels tinyint(1) DEFAULT '0',dispersion_measure float DEFAULT NULL,subbands_per_file_cs int(11) DEFAULT NULL,subbands_per_file_bf int(11) DEFAULT NULL,collapsed_channels_cs int(11) DEFAULT NULL,collapsed_channels_is int(11) DEFAULT NULL,downsampling_steps_cs int(11) DEFAULT NULL,downsampling_steps_is int(11) DEFAULT NULL,which_cs char(4) DEFAULT NULL,which_is char(4) DEFAULT NULL,bypass_pff tinyint(1) DEFAULT '0',enable_superterp tinyint(1) DEFAULT '0',flyseye tinyint(1) DEFAULT '0',tab_nr_rings int(11) DEFAULT NULL,tab_ring_size float DEFAULT NULL,bits_per_sample int(11) DEFAULT NULL,misc text,PRIMARY KEY (id),KEY lofar_observation_specification_type_IND (type)) ENGINE=InnoDB AUTO_INCREMENT=105645 DEFAULT CHARSET=latin1;
CREATE TABLE lofar_pipeline (id int(11) NOT NULL AUTO_INCREMENT,mom2objectid int(11) DEFAULT NULL,starttime datetime DEFAULT NULL,endtime datetime DEFAULT NULL,pipeline_id int(11) DEFAULT NULL,pending tinyint(1) DEFAULT '0',template varchar(100) DEFAULT NULL,runtimeDirectory varchar(255) DEFAULT NULL,resultDirectory varchar(255) DEFAULT NULL,workingDirectory varchar(255) DEFAULT NULL,parset longtext,nr_output_correlated int(11) DEFAULT NULL,nr_output_beamformed int(11) DEFAULT NULL,nr_output_instrument_model int(11) DEFAULT NULL,nr_output_skyimage int(11) DEFAULT NULL,nr_output_correlated_valid int(11) DEFAULT NULL,nr_output_beamformed_valid int(11) DEFAULT NULL,nr_output_instrument_model_valid int(11) DEFAULT NULL,nr_output_skyimage_valid int(11) DEFAULT NULL,feedback text,demixing_parameters_id int(11) DEFAULT NULL,bbs_parameters_id int(11) DEFAULT NULL,duration double DEFAULT NULL,storage_cluster_id int(11) DEFAULT NULL,processing_cluster_id int(11) DEFAULT NULL,misc text,PRIMARY KEY (id),KEY lofar_pipeline_pipeline_id_IND (pipeline_id),KEY mom2object_lofar_pipeline_FK (mom2objectid),KEY demixing_parameters_FK (demixing_parameters_id),KEY bbs_parameters_FK (bbs_parameters_id)) ENGINE=InnoDB AUTO_INCREMENT=75471 DEFAULT CHARSET=latin1;
# mom privilege
CREATE DATABASE momprivilege;
CREATE TABLE momprivilege.statustransitionrole ( id int(11) NOT NULL AUTO_INCREMENT, statustransitionid int(11) DEFAULT NULL, roleid int(11) NOT NULL, roletype char(100) NOT NULL, PRIMARY KEY (id), KEY roletype_IND (roleid,roletype), KEY statustransition_statustransitionrole_FK (statustransitionid) ) ENGINE=InnoDB AUTO_INCREMENT=8572 DEFAULT CHARSET=latin1;
CREATE TABLE momprivilege.statustransition (id int(11) NOT NULL AUTO_INCREMENT, oldstatusid int(11) NOT NULL, newstatusid int(11) NOT NULL, PRIMARY KEY (id), KEY oldstatus_IND (oldstatusid), KEY newstatus_IND (oldstatusid) ) ENGINE=InnoDB AUTO_INCREMENT=1272 DEFAULT CHARSET=latin1;
#!/bin/bash
# Create the log directory.
mkdir -p /opt/LOFAR/var/log
echo 'Starting Qpid...' &&
qpidd 2>&1 > /opt/LOFAR/var/log/qpid.log &
sleep 2;
echo 'Setting up queues...' &&
qpid-config add exchange topic devel.lofar.trigger.command &&
qpid-config add exchange topic devel.lofar.trigger.notification &&
qpid-config add exchange topic devel.lofar.ra.command &&
qpid-config add exchange topic devel.lofar.spec.command &&
qpid-config add queue mom.importxml &&
sleep 2;
echo 'Init LOFAR env...';
. /opt/LOFAR/build/gnucxx11_opt/lofarinit.sh &&
sleep 2;
echo 'Starting LOFAR services...' &&
specificationservice 2>&1 > /opt/LOFAR/var/log/specificationservice.log &
specificationvalidationservice 2>&1 > /opt/LOFAR/var/log/specificationvalidationservice.log &
specificationtranslationservice 2>&1 > /opt/LOFAR/var/log/specificationtranslationservice.log &
triggerservice 2>&1 > /opt/LOFAR/var/log/triggerservice.log &
echo 'Starting Postgres...' &&
runuser -l postgres -c '/usr/pgsql-9.6/bin/pg_ctl -D /var/lib/pgsql/9.6/data/ start' &&
echo 'Starting Mysql...' &&
runuser -l mysql -c 'mysqld_safe' &
sleep 5;
cd; momqueryservice -C MoM 2>&1 > /opt/LOFAR/var/log/momqueryservice.log &
postfix start;
echo 'Staring Apache...' &&
/usr/sbin/httpd -k restart
echo 'Have fun!' &&
/bin/bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment