Project

General

Profile

How to set up for ds50daq development on dsfr6-wh14

First-time steps

This section has the initial steps that you should use. Once you have executed some of these steps, they will not need to be done again.

Also, please note that some of these steps are time-sensitive. That is, they may need to be updated as we create new git branches or make other changes based on who is working on which feature.

At the moment, the WH14 teststand consists of a gateway node (ds50ws.fnal.gov) which you can log into using a kerberos ticket and two private-network nodes (dsfr6 and dseb8) that we log into using SSH keys.

So, the very first step is to create an SSH key using the "ssh-keygen" utility and have someone with sufficient system privileges distribute your public key file to your .ssh directory on dsfr6 and dseb8 as well as the DS50 repository account's .ssh directory on cdcvs.fnal.gov. (In order to access the ds50daq and artdaq git repositories from the private network machines, you will need an SSH key that has an empty passphrase. So, it might be convenient to simply create this initial key without a passphrase and then that key can be used both for logins and git access. In addition, your empty-passphrase key will need to be installed in the central git repositories for these products as described here . There are more notes on SSH keys here .)

Once the key files are distributed, you may need to add the key to your key chain on ds50ws in order to log into dsfr6/dseb8. To do this, run "ssh-agent bash" and "ssh-add ~/.ssh/<yourPrivateKey>". Then you should be able to "ssh dsfr6" and "rsh dseb8".

Next steps...

Log into your account on dsfr6.

Edit your .bashrc file to add the following lines:
  • source /products/setup
  • export FHICL_FILE_PATH=.
  • export CETPKG_INSTALL=$HOME/products
  • export CETPKG_J=16
  • export DS50DAQ_BASE_PORT=5440
    • Actually, each developer should pick a differ base port for their testing. Please pick a port number that is at least 20 away from other users. The base ports that have been claimed so far:
      • 5440 - the default
      • 6630 - Kurt
Then run the following commands:
  1. source $HOME/.bashrc
  2. mkdir /scratch/<yourUserName> # if needed
  3. ln -s /scratch/<yourUserName> $HOME/scratch
  4. mkdir $HOME/scratch/ds50daqBuild
  5. mkdir $HOME/products
  6. ssh -n -N -T -f -L<yourTunnelPortNumber>:cdcvs.fnal.gov:22 ds50wsp [this port number should be different than the one above]
  7. cd <yourSourceCodeParentDir> # if desired
  8. git clone ssh://p-ds50daq@localhost:<yourTunnelPortNumber>/cvs/projects/ds50daq
  9. cd <yourSourceCodeParentDir>/ds50daq
  10. git flow init -d
    • For some reason, git flow init -d does not always set the "production release branch". When this happens, we should run the git flow init command without the "-d" and specify the Branch Name for Production Releases as master. Then, the remaining questions will have the expected defaults and we can simply accept the defaults.
  11. ./script/createSetupScript.sh
    • suggestions for answering the questions: Profile build; <yourSourceCodeParentDir/ds50daq; $HOME/scratch/ds50daqBuild
  12. source ./setupDS50DAQ [this moves you to the build directory]
  13. buildtool -c [the small "c" arguments requests a "make clean" before building the code - be careful to only run the "clean" step from the build directory]

Subsequent steps

After your environment is set up, you only need to run the following commands to fetch the latest code from git and rebuild your local copy.
  1. cd <yourSourceCodeParentDir>/ds50daq
  2. restart the SSH tunnel, if needed
  3. git pull
  4. source ./setupDS50DAQ [this moves you to the build directory]
  5. buildtool -c
  6. or, buildtool -C [the large "C" argument tells buildtool to re-generate the makefiles from the CMake files]
  7. or, buildtool