...
The instructions differ between production and development due to permission restrictions in production.
Table 1
Facility | Account | Server |
---|
LCLS | laci | lcls-daemon0, lcls-daemon1, lcls-deamon2,cryo-daemon1 |
FACET-II | flaci | facet-daemon1 |
TestFac | acctf | testfac-daemon1 |
Dev | laci | lcls-dev3 (rhel6), dev-rhel7 (rhel7) |
Production: lcls, facet, testfac
- Send email to Ken Brobeck requesting:
- create controls infrastructure:
- for a new IOC that boots from a production Linux daemon server (see Table1) or a camera server.
- Add boot directory: $EPICS_DATA/<ioc>IOCS<ioc>
- Add data directories: $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,archive,yaml> directories
- Add automatic boot scripts:
- Add boot directory: $EPICS_DATA/<cpu>
- Add data directory: $IOC_DATA/<cpu> - includes iocInfo
- (rhel6 only)
- add boot script on server defined in table 1: /etc/inti.d/st.<ioc>
- add symbolic link on server defined in table 1: /etc/rc3.d/SS98st.<ioc> ----> /etc/init.d/st.<ioc>
for new CPU that will perform a diskless boot of rhel7 (centos7).
- Proceed to Step #3 under Development
Table 1
...
- #2c under Development
...
Development: dev dev
- Create the $IOC_DATA directory f as follows:
- For your IOC
cd $IOC_DATA for your IOC
- mkdir sioc-<area>-<subsystem-prefix><2-digit#>
- cd <sioc>
- mkdir archive autosave-req autosave iocInfo restore yaml
For your CPU (in needed) - $IOC_DATA
mkdir cpu-<area>-<subsystem-prefix><2-digit#>- cd <cpu>
- mkdir iocInfo
Create the $EPICS_IOCS IOC boot directory with boot links as follows:
- cd $EPICS_IOCS
- For your IOC: mkdir sioc-<area>-<subsystem-prefix><2-digit#>
- for your CPU: mkdir cpu-<arae>-<subsystem-prefix><2-digit#>
Setup boot directory files- For your IOC: cd $EPICS_IOCS/ <ioc>
- for Linux running iocsh: cp cp ../template/startup.cmd.soft soft startup.cmd
- for Linux running cexp: cp ../template/startup.cmd.soft.cexp startup.cmd
Edit startup.cmd- replace <ioc> with your ioc name
- replace <t_a> with the target, such as linux-x86 or linux-x86_64 or rhel6-x86_64, rhel7-x86_64 (ref. your application bin directory).
- replace <exe> with your IOC Application executable
this ioc should load
- if your IOC Application uses a non-standard location for the st.cmd file, change path of EPICS_IOC_APP
- create symbolic: ln -s ../../iocTop/<app>/<ver> iocSpecificRelease
For you CPU (if needed) - cd $EPCS_IOCS/<cpu>
- cp ../template/startup.cmd.soft.cpu.<facility> startup.cmd where facility is dev,lcls,facet,testfac
- Edit startup.cmd
- replace <cpu> with cpu name
- if your IOC Application uses a non-standard locaiton for hte st.cmd file, change the path of EPICS_CPU_APP
- create symbolic: ln -s ../../iocTop/<app>/<ver> iocSpecificRelease
- Add ipxe file in $TFTPBOOT/boot/ipxe/<cpu>.ipxe Note: for a FACET cpu you must create this file from laci@lcls-srv01
Modify $EPICS_IOCS/screeniocs – Please note that this is a symbolic link to a CVS file.
- Go to your home sandbox:
- cd <work>
cvs co epics/iocCommon/All/<facility> , where facility is Dev,Prod,facet,acctest- add line for <ioc>. For server refer to table 1 above.
format: sioc-<area>-<subsystem prefix><2-digit #> <executable w/full absoluete path> sioc <server> [#comment}
- The "comment" field in screeeniocs is optional and must be preceded by a "#".
- add comment in the "Mod:" section of the header
- cd epics/iocCommon/All/<facility>/screeniocs
- edit screeniocs
- verify that the file in production have not been modified without being committed.
- cd $EPICS_IOCS/All/<facility> , where facility is Dev,Prod,facet,acctest
- cvs diff -r HEAD screeniocs
- if there are issues, then send email to whoever made the change or to controls-software that you are about to update this file and uncommitted edits will be lost, so please commit your changes to CVS. If you don't get a response, you can either add the changes to CVS in addition to yours or just add yours.
- check out screeniocs from CVS into your work area
- commit your changes of screeniocs to CVS as follows:
- cvs commit -m "added cpu and ioc blah" screeniocs
- update the screeniocs file in use
- cd $EPICS_IOCS/All/<facility>
- rm -f screeniocs
- cvs update screeniocs
- Add your IOC to$EPICS_IOCS/facility/screeniocs and commit change to CVS
How-to boot an IOC from the Linux (daemon) host with diskserver specified in screeniocs:
There are multiple ways to boot a soft ioc which are listed below:
- Log onto server listed in table 1 above Table 1 from the account this same table, and perform the following commands:
- cd /etc/init.d
- ./st.<ioc> <restart,start,stop>
- Use iocConsole to start an ioc, which uses the screen program
- iocConsole <ioc> --stayup
- siocRestart <ioc>
- Boot ioc IOC from the facility home display network display panel
How - to boot an IOC from the Linux host w/o a disk:
The following scripts are located under the directory $IOC/common and should be in PATH on the CPU.
- siocStart <ioc> - starts a specific ioc. However, if the ioc is up nothing will be done
- siocStart - starts all iocs not already running
- iocConsole.sh <ioc> -d (starts the specified ioc, but does not attache to the screen session)
- iocConsole.sh <ioc> -R (graceful reset)
- iocConsole.sh <ioc> -r (fast restart)
- iocConsole.sh --help
How to connect to Linux CPU IOC from a Linux host with a disk:
Use either iocConsole or ssh to CPU as follows:
- iocConsole <cpu>
- Using ssh
- from lcls or dev: ssh laci@<cpu>
- from facet: ssh flaci@<cpu
How to check if IOC is running on the linuxRT CPU:
...
server:
- iocConsole <ioc>
How-to use screen program:
...