Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • BOLD: refers to files that need to be modified or generated by IOC developer
  • Italics: symbolic link

 


How-To setup the IOC boot directories

The instructions differ between production and development due to permission restrictions in production.

Production:   lcls, lcls2, facet, testfac

  1. Send email to Ken Brobeck requesting:
      create controls infrastructure for a new IOC on facility production server, which includes the following:
      1. create controls infrastructure:
        • for a new IOC  that boots from a production Linux daemon server (see Table1) or a camera server.
          1.  Add boot directory: $EPICS_DATA/<ioc>
    1.  directory
          1.  Add data directories: $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,
    2. archive> 
          1. archive,yaml>  directories 
          2.  Add automatic boot scripts:  (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>
    3.                      Table 1
       Facility
        • for new CPU that will perform a diskless boot of rhel7 (centos7).   
          1. Add boot directory: $EPICS_DATA/<cpu>
          2. Add data directory: $IOC_DATA/<cpu>      - includes iocInfo
    4. Proceed to Step #3 under Development

                                         Table 1

    FacilityAccountServer
    LCLS

    ...

    lacilcls-daemon0, lcls-daemon1

    ...

    , lcls-deamon2,cryo-daemon1
    FACET-II

    ...

    flacifacet-daemon1
    TestFac

    ...

    acctftestfac-daemon1

    ...

                        

    Development:    dev

    1. Create the $IOCCreate the $IOC_DATA directory for your iocs f as follows:
      1. For your IOC
        1. cd $IOC_DATA for your IOC
        2. mkdir sioc-<area>-<subsystem-prefix><2-digit#>
        3. cd  <sioc>
        4. mkdir archive autosave-req autosave iocInfo restore yaml
      2. For your CPU (in needed)
        1. $IOC_DATA
        2. mkdir cpu-<area>-<subsystem-prefix><2-digit#>
        3. cd <cpu>
        4. mkdir iocInfo
    2.  Create the  Create the $EPICS_IOCS  ioc boot directory as follows:
      1. For your IOC: mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
      Setup ioc boot directory files
      1. cd $EPICS_IOCS/sioc-<area>for your CPU: mkdir  cpu-<arae>-<subsystem-prefix><2-digit#>
    3. Setup boot directory files
      1. For your IOC:
        1. cd
      copy the ioc startup.cmd script from 
        1. $EPICS_IOCS/
      template
        1. <ioc>
          1.  for Linux running iocsh:    cp ../template/startup.cmd.soft         startup.cmd
       Edit st
          1.  for Linux running cexp:     cp ../template/startup.cmd.soft.cexp  startup.cmd
          2. Edit startup.cmd
            1. replace <ioc>  with your ioc name
            2. 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).
            3. replace <exe> with your IOC Application executable this ioc should load
            4. if your IOC Application uses a non-standard location for the st.cmd file,  change path of  EPICS_IOC_APP
          3. create symbolic:   ln -s   ../../iocTop/<app>/<ver>  iocSpecificRelease
      1. For you CPU (if needed)
        1. cd $EPCS_IOCS/<cpu>
        2. cp ../template/startup.cmd.soft.cpu.<facility> startup.cmd    where facility is dev,lcls,facet,testfac
        3. Edit startup.cmd
          1. replace <cpu> with cpu name
          2. if your IOC Application uses a non-standard locaiton for hte st.cmd file, change the path of
        the EPICS
          1. EPICS_
        IOC
          1. CPU_APP
        1. create symbolic:   ln -s   ../../iocTop/<app>/<ver>  iocSpecificRelease
        2. Add ipxe file in $TFTPBOOT/boot/ipxe/<cpu>.ipxe   Note: for a FACET cpu you must create this file from laci@lcls-srv01
    4. Modify $EPICS_IOCS/screeniocs    Please note that this is a symbolic link to a CVS file.
      1. Go to your home sandbox:
        1. cd <work>
          cvs co epics/iocCommon/All/<facility>   , where facility is Dev,Prod,facet,acctest
          1. 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}
          2. The "comment" field in  screeeniocs  is optional and must be preceded by a  "#".
          3. add comment in the "Mod:" section of the header
          4. cd epics/iocCommon/All/<facility>/screeniocs
          5. edit screeniocs
      2. verify that the file in
    1. use has
      1. production have not been modified without being committed.
        1. cd $EPICS_IOCS/All/<facility>      , where facility is Dev,Prod,facet,acctest
        2. cvs diff -r HEAD screeniocs
        3. 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.
      2. check out screeniocs from CVS into your work area
    2. cd
    3. cd <work>
      cvs co epics/iocCommon/All/<facility>   , where facility is Dev,Prod,facet,acctest
    4. cd epics/iocCommon/All/<facility>/screeniocs
    5. edit screeniocs
    6. add line for <ioc>. For server refer to table 1 above.
    7. format:  sioc-<area>-<subsystem prefix><2-digit #>  <executable w/full absoluete path>    sioc   <server>    [#comment}
    8. The "comment" field in  screeeniocs  is optional and must be preceded by a  "#".
    9. add comment in the "Mod:" section of the header
      1. commit your changes of screeniocs to CVS  as follows:
        1.  cvs commit  -m "added cpu and ioc blah" screeniocs
      2. update the screeniocs file in use
        1. cd $EPICS_IOCS/All/<facility>
        2.  rm -f screeniocs
        3. cvs update screeniocs
           

    How-to boot an IOC from the Linux (daemon) host with disk:

    There are multiple ways to boot a soft ioc which are listed below: 

    1. Log onto server listed in table 1 above and perform the following commands:
      1. cd /etc/init.d
      2. ./st.<ioc>  <restart,start,stop>
    2. Use iocConsole to start an ioc, which uses the screen program
      1. iocConsole <ioc>  --stayup
    3. Boot ioc from the facility home network display 


    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.

      1. siocStart <ioc>   - starts a specific ioc. However, if the ioc is up nothing will be done
      2. siocStart    -  starts all iocs not already running
      3. iocConsole.sh <ioc> -d   (starts the specified ioc, but does not attache to the screen session)
      4. iocConsole.sh <ioc> -R  (graceful reset)
      5. iocConsole.sh <ioc> -r  (fast restart)
      6. iocConsole.sh --help

    How to connect to Linux CPU from a Linux host with a disk:

    Use either iocConsole or ssh to CPU as follows:

    1. iocConsole  <cpu>
    2. 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:

    • from laci or flaci type:  screen -ls 

    How-to use screen program:

    ...