cram
is a utility that deploys software from development to multiple production facilities.
It includes the commands
ls
- Show current releases, available releases, unused releases etc.push
- Push/submit a new release for a software package to all facilities.upgrade
- Upgrade/deploy a previously submitted release to one or more cram
-type app in one or more sites/facilities.revert
- Reverts a cram
-type release to the previous release.history
- Displays the upgrade history for a software package.delete
- Delete a previously submitted release from the release repository if it is unused.run
- Run a script in the current release of one or more cram
-type app in one or more sites/facilities.For more details, see the main documentation.
cram
type of your software package by where it will live on production.
For example, applications containing IOCs have cram
type SIOC
or HIOC
since it belongs in $EPICS_IOC_TOP
.
The table below lists the various cram types and their link folders.
Note that the directory structure of software packages in production is not the same as in git
.
For more information, see Current softlinks.
cram type |
Location |
---|---|
SIOC/HIOC | $EPICS_IOC_TOP |
HLA | $PHYSICS_TOP |
PyDM | $PYDM |
Matlab | $MAT/toolbox |
Tools | ${TOOLS}/script |
cram
types above, please contact the controls infrastructure team to determine the link directory for your application type and provide this information to the cram
developers.
cram
for the first time, you must run cram configure
from any directory to generate ~/.cram_user_facilities.cfg
, a configuration file that contains ssh
logins to production servers you have access to as well as release and link folders for each cram
type.
For more information, see cram
types.
eco
and cd
into it.
[anle@lcls-dev3 test]$ eco
Enter name of module/package to checkout: pydm-mgnt
Enter name of tag or [RETURN] to create a sandbox named >
Checkout pydm-mgnt to sandbox directory pydm-mgnt/pydm-mgnt-git
...
[anle@lcls-dev3 test]$ cd pydm-mgnt/pydm-mgnt-git/
[anle@lcls-dev3 pydm-mgnt-git]$
cram describe
.
This creates a .cram
folder with the package information in packageinfo
.
This allows you to skip the name and type command line parameters when using cram
.
[anle@lcls-dev3 pydm-mgnt-git]$ cram describe
[anle@lcls-dev3 pydm-mgnt-git]$ git add .
[anle@lcls-dev3 pydm-mgnt-git]$ git commit -m "Add package information for cram"
[anle@lcls-dev3 pydm-mgnt-git]$ git push
cram
utilizes softlinks to specify releases that are being used in production.
cram ls
returns application and/or IOC versions by reading these softlinks, while cram upgrade
and cram revert
change their destinations to releases published by cram push
.
For each application, a softlink must be created before cram
is used for the first time.
Below is a guide as to how softlinks should be named and where they belong based on cram
type.
$EPICS_IOC_TOP/<Application>
must contain the softlink current
, which points to the master release of your application.
drwxrwxr-x 9 iocegr lcls MatlabSupport-R3-0-0-0
drwxrwxr-x 9 softegr lcls MatlabSupport-R3-1-0-0
drwxrwxr-x 10 softegr lcls MatlabSupport-R3-2-0-0
lrwxrwxrwx 1 softegr lcls current -> MatlabSupport-R3-2-0-0
[softegr@lcls-builder MatlabSupport]$
Furthermore, each IOC in $EPICS_IOCS
has its own softlink called iocSpecificRelease
.
It may point to a specific version of your application or current
.
lrwxrwxrwx st.cmd -> startup.cmd
-rwxrwxr-x startup.cmd
lrwxrwxrwx iocSpecificRelease -> ../../iocTop/MatlabSupport/current
[softegr@lcls-builder sioc-sys0-ml00]$
$EPICS_IOC_TOP
with the same name as your application that points to release/<Application>/<Release>
.
[anle@lcls-dev3 ~]$ cd ${TOOLS}/script
[anle@lcls-dev3 script]$ ls -ltrd MagnetAutoCheckout
lrwxr-xr-x 1 anle cd 33 Aug 3 11:47 MagnetAutoCheckout -> release/MagnetAutoCheckout/R1.0.1/
$PYDM
. Each one has the name of a subsystem and points to release/pydm-<subsystem>/<Release>
.
[anle@lcls-dev3 ~]$ cd $PYDM
[anle@lcls-dev3 display]$ ls -ltrd mgnt
lrwxr-xr-x 1 anle ad 24 Sep 1 2021 mgnt -> release/pydm-mgnt/R2.2.2/
cram
types
The release and link directories for each type in each facility is defined in facilities.cfg
.
For cram
to work properly, users must have a local copy of facilities.cfg
, ~/.cram_user_facilities.cfg
, which excludes facilities to which they do not have access.
This local copy is generated by cram describe
.
Since the PyDM type was recently added to cram
, your ~/.cram_user_facilities.cfg
is likely missing the release directories for PyDM:
[
{
"name" : "LCLS",
"ssh" : "softegr@lcls-srv01",
"gateway": "mcclogin",
"HIOC" : {
"releaseFolder" : "/usr/local/lcls/epics/iocTop",
"linkFolder" : "/usr/local/lcls/epics/iocCommon"
},
"SIOC" : {
"releaseFolder" : "/usr/local/lcls/epics/iocTop",
"linkFolder" : "/usr/local/lcls/epics/iocCommon"
},
"HLA" : {
"releaseFolder" : "/usr/local/lcls/physics/release",
"linkFolder" : "/usr/local/lcls/physics"
},
"Tools" : {
"releaseFolder" : "/usr/local/lcls/tools/script/release",
"linkFolder" : "/usr/local/lcls/tools/script"
},
"Matlab" : {
"releaseFolder" : "/usr/local/lcls/tools/matlab/toolbox/release",
"linkFolder" : "/usr/local/lcls/tools/matlab/toolbox"
},
"desc": "LCLS using lcls-builder as the deployment machine"
},
You can resolve this by deleting ~/.cram_user_facilities.cfg
and regenerating it with cram configure
, after which the PyDM type should appear:
[
{
"name" : "LCLS",
"ssh" : "softegr@lcls-srv01",
"gateway": "mcclogin",
"HIOC" : {
"releaseFolder" : "/usr/local/lcls/epics/iocTop",
"linkFolder" : "/usr/local/lcls/epics/iocCommon"
},
"SIOC" : {
"releaseFolder" : "/usr/local/lcls/epics/iocTop",
"linkFolder" : "/usr/local/lcls/epics/iocCommon"
},
"HLA" : {
"releaseFolder" : "/usr/local/lcls/physics/release",
"linkFolder" : "/usr/local/lcls/physics"
},
"Tools" : {
"releaseFolder" : "/usr/local/lcls/tools/script/release",
"linkFolder" : "/usr/local/lcls/tools/script"
},
"Matlab" : {
"releaseFolder" : "/usr/local/lcls/tools/matlab/toolbox/release",
"linkFolder" : "/usr/local/lcls/tools/matlab/toolbox"
},
"PyDM" : {
"releaseFolder" : "/usr/local/lcls/tools/pydm/display/release",
"linkFolder" : "/usr/local/lcls/tools/pydm/display"
},
"desc": "LCLS using lcls-builder as the deployment machine"
},
cram
CVS
.eco
.iocTop
where the releases are located.iocTop/packageName
, create the current
softlink and point it to the release that is currently being used in production.
drwxrwxr-x 9 iocegr lcls MatlabSupport-R3-0-0-0
drwxrwxr-x 9 softegr lcls MatlabSupport-R3-1-0-0
drwxrwxr-x 10 softegr lcls MatlabSupport-R3-2-0-0
lrwxrwxrwx 1 softegr lcls current -> MatlabSupport-R3-2-0-0
[softegr@lcls-builder MatlabSupport]$
iocCommon
, for each IOC belonging to the software package, create a iocSpecificRelease
softlink and point it to the current
softlink defined above.
You must use relative paths for these softlinks.
lrwxrwxrwx st.cmd -> startup.cmd
-rwxrwxr-x startup.cmd
lrwxrwxrwx iocSpecificRelease -> ../../iocTop/MatlabSupport/current
[softegr@lcls-builder sioc-sys0-ml00]$
bin
softlink to the iocTop area (many softIOC's used this approach) if you previously had one.
It does not hurt to have the bin
softlink but it is confusing and it makes it very hard to debug cram
failures.
The recommended way to refer to collateral in iocTop
is to use the iocSpecificRelease
link.
startup.cmd
to use the iocSpecificRelease
softlink.
You will need to change the hashbang
portion of the startup script by replacing #!bin/linux-x86
with #!iocSpecificRelease/bin/linux-x86
[softegr@lcls-builder sioc-sys0-ml00]$ cat startup.cmd
#!iocSpecificRelease/bin/linux-x86/matlabSupport
#==============================================================
#
# Abs: EPICS Soft IOC Startup Script for sioc-sys0-ml00
in addition to location from where iocBoot/st.cmd
is loaded where bin/../../iocBoot/
is replaced with iocSpecificRelease/iocBoot
. Note this listing has some portions alterted to make it fit.
# Go to IOC top directory and execute IOC startup script
cd <iocCommon>/sioc-sys0-ml00/iocSpecificRelease/iocBoot/sioc-sys0-ml00
< st.cmd
# Execute soft_post_st.cmd script
< /usr/local/lcls/epics/iocCommon/All/Prod/soft_post_st.cmd
screeniocs
to use the iocSpecificRelease
softlink instead of the bin
link.
For example, change .../sioc-sys0-ml00/bin/linux-x86/matlabSupport
to .../sioc-sys0-ml00/iocSpecificRelease/bin/linux-x86/matlabSupport
.
Note this listing has some portions alterted to make it fit.
[softegr@lcls-builder Prod]$ grep -e "^sioc-sys0-ml00" ${IOC_SCREEN}/screeniocs
sioc-sys0-ml00 <iocCommon>/sioc-sys0-ml00/iocSpecificRelease/bin/linux-x86/...
[softegr@lcls-builder Prod]$
screeniocs
, you'll need to log into the machine hosting the softIoc and restart the softIoc using the /etc/init.d
scripts.
You need to do this only during migration; this is because merely exiting from iocSh
in iocConsole
does not start a new screen session.
You can also accomplish the same using iocConsole your_ioc -cleanup
cram
.cram
eco
and cd
into it.
[mshankar@lcls-dev2 test]$ eco
Enter name of module/package to checkout: MatlabSupport
Enter name of tag or [RETURN] to use HEAD>
Using MAIN_TRUNK. The name of the directory will be 'MAIN TRUNK'.
...
[mshankar@lcls-dev2 test]$ cd MatlabSupport/MAIN_TRUNK
[mshankar@lcls-dev2 MAIN_TRUNK]$
cram describe
.
This creates a .cram
folder with the package information in packageinfo
.
This allows you to skip the name and type command line parameters when using cram
.
[mshankar@lcls-dev2 MAIN_TRUNK]$ cram describe
configure/CONFIG
for static builds with:
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
USR_SYS_LIBS += pcre
to your application's Makefile.
This will include libpcre.a
from the system libraries.
PROD_LIBS
using PROD_LIBS += asyn
and remove it from your <APP_libs> in your application's Makefile.
motor
module, you may need to pay attention to the order of the includes in the <APP_libs> in your application's Makefile.
For example,
smarActMCSMotor
uses motor
motor
uses asyn
SelfSeedingMotion_LIBS += smarActMCSMotor
SelfSeedingMotion_LIBS += motor
SelfSeedingMotion_LIBS += asyn
motor
and asyn
module's as part of PROD_LIBS
and remove it from your <APP_libs> in your application's Makefile.
calc
module, you may need to include the sscan
module in your configure/RELEASE
SSCAN_MODULE_VERSION=sscan-R2-8-1_1-0
SSCAN=$(EPICS_MODULES)/sscan/$(SSCAN_MODULE_VERSION)
and in your app's Makefile
. Note that the order of libs in the app's Makefile
matters for static builds, calc
before sscan
before EPICS_BASE_IOC_LIBS
seems to work.
softLlrf_LIBS += sscan
USR_SYS_LIBS
to add the library to the dynamic portion of the linker.
For example, you can add a line like so USR_SYS_LIBS += giomm-2.4
in your app's src/Makefile
.
However, you will still need to make sure the shared library is available on the production system or include the library in your package using LIB_INSTALLS
.
ldd
is a very useful tool. If you do an ldd bin/linux-x86/your_app
, you should only see .so
's from /usr/lib
or /lib
. If you see .so
's from other folders, you need to include the .a
's or you need to ship the .so
's using LIB_INSTALLS
..so
files from the environment), please bear in mind that it is likely that the .so
's may not be physically present on the production side(s).
Consider bundling these as part of your software package using the LIB_INSTALLS
variables of the EPICS build system.
Every dependency that needs to exist on the production side(s) is an entity that the system's team needs to maintain.
Please do make sure that they are aware of it and that there is a facility agnostic way to determine the location of these assets.
envPaths
will be fixed by the upgrade
script.
However, there will not be any modules on the production side of the fence.
So, any templates that are being loaded from the module folder need to be included in the application.
The EPICS build system already has support for adding a wide variety of file types to your software package and also allows for custom types.
In general, adding a file to your application consists of adding the file using something suitable like DB_INSTALLS
.
For example, to add autosave's save_restoreStatus.db
to your application, add the following line to your applications <app>/Db/Makefile
DB_INSTALLS += $(AUTOSAVE)/db/save_restoreStatus.db
and change your
st.cmd
to point to
dbLoadRecords("db/save_restoreStatus.db", "P=SIOC_$(AREA)-$(IOC_SUFF):")
instead of dbLoadRecords("$(AUTOSAVE)/db/save_restoreStatus.db", "P=SIOC_$(AREA)-$(IOC_SUFF):")
areaDetector.cfg
if you have one. Some areaDetector.cfg
have a cd $(AREA_DETECTOR)/ADApp/Db
as the first line. You may want to comment this out as we are not loading templates from the db
area.cram
has some ability to detect external resources using cram lint
.
You typically run cram lint
in a cycle with make clean
and make
.
An IOC make
generates the st.cmd
and envPaths
for all the ioc's in the software package.
cram lint
parses the st.cmd
for all the ioc's in the software package and points out
< $(AREA_DETECTOR)/include.cmd
cd
's to external folders like cd $(AREA_DETECTOR)/ADApp/Db
dbLoadRecords
; for example, dbLoadRecords("$(IOCADMIN)/db/iocAdminSoft.db", "IOC=SIOC:$(AREA):$(IOC_SUFF)")
dbLoadRecords
; these could be elements that were not added to the app's Makefile using DB_INSTALLS
cram lint
, run make clean
followed by make
and then run cram lint
.
You should see some thing like this
[mshankar@lcls-dev2 ProfileMonitorAD-R1-0-2]$ cram lint
Linting IOC iocBoot/sioc-b34-pm02
Linting IOC iocBoot/sioc-li20-pm20
iocBoot/sioc-b34-pm02/st.cmd:125 Missing file db/iocAdminSoft.db in ${TOP}; perhaps you...
iocBoot/sioc-b34-pm02/st.cmd:147 Add DB_INSTALLS += $(AREA_DETECTOR)/ADApp/Db/ADBase.te...
Fix these errors as appropriate and then run make clean
followed by make
followed by cram lint
.
msi
from EPICS base and not anywhere else.
That is, change references to msi
with IOC Makefiles and point it to ${EPICS_BASE_RELEASE}/bin/${EPICS_HOST_ARCH}/msi
.
make
and confirm that you are able to build your IOC app with these changes.
[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs add .cram
[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs add .cram/packageinfo
[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs commit
cram
to deploy your IOC package.cram
eco
and cd
into it.
[mshankar@lcls-dev2 test]$ eco
Enter name of module/package to checkout: MatlabSupport
Enter name of tag or [RETURN] to use HEAD>MatlabSupport-R3-2-0-0
Using MatlabSupport-R3-2-0-0. The name of the directory will be ...
...
[mshankar@lcls-dev2 test]$ cd MatlabSupport/MatlabSupport-R3-2-0-0/
[mshankar@lcls-dev2 MatlabSupport-R3-2-0-0]$
current
and the iocSpecificRelease
softlinks) has been set up correctly, you should be able to run cram ls
from within your tagged release folder.
This should get a list of the current releases for your software package.
[mshankar@lcls-dev2 MatlabSupport-R3-2-0-0]$ cram ls
Current versions on facility: LCLS
Current master release => MatlabSupport-R3-2-0-0
IOC: sioc-sys0-ml00 => MatlabSupport-R3-2-0-0
...
make
.
If your IOC software package has been currently set up, the make
should complete successfully.
cram push
to all facilities.
[mshankar@lcls-dev2 MatlabSupport-R3-2-0-0]$ cram push
Pushed release MatlabSupport-R3-2-0-0 to LCLS
...
If you are doing this for the first time, make sure that the new version of the software package made it to the iocTop
across all facilities.cram upgrade
. You will need to specify the facility and the IOC and the release.
...MatlabSupport-R3-2-0-0]$ cram upgrade -f TestFac -i sioc-sys6-ml00 MatlabSupport-R3-2-0-0
...MatlabSupport-R3-2-0-0]
cram ls
again.-i
argument. For example, cram upgrade -f TestFac -i sioc-sys6-ml00,sioc-sys6-ml01 MatlabSupport-R3-2-0-0
-i
argument. For example, cram upgrade -f TestFac -i sioc-sys6-ml* MatlabSupport-R3-2-0-0
-i ALL
. For example, cram upgrade -f TestFac -i ALL MatlabSupport-R3-2-0-0
-f ALL
. For example, cram upgrade -f ALL -i ALL MatlabSupport-R3-2-0-0
-m <comment>
. For example, cram upgrade -f LCLS -i sioc-sys0-mg06 -m "Fix database typo" R7.3.151
cram
uses the same approach used by HLA applications. Therefore, the preparation for HLA applications is straightforward.CVS
.eco
.${PHYSICS_TOP}
that points to the release within the release
folder.
[mshankar@lcls-dev2 ~]$ cd $PHYSICS_TOP
[mshankar@lcls-dev2 physics]$ ls -ltrd archiveviewer
lrwxr-xr-x 1 mshankar root 43 Nov 4 10:41 archiveviewer -> release/ArchiveViewer-R1-2-11/
${PHYSICS_TOP}/release
of each facility, create a packageName
folder (if it does not exist) and move the existing releases for the software package to the packageName
folder.
[mshankar@lcls-dev2 ~]$ cd ${PHYSICS_TOP}/release
[mshankar@lcls-dev2 release]$ mkdir archiveviewer
[mshankar@lcls-dev2 release]$ mv ArchiveViewer* archiveviewer
${PHYSICS_TOP}
to point to the current production release within the new release/packageName
folder.
Note this link will be broken because of the mv
in the previous step.
[mshankar@lcls-dev2 ~]$ cd $PHYSICS_TOP
[mshankar@lcls-dev2 physics]$ rm archiveviewer
rm: remove symbolic link `archiveviewer'? y
[mshankar@lcls-dev2 physics]$ ln -s release/archiveviewer/ArchiveViewer-R1-2-11 archiveviewer
[mshankar@lcls-dev2 physics]$ ls -ltra
cram
.cram
uses the same approach used by HLA applications. As long as you can build your application using ant
, you should be good to go.
However, there are a couple of steps.
Do these steps and commit into CVS before tagging your release.
eco
and cd
into it.
[mshankar@lcls-dev2 test]$ eco
Enter name of module/package to checkout: archiveviewer
Enter name of tag or [RETURN] to use HEAD>
Using MAIN_TRUNK. The name of the directory will be 'MAIN TRUNK'.
...
[mshankar@lcls-dev2 test]$ cd archiveviewer/MAIN_TRUNK/
[mshankar@lcls-dev2 MAIN_TRUNK]$
cram describe
.
This creates a .cram
folder with the package information in packageinfo
.
This allows you to skip the name and type command line parameters when using cram
.
[mshankar@lcls-dev2 MAIN_TRUNK]$ cram describe
ant
and make sure the application builds correctly.[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs add .cram
[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs add .cram/packageinfo
[mshankar@lcls-dev2 MAIN_TRUNK]$ cvs commit
jars
that are outside the package and include those jars
within the package.
This is not strictly necessary but will minimize migration headaches.
cram
eco
and cd
into it.
[mshankar@lcls-dev2 test]$ eco
Enter name of module/package to checkout: archiveviewer
Enter name of tag or [RETURN] to use HEAD>ArchiveViewer-R1-2-11
Using ArchiveViewer-R1-2-11. The name of the directory will be ...
...
[mshankar@lcls-dev2 test]$ cd archiveviewer/ArchiveViewer-R1-2-11/
[mshankar@lcls-dev2 ArchiveViewer-R1-2-11]$
cram ls
from within your tagged release folder.
This should get a list of the current releases for your software package.
[mshankar@lcls-dev2 ArchiveViewer-R1-2-11]$ cram ls
Current version on facility: LCLS => ArchiveViewer-R1-2-11
Current version on facility: FACET => ArchiveViewer-R1-2-11
Current version on facility: TestFac => ArchiveViewer-R1-2-11
Current version on facility: Dev => ArchiveViewer-R1-2-11
[mshankar@lcls-dev2 ArchiveViewer-R1-2-11]$
ant
.
If your HLA software package has been currently set up, the ant
should complete successfully.
cram push
to all facilities.
[mshankar@lcls-dev2 ArchiveViewer-R1-2-11]$ cram push
Pushed release ArchiveViewer-R1-2-11 to LCLS
...
If you are doing this for the first time, make sure that the new version of the software package made it to the ${PHYSICS_TOP}/release
across all facilities.cram upgrade
. You will need to specify the facility and the IOC and the release.
...ArchiveViewer-R1-2-11]$ cram upgrade -f LCLS ArchiveViewer-R1-2-11
...ArchiveViewer-R1-2-11]
cram ls
again.-f
argument. For example, cram upgrade -f TestFac,LCLS ArchiveViewer-R1-2-11
-f ALL
. For example, cram upgrade -f ALL ArchiveViewer-R1-2-11
cram
uses the same approach used by HLA applications. Therefore, the preparation for PyDM displays is straightforward.pydm-subsystem
.Git
.eco
.${PYDM}
that points to the release within the release
folder should remain subsystem
.
[anle@lcls-dev3 ~]$ cd $PYDM
[anle@lcls-dev3 display]$ ls -ltrd mgnt
lrwxr-xr-x 1 anle ad 24 Sep 1 2021 mgnt -> release/pydm-mgnt/R2.2.2/
${PYDM}/release
of each facility, create a pydm-subsystem
folder (if it does not exist) and move the existing releases for the display package to the pydm-subsystem
folder.
[anle@lcls-dev3 ~]$ cd ${PYDM}/release
[anle@lcls-dev3 release]$ mkdir pydm-mgnt
[anle@lcls-dev3 release]$ mv ../mgnt pydm-mgnt/R2.2.2
${PYDM}
pointing to the current production release within the new release/pydm-subsystem
folder.
[anle@lcls-dev3 ~]$ cd $PYDM
[anle@lcls-dev3 display]$ ln -s release/pydm-mgnt/R2.2.2 mgnt
[anle@lcls-dev3 display]$ ls -ltra
cram
.eco
and cd
into it.
[anle@lcls-dev3 test]$ eco
Enter name of module/package to checkout: pydm-mgnt
Enter name of tag or [RETURN] to create a sandbox named >
Checkout pydm-mgnt to sandbox directory pydm-mgnt/pydm-mgnt-git
...
[anle@lcls-dev3 test]$ cd pydm-mgnt/pydm-mgnt-git/
[anle@lcls-dev3 pydm-mgnt-git]$
cram describe
.
This creates a .cram
folder with the package information in packageinfo
.
This allows you to skip the name and type command line parameters when using cram
.
[anle@lcls-dev3 pydm-mgnt-git]$ cram describe
[anle@lcls-dev3 pydm-mgnt-git]$ git add .
[anle@lcls-dev3 pydm-mgnt-git]$ git commit -m "Add package information for cram"
[anle@lcls-dev3 pydm-mgnt-git]$ git push
cram
eco
and cd
into it.
[anle@lcls-dev3 test]$ eco
Enter name of module/package to checkout: pydm-mgnt
Enter name of tag or [RETURN] to create a sandbox named >R2.2.2
Checkout pydm-mgnt, tag R2.2.2, to directory pydm-mgnt/R2.2.2
...
[anle@lcls-dev3 test]$ cd pydm-mgnt/R2.2.2/
[anle@lcls-dev3 R2.2.2]$
pydm-subsystem-git
.cram ls
from within your tagged release folder.
This should get a list of the current releases for your display package.
[anle@lcls-dev3 R2.2.2]$ cram ls
Current version on facility: LCLS => R2.2.2
Current version on facility: FACET => R2.2.2
Current version on facility: TestFac => R2.2.2
Current version on facility: Dev => R2.2.2
[anle@lcls-dev3 R2.2.2]$
cram push
to all facilities.
[anle@lcls-dev3 R2.2.2]$ cram push
Pushed release R2.2.2 to LCLS
...
If you are doing this for the first time, make sure that the new version of the display package made it to the ${PYDM}/release
across all facilities.cram upgrade
. You will need to specify the facility and the release.
[anle@lcls-dev3 R2.2.2]$ cram upgrade -f LCLS R2.2.2
[anle@lcls-dev3 R2.2.2]$
cram ls
again.-f
argument. For example, cram upgrade -f TestFac,LCLS R2.2.2
-f ALL
. For example, cram upgrade -f ALL R2.2.2
cram
uses the same approach used by HLA applications. Therefore, the preparation for scripts is straightforward.Git
.eco
.${TOOLS}/script
that points to the release within the release
folder.
[anle@lcls-dev3 ~]$ cd ${TOOLS}/script
[anle@lcls-dev3 script]$ ls -ltrd MagnetAutoCheckout
lrwxr-xr-x 1 anle cd 33 Aug 3 11:47 MagnetAutoCheckout -> release/MagnetAutoCheckout/R1.0.1/
${TOOLS}/script/release
of each facility, create a packageName
folder (if it does not exist) and move the existing releases for the script package to the packageName
folder.
[anle@lcls-dev3 ~]$ cd ${TOOLS}/script/release
[anle@lcls-dev3 release]$ mkdir MagnetAutoCheckout
[anle@lcls-dev3 release]$ mv ../MagnetAutoCheckout MagnetAutoCheckout/R1.0.1
${TOOLS}/script
pointing to the current production release within the new release/packageName
folder.
[anle@lcls-dev3 ~]$ cd ${TOOLS}/script
[anle@lcls-dev3 script]$ ln -s release/MagnetAutoCheckout/R1.0.1 MagnetAutoCheckout
[anle@lcls-dev3 script]$ ls -ltra
cram
.eco
and cd
into it.
[anle@lcls-dev3 test]$ eco
Enter name of module/package to checkout: MagnetAutoCheckout
Enter name of tag or [RETURN] to create a sandbox named >
Checkout MagnetAutoCheckout to sandbox directory MagnetAutoCheckout/MagnetAutoCheckout-git
...
[anle@lcls-dev3 test]$ cd MagnetAutoCheckout/MagnetAutoCheckout-git/
[anle@lcls-dev3 MagnetAutoCheckout-git]$
cram describe
.
This creates a .cram
folder with the package information in packageinfo
.
This allows you to skip the name and type command line parameters when using cram
.
[anle@lcls-dev3 MagnetAutoCheckout-git]$ cram describe
[anle@lcls-dev3 MagnetAutoCheckout-git]$ git add .
[anle@lcls-dev3 MagnetAutoCheckout-git]$ git commit -m "Add package information for cram"
[anle@lcls-dev3 MagnetAutoCheckout-git]$ git push
cram
eco
and cd
into it.
[anle@lcls-dev3 test]$ eco
Enter name of module/package to checkout: MagnetAutoCheckout
Enter name of tag or [RETURN] to create a sandbox named >R1.0.1
Checkout MagnetAutoCheckout, tag R1.0.1, to directory MagnetAutoCheckout/R1.0.1
...
[anle@lcls-dev3 test]$ cd MagnetAutoCheckout/R1.0.1/
[anle@lcls-dev3 R1.0.1]$
packageName-git
.cram ls
from within your tagged release folder.
This should get a list of the current releases for your script package.
[anle@lcls-dev3 R1.0.1]$ cram ls
Current version on facility: LCLS => R1.0.1
Current version on facility: FACET => R1.0.1
Current version on facility: TestFac => R1.0.1
Current version on facility: Dev => R1.0.1
[anle@lcls-dev3 R1.0.1]$
cram push
to all facilities.
[anle@lcls-dev3 R1.0.1]$ cram push
Pushed release R1.0.1 to LCLS
...
If you are doing this for the first time, make sure that the new version of the script package made it to the ${TOOLS}/script
across all facilities.cram upgrade
. You will need to specify the facility and the release.
[anle@lcls-dev3 R1.0.1]$ cram upgrade -f LCLS R1.0.1
[anle@lcls-dev3 R1.0.1]$
cram ls
again.-f
argument. For example, cram upgrade -f TestFac,LCLS R1.0.1
-f ALL
. For example, cram upgrade -f ALL R1.0.1