PAGE UNDER CONSTRUCTION
To install your POMS development instance on a Virtual Machine (VM), you need to create a VM, if you don't have already one, by following instruction here.¶
ssh as root in to your "freshly created VM", for example fermicloudXXX.fnal.gov (check in $USER@fcluigpvm01.fnal.gov your VM through the following command: one_check-pingVMs.sh)
go in /opt dir a create your workdir, you can also may want to change the owner of that dir and permissions
you also need to add a dir for the logs (it's hardcoded now, it will be fixed - Task #15529).
Then exit from the root session.
cd /opt mkdir <workdirname> # USE A NAME FOR YOUR WORKDIR, for example poms_workdir chown <USER> poms_workdir # REPLACE YOUR USER ACCOUNT chmod 700 poms_workdir #OPTIONAL mkdir -p /home/poms/private/logs/poms # TO BE FIXED (Task #15529) chown <USER> /home/poms/private/logs/poms exit
Log in as user. You are now ready to setup your development instance of POMS!
ssh fermicloudXXX.fnal.gov cd /opt/poms_workdir unset PRODUCTS #NOT NEEDED, but ... unset UPS_DIR #NOT NEEDED, but ... unset SETUP_UPS #NOT NEEDED, but ... wget ftp://ftp.fnal.gov/products/bootstrap/v3_0/ups_bootstrap_unified_v5_0_4_Linux64bit+2.tar.gz tar xzf ups_bootstrap_unified_v5_0_4_Linux64bit+2.tar.gz . `pwd`/setups.sh PATH=$PATH:/bin:/usr/bin #NOT NEEDED, but ... setup upd upd install -G -c ups v5_2_0 upd install -G -c pycurl v7_15_5 # NOT A DIRECT DEPENDENCY OF POMS (jobsub) upd install -G -c pytest v3_0_5 # NEEDED by the POMS devel upd install -G -c sqlalchemy v1_0_12 setup ups upd install -G -c poms v1_1_0 setup poms cd $POMS_DIR/webservice scp poms@fermicloud045:~/.pgpass $HOME python service.py &
You should now be able to talk to a poms v1_1_0 instance on localhost:8080.
From a browser:
You should kill that one off:
kill %1 exit
Now you should make a development instance checked out from Git:
ssh fermicloudXXX.fnal.gov cd /opt/<workdirname> . `pwd`/setups.sh cd poms git clone ssh://email@example.com/cvs/projects/prod_mgmt_db devel cd devel ups declare -r `pwd` -M ups -m poms.table poms devel -0 ups declare -c poms devel -0
And try it out.
setup poms devel cd $POMS_DIR/webservice nohup python service.py > nohup.out 2>&1 &
Adding SSO authentication¶
To have a completely stand alone development machine with authentication you would have to register your development machine with the Single Sign On service folks. An easier way to get this functionality is to proxy your development server through fermicloud045 so your development machine provides all the content from your development instance but the SSO functionality is handled by fermicloud045.
To do this add lines like this to the /etc/httpd/conf.d/poms.conf file on fermicloud045:
<Location /poms_joe> AuthType shibboleth ShibCompatWith24 On ShibRequestSetting requireSession 1 require shib-session ShibBasicHijack On require valid-user ShibUseEnvironment On </Location> ProxyPass /poms_joe/ http://fermicloud013.fnal.gov:8080/poms/