You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How-to Release IOCs to Production

PLEASE USE THE LATEST INSTRUCTIONS WHICH CAN BE FOUND HERE: Soft IOC Release Procedure

PLEASE USE THE LATEST INSTRUCTIONS WHICH CAN BE FOUND HERE: HardIOC Release Procedure


STEP 1:
Make sure your soft IOC is not currently running on lcls-prod01 or the pv gateway will get confused.

Log into lcls-prod01 under the laci account with ssh laci@lcls-prod01

Enter ps -ef | grep <your-binary>

If this returns a match contact Jingchen on instructions on properly stopping your soft IOC.

STEP 2:
Prepare your ioc for the ca network:

Change configure/RELEASE to use the correct versions of all the modules. Make sure you are using versions that are available in the standalone environment.

Modify st.cmd following the example in /afs/slac/g/lcls/epics/iocTop/Water/Water-R1-0-8 Note that you need to be logged into a machine on the DMZ in order to see this st.cmd directory.

  • make sure the first line looks like #!../../bin/linux-x86/<your-binary>
  • make sure the second command is < envPaths
  • make sure the third command is

    cd($

    Unknown macro: {TOP}

    )

  • remove all references to pre_st.cmd and post_st.cmd
  • change everything that relies on symbolic links
  • replace

    $

    Unknown macro: {LCDATA}

    /<ioc-name>

    with

    $

    Unknown macro: {IOC_DATA}

    /$

    Unknown macro: {IOC}
  • look at the example for further help.

Build and test

Commit to CVS and tag

STEP 3:
Log in to lcls-builder.
ssh iocegr@lcls-builder
If prompted for password, type kinit and then try again

STEP 4:
Change directory to your IOC Application area as follows.
cd $EPICS_IOC_TOP/<subsystem>
Example: cd $EPICS_IOC_TOP/Water
If there is no directory for your subsystem under $EPICS_IOC_TOP, create one.

STEP 5:
Set CVSROOT using your user account name.
export CVSROOT=:ext:<username>@lcls-prod02:/afs/slac/g/lcls/cvs

STEP 6:
Check out the tagged release of your ioc (created in step 1) from cvs into iocTop/<subsystem>/<module-with-version-number>.
Example:cvs co -d Water-R1-0-8 -r Water-R1-0-8 Water

STEP 7:
Modify your configure/RELEASE file to point to the correct location of EPICS base on the build system:
EPICS_SITE_TOP=/usr/local/lcls/epics

STEP 8:
Create a folder to store the IOC data:
cd $IOC_DATA/<ioc-name>
If your IOC data area does not have an iocInfo subdirectory, create one:
mkdir iocInfo
If you are restoring pvs on reboot of your ioc
if using ChannelWatcher:
mkdir restore
if using Autosave:
mkdir autosave

STEP 9:
Build your IOC and test it. To run it:
cd $EPICS_IOC_TOP/<subsystem>/<module-with-version-number>/iocBoot/<ioc-name>
chmod+x st.cmd
./st.cmd

STEP 10:
Create directory for the soft ioc under /usr/local/lcls/epics/iocCommon. You might want to start by copying a working ioc:
cp -r sioc-in20-wa01 <your-ioc-name>

STEP 11:

  • Modify the startup.cmd file in iocCommon/<your-ioc-name>.
  • On the first line, replace the path with the path to your IOC's binary.
  • Fix the stuff in the comment box
  • Under "Go to IOC top directory and execute IOC startup script", replace the path to the iocBoot directory with the path to your IOC's boot directory.

STEP 12:

  • Test by executing ./startup.cmd
  • Run lclshome on lcls-builder to verify that all your PVs are connected.

STEP 13:
Add your IOC to /usr/local/lcls/epics/iocCommon/screeniocs so that it can be started using iocConsole. For an example, look at the section for sioc-in20-wa01
Verify that you can boot your IOC using iocConsole: iocConsole <ioc-name>

STEP 14:
Notify Jingchen when you are done. He will create system scripts to start and stop your IOC process, including automatic IOC startup when the daemon server is rebooted.

  • No labels