Update Post Install Setup authored by Erik von Reis's avatar Erik von Reis
......@@ -4,12 +4,18 @@ This document will instruct the user on the post install setup of a Debian 10 Fr
# Create 'controls' user and group
Log into the new front end as root. At the command line, type the following:
Log into the new front end as root. At the command line, type the following as root:
```plaintext
root@x2fec:/$ groupadd -g 1001 controls
root@x2fec:/$ useradd -u 1001 -s /bin/bash -m -g controls controls
root@x2fec:/$ passwd controls
groupadd -g 1001 controls
useradd -u 1001 -s /bin/bash -m -g controls controls
passwd controls
```
# install some helpful packages
```
apt install vim emacs tmux sudo
```
**Note: The LIGO standard UID for controls is 1001 across all systems. Any hosts connected to the FEC should follow this standard**
......@@ -65,71 +71,29 @@ mkdir -p /opt/rtcds/$site/$ifo/target/gds/param
It is recommended to copy and paste the command below
```plaintext
controls@x2fec:/$ sudo apt-get install nfs-common nfs-kernel-server subversion ntpdate dkms build-essential cmake pkg-config psmisc linux-headers-$(uname -r) flex bison ldas-tools-al-dev ldas-tools-framecpp-dev libboost-all-dev git
sudo apt-get install nfs-common nfs-kernel-server subversion ntp dkms build-essential cmake pkg-config psmisc linux-headers-$(uname -r) flex bison ldas-tools-al-dev ldas-tools-framecpp-dev libboost-all-dev git
```
# Setup NFS export of /opt/rtcds directory
The FEC exports the /opt/rtcds directory to the directly connected workstation, insert workstation ip into `<workstation-ip>`. Directions for mounting the NFS mount on the workstation will be included in the workstation setup instructions.**If you are configuring your front-end as a cymac (front-end and workstation on the same host), you can skip this step.**
Add the following content to `/etc/exports` and run `/usr/sbin/exportfs -a`. Restart the nfs-server.service.
```plaintext
controls@x2fec:/$ sudo cat /etc/exports
/etc/exports <workstation-ip>(rw,sync,no_subtree_check)
controls@x2fec:/$ sudo /usr/sbin/exportfs -a
controls@x2fec:/$ sudo systemctl status nfs-server.service
```
# Setup NTP
The front-end needs to be synced to an NTP source. You need to know the address of the local NTP server. At the IFOs, this may be the core router.
Define server in /etc/ntp.conf. Examples are server ntp.ligo-la.caltech.edu server lesath.ligo.caltech.edu server ntp.stanford.edu Stop the service, get data initialized with ntpdate, and set it up to start on boot In Debian, stop the service
```plaintext
controls@x2fec $ sudo systemctl stop ntp
sudo cat /etc/exports
/opt/rtcds <workstation-ip>(rw,sync,no_subtree_check)
```
Now force time with ntpdate. For example
after /etc/exports is modified, update the ntp server with:
```plaintext
controls@x2fec $ sudo ntpdate ntp.ligo-la.caltech.edu 27 Apr 14:51:00 ntpdate[1445]: step time server 208.69.130.8 offset 291.169637 sec controls@x2fec $ sudo ntpdate ntp.ligo-la.caltech.edu 27 Apr 14:51:08 ntpdate[1446]: adjust time server 208.69.130.8 offset -0.000192 sec
```
Now start ntp back up.
```plaintext
controls@x2fec $ sudo systemctl start ntp
sudo /usr/sbin/exportfs -a
sudo systemctl status nfs-server.service
```
# Setup NTP
# Install CDS Environment
We want to install the CDS Environment (See T1000379 ). There is an installer in the 'cdscfg' repository. The example is for the LLO DAQ test stand. You will have your own site, ifo, network
# Install/Setup CDSCFG
We are now using git for this
The front-end needs to be synced to an NTP source. You need to know the address of the local NTP server. At the IFOs, this may be the core router.
```plaintext
controls@x2fec:/$ sudo mkdir -p /lib/local/teststand
controls@x2fec:/$ sudo chown controls:controls /lib/local/teststand
controls@x2fec:/$ cd /lib/local/teststand
controls@x2fec:/$ git clone ``https://git.ligo.org/cds/cdscfg.git`` ./cfg_fe.sh
Install FE CDS config at default: /opt/cdscfg\n
Must be a new install - please enter requested info
Enter 3-letter LIGO site code (i.e. lho, llo, tst): tst
Enter 2-letter LIGO ifo code (i.e. h2, l1, x1): x2
Enter EPICS network mask (i.e. 10.11.12.255, 10.144.0.255): 10.144.0.255
Enter NDS server name (i.e. h2nds0, l1nds0): x2fec
Enter default printer name [x2fec]:
Enter base apps folder [/opt/rtapps]:
Installing front-end config for tst/x2 net 10.144.0.255 nds x2fec
rm: cannot remove "site/`_`": No such file or directory
rm: cannot remove "ifo/`_`": No such file or directory
"/opt/cdscfg/tst/stddir.py.in" -> "/opt/cdscfg/tst/stddir.py"
"/opt/cdscfg/tst/stddir.pl.in" -> "/opt/cdscfg/tst/stddir.pl"
"/opt/cdscfg/tst/x2/stddir.sh.in" -> "/opt/cdscfg/tst/x2/stddir.sh"
"/opt/cdscfg/tst/x2/stddir.csh.in" -> "/opt/cdscfg/tst/x2/stddir.csh"
"/opt/cdscfg/tst/x2/rtrc.sh.in" -> "/opt/cdscfg/tst/x2/rtrc.sh"
"/opt/cdscfg/tst/x2/rtrc.csh.in" -> "/opt/cdscfg/tst/x2/rtrc.csh"
```
Define server in /etc/ntp.conf. Examples are server ntp.ligo-la.caltech.edu server lesath.ligo.caltech.edu server ntp.stanford.edu
# Install advligorts packages, Setup RCG
......@@ -137,8 +101,16 @@ rm: cannot remove "ifo/`_`": No such file or directory
If you will not be doing RCG code development, but you are using Debian 10 or later, just check out the package
these are enough for a standalone (CyMAC) system.
```plaintext
controls@x2fec:/$ sudo apt-get install advligorts-rcg advligorts-cpu-isolator-dkms advligorts-daqd advligorts-transport-common advligorts-transport-pubsub
sudo apt-get install advligorts-rcg advligorts-cpu-isolator-dkms advligorts-daqd
```
Install these also if the front end is not a standalone, i.e. if the DAQ will run on a different server.
```
sudo apt-get install advligorts-transport-common advligorts-transport-pubsub
```
**Option B** - Install master from Git repository If you are going to do development, especially on Debian 8 and newer, use a git checkout Create the 'rtscore' directory for it and go to it
......@@ -180,33 +152,38 @@ controls@x2fec:/ $ sudo usermod -a -G controls advligorts
Checkout trunk of cds_user_apps (this will take a long time) using Subversion
```plaintext
controls@x2fec /opt/rtcds/rtscore $ cd /opt/rtcds
controls@x2fec /opt/rtcds $ sudo mkdir userapps
controls@x2fec /opt/rtcds $ cd userapps
controls@x2fec /opt/rtcds/userapps $ svn co https://redoubt.ligo-wa.caltech.edu/svn/cds_user_apps/trunk
controls@x2fec /opt/rtcds/userapps $ sudo ln -s trunk release
cd /opt/rtcds
mkdir userapps
cd userapps
```
then checkout the userapps directory from svn. You will need a kerberos name and password.
```
svn co https://redoubt.ligo-wa.caltech.edu/svn/cds_user_apps/trunk
ln -s trunk release
```
# Install EPICS Base
We will get the Base and the perl scripts that go with it
We will get the Base and the python scripts that go with it
```plaintext
controls@x2fec:\~$ sudo apt-get install epics-dev epics-perl epics-seq-dev epics-asyn-dev epics-modbus-dev medm striptool caqtdm epics-extensions-dev python-pyepics python-pcaspy python3-pyepics python3-pcaspy epics-pcas-dev
sudo apt-get install epics-dev epics-seq-dev epics-asyn-dev medm striptool caqtdm epics-extensions-dev python3-pyepics python3-pcaspy epics-pcas-dev
```
## Install ezca, add soft-links
## Install ezca, add soft-links (skip for CyMAC or standalone)
To build the real-time models, you also need the EPICS ezca package. However, this currently installs a level down at '/usr/lib/epics/extensions', so we need to add soft-links at /usr/lib/epics directories
```plaintext
controls@x2fec:\~$ sudo apt install epics-ezca-dev
controls@x2fec:\~$ cd /usr/lib/epics
controls@x2fec:/usr/lib/epics$ cd include
controls@x2fec:/usr/lib/epics$ sudo ln -s ../extensions/include/ezca.h ezca.h
controls@x2fec:/usr/lib/epics$ cd ../lib/linux-x86_64
controls@x2fec:/usr/lib/epics$ sudo ln -s ../../extensions/lib/x86_64-linux-gnu/libezca.h libezca.h
controls@x2fec:/usr/lib/epics$ sudo ln -s ../../extensions/lib/x86_64-linux-gnu/libezca.so.3.15.3 libezca.so
sudo apt install epics-ezca-dev
cd /usr/lib/epics
cd include
sudo ln -s ../extensions/include/ezca.h ezca.h
cd ../lib/linux-x86_64
sudo ln -s ../../extensions/lib/x86_64-linux-gnu/libezca.h libezca.h
sudo ln -s ../../extensions/lib/x86_64-linux-gnu/libezca.so.3.15.3 libezca.so
```
# Install caRepeater service
......@@ -241,10 +218,9 @@ WantedBy=multi-user.target
After creating the file in the above directory, complete the install by enabling the service to start at boot and starting the service now.
```plaintext
controls@x2fec:\~# sudo chmod 664 /etc/systemd/system/caRepeater.service
controls@x2fec:\~# sudo systemctl daemon-reload
controls@x2fec:\~# sudo systemctl enable --now caRepeater
Created symlink from /etc/systemd/system/multi-user.target.wants/caRepeater.service to /etc/systemd/system/caRepeater.service.
sudo chmod 664 /etc/systemd/system/caRepeater.service
sudo systemctl daemon-reload
sudo systemctl enable --now caRepeater
```
# CPU isolation
......@@ -256,7 +232,7 @@ Created symlink from /etc/systemd/system/multi-user.target.wants/caRepeater.serv
To ensure we have the correct read and write permissions, perform the following commands
```plaintext
controls@x2fec:/$ sudo chown -R advligorts:advligorts /frames/
controls@x2fec:/$ sudo chown -R controls:advligorts /opt/rtcds/tst/
controls@x2fec:/$ sudo chmod -R 0774 /opt/rtcds/tst/x2/
sudo chown -R advligorts:advligorts /frames/
sudo chown -R controls:advligorts /opt/rtcds/$site/
sudo chmod -R 0774 /opt/rtcds/$site/$ifo/
```
\ No newline at end of file