dmwm/deployment — pull request #72 by PerilousApricot (2013-05-31 17:42:54+00:00)
Title: Add single-user support for frontends

Adds support for the -a Deploy option to the frontend, to prevent
the CMS-installed apache service from conflicting with system-wide
HTTP services and to ease automated integration testing

Here's a dump of it working:

```
+ set -e
+ su vagrant -c /vagrant/scripts/install-frontend.sh
++ set -e
++ export http_proxy=http://fs1.accre.vanderbilt.edu:3128
++ http_proxy=http://fs1.accre.vanderbilt.edu:3128
++ REPO_DEPLOYMENT_PATH=/vagrant/repos/deployment
++ INSTALL_PWD=/data
++ FRONTEND_EXTRA_CERTIFICATES=/vagrant/misc/extra-certificates.txt
++ FRONTEND_SITEDB_MAPPING=
++ FRONTEND_HOSTCERT=/vagrant/certs/hostcert.pem
++ FRONTEND_HOSTKEY=/vagrant/certs/hostkey.pem
++ WMAGENT_INSTALL_POSTFIX=wmagent-install
++ CMSWEB_INSTALL_POSTFIX=cmsweb-install
++ WMAGENT_INSTALL_LOCATION=/data/wmagent-install
++ CMSWEB_INSTALL_LOCATION=/data/cmsweb-install
++ WMCORE_SOURCE_TREE=/home/meloam/analysis/WMCore
++ WMCORE_TAG=0.9.26
++ CMSWEB_TAG=HG1303a
+++ hostname -f
++ MY_HOSTNAME=localhost
++ REPO='-r comp=comp.pre'
++ export SCRAM_ARCH=slc6_amd64_gcc461
++ SCRAM_ARCH=slc6_amd64_gcc461
++ '[' '!' -e /data/cfg ']'
++ '[' -e /data/cmsweb-install/current ']'
++ pkill -9 -f /data/cmsweb-install
++ true
++ mkdir -p /data/cmsweb-install
++ cd /data/cmsweb-install
++ '[' '!' -e certs ']'
++ mkdir -p certs
++ '[' '!' -r /vagrant/certs/hostcert.pem ']'
++ '[' -e certs/hostcert.pem ']'
+++ sudo cp /vagrant/certs/hostcert.pem certs/hostcert.pem
++ '[' -e certs/hostkey.pem ']'
+++ sudo cp /vagrant/certs/hostkey.pem certs/hostkey.pem
+++ id -un
+++ id -gn
++ sudo chown vagrant:vagrant certs/hostcert.pem certs/hostkey.pem
++ chmod 600 certs/hostcert.pem certs/hostkey.pem
++ export X509_USER_CERT=/data/cmsweb-install/certs/hostcert.pem
++ X509_USER_CERT=/data/cmsweb-install/certs/hostcert.pem
++ export X509_USER_KEY=/data/cmsweb-install/certs/hostkey.pem
++ X509_USER_KEY=/data/cmsweb-install/certs/hostkey.pem
++ /data/cfg/Deploy -R cmsweb@HG1303a -t install -r comp=comp.pre -A slc6_amd64_gcc461 -s 'prep sw' /data/cmsweb-install admin frontend
/data/cfg/Deploy: line 45: lsb_release: command not found
INFO: 20130531020224: starting deployment of: admin frontend
INFO: deploying backend - variant: default, version: default
INFO: bootstrapping comp.pre software area in /data/cmsweb-install/install/sw.pre
INFO: bootstrap successful
INFO: deploying admin - variant: default, version: default
INFO: deploying wmcore-auth - variant: default, version: default
INFO: deploying frontend - variant: default, version: default
INFO: generating fake login with user vagrant password hXGQULqIOjFroMt dn ''
INFO: installation log can be found in /data/cmsweb-install/.deploy/20130531-020224-6768-prepsw.log
INFO: installation completed sucessfully
++ '[' /home/meloam/analysis/WMCore -a -e /home/meloam/analysis/WMCore ']'
++ /data/cfg/Deploy -R cmsweb@HG1303a -t install -r comp=comp.pre -A slc6_amd64_gcc461 -s post /data/cmsweb-install admin frontend
/data/cfg/Deploy: line 45: lsb_release: command not found
INFO: 20130531020627: starting deployment of: admin frontend
INFO: deploying backend - variant: default, version: default
INFO: deploying admin - variant: default, version: default
INFO: deploying wmcore-auth - variant: default, version: default
INFO: deploying frontend - variant: default, version: default
INFO: installation log can be found in /data/cmsweb-install/.deploy/20130531-020627-8276-post.log
INFO: installation completed sucessfully

++ '[' -e /home/vagrant/.globus/usercert.pem ']'
++ set +x
Starting frontend..
++ set +x
+++ cut -f2- '-d '
+++ openssl x509 -noout -subject -in /data/cmsweb-install/certs/hostcert.pem
++ dn='/DC=com/DC=DigiCert-Grid/O=Open Science Grid/OU=Services/CN=brazil.accre.vanderbilt.edu'
++ echo '"/DC=com/DC=DigiCert-Grid/O=Open Science Grid/OU=Services/CN=brazil.accre.vanderbilt.edu" cms'
++ '[' -e /home/vagrant/.globus/usercert.pem ']'
+ exit 0
```