EPICS under Vesta for Dummies

Primer
The EPICS configuration and database files at X12B are under the Vesta software configuration management. Vesta provides (i) version management, (ii) source control, and (iii) a build and make process.

The Vesta service at X12B was implemented in 2004 by Bill Nolan. Please see him with questions and for help with Vesta or visit this short Vesta Tutorial site.

Vesta maintains an immutable and immortal repository file system from which one can checkout into work directories a copy of selected packages for source development. I.e. in the figure below, the x12b package of major/minor version 2/2 is shown checked out into the /vesta-work space. Note that the repository and the work space are distinct file systems.

In the workspace files are edited, created, and deleted in the usual ways.

When changes are ready for testing, they are stored as minor versions in the repository as well as shipped to the appropriate computer (x12b-h or 12b-v) by invoking the vmake tool. Minor versions are numbered. The starting version 0 is an exact copy of the checked out package, and each vmake creates a new numbered version in the repository, 1 thru near infinity.

Once a major development step is completed one can check in this latest versions to become a new major version. These are also numbered, typically 0 thru 10. The complete version number is then major/minor. By running vmake on old versions one can always recreate previous trusted code.

Following are five recipes on how to go about changes to the EPICS stuff at X12B.


Recipe 1
Who has
Before editing software, it is best to verify if a package is already checked out into a working directory. For the X12B EPICS stuff this is done by visiting the Vesta repository as follows:
  • Log into x12b-h as user epics:
    ssh epics@x12b-h.nsls.bnl.gov
  • Find the path to the /vesta file system and server on w04 or munin:
    cd /vesta/w04.nsls.bnl.gov
  • Make your way to the beamline's EPICS repository:
    cd epics/config/x12b
  • Ask Vesta if the x12b package is checked out, and if so to whom using:
    vwhohas ./
  • ...$ /vesta/w04.nsls.bnl.gov/epics/config/x12b/10 epics@nsls.bnl.gov
    If the answer is as shown above, the beamline's EPICS package is already checked out and user epics can begin source modification following the steps in recipe 3. Otherwise go to recipe 2.


Recipe 2
Checkout
If vwhohas (see recipe 1) reports that the target package is not yet checked out into the users /vesta-work directory fetch the latest version from the repository as follows:
  • In the Vesta repository file system cascade down to the X12B EPICS directory as in recipe 1
    ssh epics@x12b-h.nsls.bnl.gov
    vesta/w04.nsls.bnl.gov/epics/config/x12b
  • Check out a copy of the latest repository files of the x12b package into /vesta-work directory created for user epics by:
    vcheckout ./


Recipe 3
Change
Code
Checked out software packages (see recipes 1 or 2) are edited in the /vesta-work directories and then pushed to the application server and the Vesta repository using vmake as follows:
  • Log into x12b-h as user epics:
    ssh epics@x12b-h.nsls.bnl.gov
  • Change directory to the /vesta-work (not /vesta) file system and to the checked out x12b package:
    cd /vesta-work/epics/x12b
  • In the appropriate x12b subdirectory edit the files that need revision. I.e. edit Gonio_Head.db in the the data base subdirectory:
    cd db
    emacs Gonio_head.db
  • Change directory back up the the x12b beamline EPICS package and launch vmake using:
    cd ..
    vmake -shipto /tftpboot
    Two actions occur: (1) A new minor version of the x12b package is created in the Vesta repository file system. (2) Vmake ships a fully made executable to x12b-h taking into account all dependencies. Note: for vmake to ship the new applications to the X12B processors one must have come here from the x12b-h node.
  • Run the new software after rebooting the relevant EPICS IOC: typically the VME crate or the EPICS instance running under Linux on x12b-h.
  • Note, instead of running vmake which will push the new code to its application node, you may just wish to secure changes made by advancing them into a new repository version. In place of vmake above use:
    vadvance


Recipe 4
Restore
Old
Previous applications can be restored from the Vesta repository. The exact files, dependencies, libraries, etc that were in use at that previous time will be used to recreate old applications.
  • Log into x12b-h as user epics:
    ssh epics@x12b-h.nsls.bnl.gov
  • Change directory to the /vesta file system and to the x12b EPICS package:
    cd /vesta/w04.nsls.bnl.gov
    cd epics/config/x12b
  • From here, follow the checkout branch, say to find major/minor version 10/3
    cd checkout/10/3
  • Remake this old application and ship it to the X12B nodes. These will need to be rebooted to load and run the restored software.
    vmake -shipto /tftpboot


Recipe 5
Checkin
Occasionally, and following major systems development, stable new code should be checked into the repository as a new major version. This archiving requires just one additional step, vcheckin, in a sequence that is otherwise the same as the routine code changing in recipe 3.
  • Become epics user on x12b-h:
    ssh epics@x12b-h.nsls.bnl.gov
  • Cascade down the /vesta-work file system to the the x12b package:
    cd /vesta-work/epics/x12b
  • Create a major new version by:
    vcheckin

Updated 9 Nov 2005 Security Notice   Webteam   Site Map   Bio   PXRR   NSLS   BNL