Project

General

Profile

How to Run project-py from Mac

  • checkout poms and project-py
    export PROJ_TOP=$HOME/app  # or whatever dir you will put poms and project-py in 
    mkdir $PROJ_TOP
    cd   $PROJ_TOP
    git clone ssh://p-prod_mgmt_db@cdcvs.fnal.gov/cvs/projects/prod_mgmt_db poms
    git clone ssh://p-project-py@cdcvs.fnal.gov/cvs/projects/project-py project-py
    
    
  • mount /grid/fermiapp
    mkdir -p /grid/fermiapp
    sudo mount blue2.fnal.gov:/fermigrid-fermiapp /grid/fermiapp
    
  • install lxml as a python parser for XML
    Install HomeBrew (https://docs.brew.sh/Manpage)
    Install libxml2  #installed by Brew
    sudo pip install lxml==4.2.5
    pip list
    pip show lxml
    
  • Get x509up_u8587 from uboonegpvm01. Note I could not get voms-proxy-init on my mac. The one in UPS seemed to old to work with the new fnal vom server.
    login on uboonegpvm01.
    kinit <username>   # Get kerberos ticket.
    kx509
    voms-proxy-init -noregen -rfc -voms fermilab:/fermilab/uboone/Role=Analysis -valid 500:00
    We need to do below every 28 days to store a new proxy in myproxy:
    cigetcert -s fifebatch.fnal.gov
    myproxy-info -s myproxy.fnal.gov -vd
    On your mac: scp yuyi@uboonegpvm01.fnal.gov:/tmp/x509up_u8587 /tmp/.
    
  • Setup running evnoriment
    PROJ_TOP=$HOME/app  # set to where ever you have poms and project-py check out.
    source /grid/fermiapp/products/common/etc/setups.sh
    cd  $PROJ_TOP/poms/poms_client
    setup -. poms_client
    export X509_USER_PROXY=`ls /tmp/x509*`/
    export USER=$USER
    export EXPERIMENT=uboone
    export JOBSUB_GROUP=uboone
    export PROJECT_PY_DIR=$PROJ_TOP/project-py
    export PATH=$PATH:$PROJ_TOP/project-py/bin
    #export PYTHONPATH=$PROJ_TOP/project-py/python:/Library/Python/2.7/site-packages:$PYTHONPATH
    export PYTHONPATH=$PROJ_TOP/project-py/python:$PYTHONPATH
    
  • Convert XML to ini and cfg (This is what in the cdcvs, the rest are not commit yet)
    poms_cli.py --xml uboone_project_py_config.xml
    poms-cli.py --submit --campaign_id 1234
    
  • For the POMS developers, you can now run poms client APIs. The best way to do it is download an ini from poms web page and modify a few place.
    upload_wf  --experiment samdev --int your-poms.ini