Original method

In general, you'll do your dune-artdaq / dune-raw-data development in an area which you've installed, on a branch designed for the specific work you're doing (e.g. the "fragment_generator_for_component_X" branch rather than the "develop" branch) and which only you (or people in your subgroup) make code changes in. Once you're confident that your code changes are ready to be used by everyone working with the dune-artdaq package, you'll want to push your branch to the central repo, at which point experts will merge your changes into the develop branch and deploy them to the standard dune-artdaq installations. To push, you'll want to be on lxplus rather than np04-srv-XXX. So first, log into an lxplus node:

ssh -l <your username> lxplus.cern.ch
and then once you're on lxplus
scp -rp np04-srv-014:<path to dune-artdaq or dune-raw-data repo you modified> .
kinit <your fermilab username>@FNAL.GOV
cd <modified repo you scp'd>
git remote rm origin
# The command below could also be ssh://p-dune-raw-data@cdcvs.fnal.gov/cvs/projects/dune-raw-data
git remote add origin ssh://p-dune-artdaq@cdcvs.fnal.gov/cvs/projects/dune-artdaq 
git push origin <branch you want to push>
once you've done this, send an email to John Freeman and Kurt Biery (jcfree@fnalNOSPAMPLEASE.gov and biery@fnalNOSPAMPLEASE.gov) announcing you'd like your changes merged into the develop branch, and CC Karol and Giovanna, revkarol@gmailNOSPAMPLEASE.com and Giovanna.Lehmann@cernNOSPAMPLEASE.ch.

New method (under construction, not guaranteed to work)

It's now possible to push your code changes on the np04-srv-* machines directly into the central repositories at Fermilab. The instructions on how to get set up to do this are below; as a prerequisite, however, you'll want to have write access to the dune-artdaq (and, if applicable, dune-raw-data) repositories. You can check this by going to https://cdcvs.fnal.gov/redmine/projects/dune-artdaq and ADD MORE STUFF HERE

The way to do it is the following:

* From the computer you usually use to log in to lxplus before subsequently logging into the ProtoDUNE cluster, execute

kinit <your username at cern>@CERN.CH</code> # Obviously, replace <your username at cern> with your actual username
ssh -XK <your username at cern>@lxplus.cern.ch
and once you're logged into the lxplus node, first take note of the node you got logged onto by looking at the $HOSTNAME variable - we'll want to use it a few steps below. Then get into the ProtoDUNE cluster:
ssh -XK <your username at cern>@np04-srv-010 
and once you're onto the ProtoDUNE cluster, if you haven't already done this (i.e., this is your first time going through these instructions), then you'll want to create what's known as an "ssh key pair"; as a practical matter, this means you execute
cd ~/.ssh
...which will create a private key and a public key. Then, to quote the instructions at https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/Ssh_notes#public-key-access from which these instructions partially derive: "It will ask you for a passphrase to keep your private key encrypted. Do not use your system password, etc. for this passphrase, rather pick a nice long phrase, but one you can remember. This will create $HOME/.ssh/id_dsa and $HOME/.ssh/id_dsa.pub, which are your private and public keys, respectively. You should copy these key files (or even your whole .ssh directory) to whatever computer accounts you have, so that you can establish your key authentication from that account. And of course you should keep the id_dsa file readable only by you."

Next, you'll want to add the following code snippet to your ~/.ssh/config file:

Host cdcvs.fnal.gov
    ProxyJump <your username at cern>@<the lxplus node you used to get onto the cluster>
    ForwardX11 = no
    ForwardAgent true
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials yes
A word concerning the "" token in the snippet. You'll want to of course replace this token with what it refers to. But in general, what you want is a working lxplus node. In this writer's experience, pushing code failed when the specific node listed became unavailable (unplugged, perhaps) and started working again when I replaced it with a functioning lxplus node. Keep this in mind going forward.

After adding the snippet, execute the following:

ssh-agent bash
ssh-add $HOME/.ssh/id_dsa 
and then cd into the dune-artdaq git repository in which you're developing and do the following:
git remote set-url origin ssh://p-dune-artdaq@cdcvs.fnal.gov/cvs/projects/dune-artdaq
if you plan on pushing changes to dune-raw-data, then you just cd into the dune-raw-data repository and follow the previous instructions but replace "dune-artdaq" with "dune-raw-data"

Before you can push changes to the central repository, there's a final step. Contact John Freeman (jcfree@fnalNOSPAMPLEASE.gov) and/or Kurt Biery (biery@fnalNOSPAMPLEASE.gov) and ask them to add the public key you created with the ssh-keygen command to p-dune-artdaq@cdcvsNOSPAMPLEASE.fnal.gov (and p-dune-raw-data@cdcvsNOSPAMPLEASE.fnal.gov as well, if applicable).

-- JohnChristianFreeman - 2019-05-24

Edit | Attach | Watch | Print version | History: r8 | r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2019-05-24 - JohnChristianFreeman
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CENF All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback