Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • DM/dm-docs
  • hammonds/dm-docs
  • hparraga/dm-docs
3 results
Show changes
Showing
with 1438 additions and 0 deletions
[WebService]
serviceHost=0.0.0.0
servicePort=33336
sslCertFile=DM_INSTALL_DIR/etc/ssl/daq-web-service.crt
sslKeyFile=DM_INSTALL_DIR/etc/ssl/daq-web-service.key
sslCaCertFile=DM_INSTALL_DIR/etc/ssl/cacert.pem
[AuthorizationPrincipalManager]
principalRetriever=dm.ds_web_service.service.auth.dsAuthPrincipalRetriever.DsAuthPrincipalRetriever()
#principalRetriever=DbPrincipalRetriever()
#principalRetriever=NoOpPrincipalRetriever()
principalAuthenticator1=CryptedPasswordPrincipalAuthenticator()
principalAuthenticator2=LdapPasswordPrincipalAuthenticator(serverUrl='ldaps://phoebusldap.aps.anl.gov:636', dnFormat='uid=%s,ou=people,o=aps.anl.gov,dc=aps,dc=anl,dc=gov')
[FileSystemObserver]
# Minimum file processing delay since last update
minFileProcessingDelayInSeconds=10
fileSystemEventTimeoutInSeconds=10
[FileProcessingManager]
nProcessingThreads=3
fileProcessor1=dm.common.plugins.rsyncFileTransferPlugin.RsyncFileTransferPlugin(dest='/tmp/data')
[DsRestApiFactory]
username=dm
passwordFile=DM_INSTALL_DIR/etc/DM_DB_NAME.ds.passwd
host=DM_DS_WEB_SERVICE_HOST
port=DM_DS_WEB_SERVICE_PORT
protocol=DM_DS_WEB_SERVICE_PROTOCOL
[DbManager]
dbSchema=DM_DB_NAME
dbUser=DM_DB_NAME
dbPasswordFile=DM_INSTALL_DIR/etc/DM_DB_NAME.db.passwd
# Available logger levels: debug, info, warn, error, critical
[ConsoleLogging]
handler=ConsoleLoggingHandler(sys.stdout,)
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateFormat=%Y/%m/%d %H:%M:%S
[FileLogging]
handler=TimedRotatingFileLoggingHandler('DM_INSTALL_DIR/var/log/daq-web-service.log')
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateFormat=%Y/%m/%d %H:%M:%S
DM_DB_NAME=dm
DM_DB_USER=dm
DM_DB_HOST=127.0.0.1
DM_DB_PORT=11136
DM_DB_ADMIN_USER=postgres
DM_DB_ADMIN_HOSTS="127.0.0.1"
DM_DB_CHARACTER_SET=utf8
DM_DB_SCRIPTS_DIR=
DM_CONTEXT_ROOT=dm
DM_DS_WEB_SERVICE_PORT=22236
DM_DAQ_WEB_SERVICE_PORT=33336
DM_SOFTWARE_VERSION="0.1 (DM_DATE)"
# Logging Configuration File
#
#
# Available sections:
# [LoggerLevels] : lists regular levelregex to match against loggers.
# [ConsoleLogging] : configures logging onto screen
# [FileLogging] : configures logging into local file
# The root key describes the root
# logger level which is the default level for all loggers.
# Level regular expressions (levelregex) are matched top down with the first
# match setting the effective level. If no matches are found, default applies.
# Available logger levels: debug, info, warn, error, critical
# In order for a message to be emitted by a specific handler the level of
# the message must be greater than or equal to both the logger level and
# the handler level.
#
# Example: Debug level for DbManager, info for everything else
#
# [LoggerLevels]
# levelregex: ^.*$=info
# ^DbManager$=debug
#
[LoggerLevels]
root=error
levelregex: ^.*$=debug
#[ConsoleLogging]
#handler=ConsoleLoggingHandler(sys.stdout,)
#level=debug
#format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
#dateformat=%Y-%m-%d %H:%M:%S
# Custom log files can be setup here using config section [FileLogging<name>]
[FileLogging]
handler=TimedRotatingFileLoggingHandler('/home/sveseli/Work/DM/dev/var/log/dm.fsService.log')
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateformat=%Y-%m-%d %H:%M:%S
# Logging Configuration File
#
#
# Available sections:
# [LoggerLevels] : lists regular levelregex to match against loggers.
# [ConsoleLogging] : configures logging onto screen
# [FileLogging] : configures logging into local file
# The root key describes the root
# logger level which is the default level for all loggers.
# Level regular expressions (levelregex) are matched top down with the first
# match setting the effective level. If no matches are found, default applies.
# Available logger levels: debug, info, warn, error, critical
# In order for a message to be emitted by a specific handler the level of
# the message must be greater than or equal to both the logger level and
# the handler level.
#
# Example: Debug level for DbManager, info for everything else
#
# [LoggerLevels]
# levelregex: ^.*$=info
# ^DbManager$=debug
#
[LoggerLevels]
root=error
levelregex: ^.*$=debug
[ConsoleLogging]
handler=ConsoleLoggingHandler(sys.stdout,)
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateformat=%Y-%m-%d %H:%M:%S
# Custom log files can be setup here using config section [FileLogging<name>]
[FileLogging]
handler=TimedRotatingFileLoggingHandler('/home/sveseli/Work/DM/dev/var/log/dm.log')
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateformat=%Y-%m-%d %H:%M:%S
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
# Uncomment out to enable OpenSSL configuration see config(3)
# openssl_conf = openssl_init
# To use this configuration file with the "-extfile" option of the
# "openssl x509" utility, name here the section containing the
# X.509v3 extensions to use:
# extensions =
# (Alternatively, use a configuration file that has only
# X.509v3 extensions in its main [= default] section.)
[openssl_init]
# Extra OBJECT IDENTIFIER info:
oid_section = new_oids
alg_section = algs
[ new_oids ]
# We can add new OIDs in here for use by any config aware application
# Add a simple OID like this:
# shortname=Long Object Identifier Name, 1.2.3.4
# Or use config file substitution like this:
# testoid2=OID2 LONG NAME, ${testoid1}.5.6, OTHER OID
[ algs ]
# Algorithm configuration options. Currently just fips_mode
fips_mode = no
####################################################################
[ ca ]
default_ca = CA_default # The default ca section
####################################################################
[ CA_default ]
dir = $ENV::DM_INSTALL_DIR/etc/CA # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
database = $dir/index.txt # database index file.
#unique_subject = no # Set to 'no' to allow creation of
# several ctificates with same subject.
new_certs_dir = $dir/newcerts # default place for new certs.
certificate = $dir/cacert.pem # The CA certificate
serial = $dir/serial # The current serial number
crlnumber = $dir/crlnumber # the current crl number
# must be commented out to leave a V1 CRL
crl = $dir/crl.pem # The current CRL
private_key = $dir/private/cakey.pem# The private key
RANDFILE = $dir/private/.rand # private random number file
x509_extensions = usr_cert # The extentions to add to the cert
# Comment out the following two lines for the "traditional"
# (and highly broken) format.
name_opt = ca_default # Subject Name options
cert_opt = ca_default # Certificate field options
# Extension copying option: use with caution.
# copy_extensions = copy
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
# so this is commented out by default to leave a V1 CRL.
# crlnumber must also be commented out to leave a V1 CRL.
# crl_extensions = crl_ext
default_days = 3650 # how long to certify for
default_crl_days= 30 # how long before next CRL
default_md = sha512 # which md to use.
preserve = no # keep passed DN ordering
# A few difference way of specifying how similar the request should look
# For type CA, the listed attributes must be the same, and the optional
# and supplied fields are just that :-)
policy = policy_match
# For the CA policy
[ policy_match ]
countryName = match
stateOrProvinceName = optional
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
# For the 'anything' policy
# At this point in time, you must list all acceptable 'object'
# types.
[ policy_anything ]
countryName = optional
#stateOrProvinceName = optional
#localityName = optional
organizationName = optional
#organizationalUnitName = optional
commonName = supplied
emailAddress = optional
####################################################################
[ req ]
default_bits = 2048
default_md = sha512
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
x509_extensions = v3_ca # The extentions to add to the self signed cert
# Passwords for private keys if not present they will be prompted for
# input_password = secret
# output_password = secret
# This sets a mask for permitted string types. There are several options.
# default: PrintableString, T61String, BMPString.
# pkix : PrintableString, BMPString.
# utf8only: only UTF8Strings.
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
# MASK:XXXX a literal mask value.
# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
# so use this option with caution!
# we use PrintableString+UTF8String mask so if pure ASCII texts are used
# the resulting certificates are compatible with Netscape
string_mask = MASK:0x2002
# req_extensions = v3_req # The extensions to add to a certificate request
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = US
countryName_min = 2
countryName_max = 2
#stateOrProvinceName = State or Province Name (full name)
#stateOrProvinceName_default =
#localityName = Locality Name (eg, city)
#localityName_default =
0.organizationName = Organization Name (eg, company)
0.organizationName_default = Argonne National Laboratory
# we can do this but it is not needed normally :-)
1.organizationName = Second Organization Name (eg, company)
1.organizationName_default = Advanced Photon Source
organizationalUnitName = Organizational Unit Name (eg, section)
organizationalUnitName_default = AES/SSG
commonName = Common Name (eg, your name or your server\'s hostname)
commonName_max = 64
emailAddress = Email Address
emailAddress_max = 64
# SET-ex3 = SET extension number 3
[ req_attributes ]
challengePassword = A challenge password
challengePassword_min = 4
challengePassword_max = 20
unstructuredName = An optional company name
[ usr_cert ]
# These extensions are added when 'ca' signs a request.
# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.
basicConstraints=CA:FALSE
# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.
# This is OK for an SSL server.
# nsCertType = server
# For an object signing certificate this would be used.
# nsCertType = objsign
# For normal client use this is typical
# nsCertType = client, email
# and for everything including object signing:
# nsCertType = client, email, objsign
# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"
# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move
# Copy subject details
# issuerAltName=issuer:copy
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName
[ server ]
basicConstraints=CA:FALSE
nsCertType = server
nsComment = "OpenSSL Generated Server Certificate"
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
[ v3_ca ]
# Extensions for a typical CA
# PKIX recommendation.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer:always
# This is what PKIX recommends but some broken software chokes on critical
# extensions.
basicConstraints = critical,CA:true
# So we do this instead.
#basicConstraints = CA:true
# Key usage: this is typical for a CA certificate. However since it will
# prevent it being used as an test self-signed certificate it is best
# left out by default.
# keyUsage = cRLSign, keyCertSign
# Some might want this also
# nsCertType = sslCA, emailCA
# Include email address in subject alt name: another PKIX recommendation
# subjectAltName=email:copy
# Copy issuer details
# issuerAltName=issuer:copy
# DER hex encoding of an extension: beware experts only!
# obj=DER:02:03
# Where 'obj' is a standard or added object
# You can even override a supported extension:
# basicConstraints= critical, DER:30:03:01:01:FF
[ crl_ext ]
# CRL extensions.
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always,issuer:always
[ proxy_cert_ext ]
# These extensions should be added when creating a proxy certificate
# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.
basicConstraints=CA:FALSE
# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.
# This is OK for an SSL server.
# nsCertType = server
# For an object signing certificate this would be used.
# nsCertType = objsign
# For normal client use this is typical
# nsCertType = client, email
# and for everything including object signing:
# nsCertType = client, email, objsign
# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"
# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer:always
# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move
# Copy subject details
# issuerAltName=issuer:copy
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName
# This really needs to be in place for it to be a proxy certificate.
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
DM_DB_NAME=dm_dev
DM_DB_USER=dm_dev
DM_DB_HOST=127.0.0.1
DM_DB_PORT=11136
DM_DB_ADMIN_USER=postgres
DM_DB_ADMIN_HOSTS="127.0.0.1 bluegill1.aps.anl.gov gaeaimac.aps.anl.gov visa%.aps.anl.gov"
DM_DB_CHARACTER_SET=utf8
DM_DB_SCRIPTS_DIR=
DM_CONTEXT_ROOT=dm_dev
DM_DS_WEB_SERVICE_PORT=22237
DM_DAQ_WEB_SERVICE_PORT=33337
DM_SOFTWARE_VERSION="Development Snapshot (DM_DATE)"
[WebService]
serviceHost=0.0.0.0
servicePort=22236
sslCertFile=DM_INSTALL_DIR/etc/ssl/ds-web-service.crt
sslKeyFile=DM_INSTALL_DIR/etc/ssl/ds-web-service.key
sslCaCertFile=DM_INSTALL_DIR/etc/ssl/cacert.pem
[AuthorizationPrincipalManager]
principalRetriever=dm.common.service.authentication.DbPrincipalRetriever()
#principalRetriever=NoOpPrincipalRetriever()
principalAuthenticator1=CryptedPasswordPrincipalAuthenticator()
principalAuthenticator2=LdapPasswordPrincipalAuthenticator(serverUrl='ldaps://phoebusldap.aps.anl.gov:636', dnFormat='uid=%s,ou=people,o=aps.anl.gov,dc=aps,dc=anl,dc=gov')
[StorageManager]
storageDirectory=DM_STORAGE_DIR
[DbManager]
dbSchema=DM_DB_NAME
dbUser=DM_DB_NAME
dbPasswordFile=DM_INSTALL_DIR/etc/DM_DB_NAME.db.passwd
# Available logger levels: debug, info, warn, error, critical
[ConsoleLogging]
handler=ConsoleLoggingHandler(sys.stdout,)
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateFormat=%Y/%m/%d %H:%M:%S
[FileLogging]
handler=TimedRotatingFileLoggingHandler('DM_INSTALL_DIR/var/log/ds-web-service.log')
level=debug
format=%(asctime)s,%(msecs)003d %(levelname)s %(filename)s:%(lineno)d %(process)d: %(message)s
dateFormat=%Y/%m/%d %H:%M:%S
#!/bin/sh
#
# dm-fs-service
#
# Starts the DM FileSystem Service
#
# chkconfig: 345 98 98
# description: controls DM FileSystem Service
### BEGIN INIT INFO
# Provides: dm-fs-service
# Required-Start: $local_fs dm-postgresql
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: controls DM FileSystem Service
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
# For SELinux we need to use 'runuser' not 'su'
SU=su
if [ -x /sbin/runuser ]; then
SU=runuser
fi
# Check if we are root before running command
runCommand() {
_cmd="$@"
echo "COMMAND: $_cmd"
if [ `id -u` = 0 ]; then
$SU -l $DM_USER -c "_$cmd"
else
eval "$_cmd"
fi
}
# Set defaults for configuration variables
if [ -z $DM_ROOT_DIR ]; then
myDir=`dirname $0`
currentDir=`pwd` && cd $myDir/../..
export DM_ROOT_DIR=`pwd`
cd $currentDir
fi
DM_SETUP_FILE=$DM_ROOT_DIR/setup.sh
if [ ! -f $DM_SETUP_FILE ]; then
echo "Setup file $DM_SETUP_FILE does not exist."
exit 2
fi
. $DM_SETUP_FILE > /dev/null
mkdir -p ${DM_ROOT_DIR}/var/run
mkdir -p ${DM_ROOT_DIR}/var/log
#DM_USER=dm
DM_USER=`whoami`
DM_PORT=22236 # 222-DM
DM_HOST=0.0.0.0
DAEMON_CMD=${DM_ROOT_DIR}/lib/python/dm/fs_service/service/fsService.py
DAEMON_NAME="DmFsService"
PIDFILE=${DM_ROOT_DIR}/var/run/dm_fs_service.pid
DAEMON_ARGS="-d -p $PIDFILE --port $DM_PORT --host $DM_HOST --n-server-threads 12"
export DM_LOG_CONFIG_FILE=${DM_ROOT_DIR}/etc/dm.fsService.log.conf
# Determine SSL flags:
# DM_SERVICE_PROTOCOL=https
# DM_SERVICE_SSL_CERT_FILE=<cert path>
# DM_SERVICE_SSL_KEY_FILE=<key path>
# DM_SSL_CA_CERT_FILE=<ca cert path> (enables checking client certificates)
if [ "$DM_SERVICE_PROTOCOL" = "https" ]; then
if [ -z "$DM_SERVICE_SSL_CERT_FILE" ]; then
echo "Cannot start service using SSL: DM_SERVICE_SSL_CERT_FILE is not defined." && exit 2
fi
if [ -z "$DM_SERVICE_SSL_KEY_FILE" ]; then
echo "Cannot start service using SSL: DM_SERVICE_SSL_KEY_FILE is not defined." && exit 2
fi
DAEMON_ARGS="$DAEMON_ARGS -c $DM_SERVICE_SSL_CERT_FILE -k $DM_SERVICE_SSL_KEY_FILE"
# Client certificate will be checked if DM_SSL_CA_CERT_FILE is provided.
if [ ! -z "$DM_SSL_CA_CERT_FILE" ]; then
DAEMON_ARGS="$DAEMON_ARGS -C $DM_SSL_CA_CERT_FILE"
fi
fi
RETVAL=0
start() {
# Check if service is already running
status -p $PIDFILE > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -n $"Starting $DAEMON_NAME daemon: "
runCommand ${DAEMON_CMD} ${DAEMON_ARGS}
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"$DAEMON_NAME startup" || failure $"$DAEMON_NAME startup"
echo
fi
return $RETVAL
}
stop() {
status -p $PIDFILE > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo -n $"Stopping $DAEMON_NAME daemon: "
PID=`cat $PIDFILE`
kill $PID
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $PIDFILE && success $"$DAEMON_NAME shutdown" || failure $"$DAEMON_NAME shutdown"
echo
fi
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status -p $PIDFILE "$DAEMON_NAME"
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
RETVAL=2
esac
exit $RETVAL
#! /bin/sh
### BEGIN INIT INFO
# Provides: glassfish
# Required-Start: $remote_fs $network $syslog
# Required-Stop: $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts GlassFish
# Description: Starts GlassFish application server
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Set root to default if needed.
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
if [ -z "${DM_ROOT_DIR}" ]; then
DM_ROOT_DIR=$MY_DIR/../..
fi
# Source environment file.
DM_USER=`id -nu`
DM_HOST=`hostname -s`
DM_ENV_FILE=${DM_ROOT_DIR}/setup.sh
if [ ! -f ${DM_ENV_FILE} ]; then
echo "Environment file ${DM_ENV_FILE} does not exist."
exit 2
fi
. ${DM_ENV_FILE} > /dev/null
export AS_JAVA=$DM_SUPPORT_DIR/java/$DM_HOST_ARCH
DM_GLASSFISH_DIR=$DM_SUPPORT_DIR/glassfish/$DM_HOST_ARCH
DERBY_DIR=$DM_SUPPORT_DIR/glassfish/$DM_HOST_ARCH/javadb/bin
DM_DAEMON_NAME=glassfish
DM_DAEMON_CONTROL_CMD=$DM_GLASSFISH_DIR/bin/asadmin
DM_DAEMON_START_ARGS="start-domain domain1"
DM_DAEMON_STOP_ARGS="stop-domain domain1"
DM_DAEMON_STATUS_CMDS="uptime list-domains list-applications list-jdbc-resources"
start() {
echo -n $"Starting ${DM_DAEMON_NAME}: "
# Check if we're a privileged user
if [ `id -u` = 0 -a ${DM_USER} != "root" ]; then
su -m -c "${DM_DAEMON_CONTROL_CMD} ${DM_DAEMON_START_ARGS}" ${DM_USER}
else
${DM_DAEMON_CONTROL_CMD} ${DM_DAEMON_START_ARGS}
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"${DM_DAEMON_NAME} startup" || failure $"${DM_DAEMON_NAME} startup"
echo
}
stop() {
echo -n $"Stopping ${DM_DAEMON_NAME}: "
# Check if we're a privileged user
if [ `id -u` = 0 -a ${DM_USER} != "root" ]; then
su -m -c "${DM_DAEMON_CONTROL_CMD} ${DM_DAEMON_STOP_ARGS}" ${DM_USER}
else
${DM_DAEMON_CONTROL_CMD} ${DM_DAEMON_STOP_ARGS}
fi
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"${DM_DAEMON_NAME} shutdown" || failure $"${DM_DAEMON_NAME} shutdown"
echo
}
status() {
# Check if we're a privileged user
if [ `id -u` = 0 -a ${DM_USER} != "root" ]; then
for cmd in ${DM_DAEMON_STATUS_CMDS}; do
su -m -c "${DM_DAEMON_CONTROL_CMD} ${cmd}" ${DM_USER}
done
else
for cmd in ${DM_DAEMON_STATUS_CMDS}; do
${DM_DAEMON_CONTROL_CMD} ${cmd}
done
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
#!/bin/sh
#
# dm-postgresql
#
# Starts the PostgreSQL server used for DM software
#
# Modified from the original RHEL postgresql init.d script
#
# chkconfig: 345 97 97
# description: controls Dm database server
### BEGIN INIT INFO
# Provides: dm-postgresql
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: controls Dm database server
### END INIT INFO
# PGVERSION is the full package version, e.g., 8.4.0
PGVERSION=9.3.4
# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
# Source function library.
. /etc/rc.d/init.d/functions
# Get function listing for cross-distribution logic.
TYPESET=`typeset -f|grep "declare"`
# Get config.
. /etc/sysconfig/network
# Find the name of the script
# NAME=`basename $0`
NAME="DM Database"
# For SELinux we need to use 'runuser' not 'su'
SU=su
if [ -x /sbin/runuser ]; then
SU=runuser
fi
# Check if we are root before running command
runCommand() {
_cmd="$@"
if [ `id -u` = 0 ]; then
$SU -l $PGUSER -c "_$cmd" >> $PGSTARTUPLOG 2>&1 < /dev/null
else
eval "$_cmd" >> $PGSTARTUPLOG 2>&1 < /dev/null
fi
}
# Set defaults for configuration variables
if [ -z $DM_ROOT_DIR ]; then
myDir=`dirname $0`
currentDir=`pwd` && cd $myDir/../..
export DM_ROOT_DIR=`pwd`
cd $currentDir
fi
DM_SETUP_FILE=$DM_ROOT_DIR/setup.sh
if [ ! -f $DM_SETUP_FILE ]; then
echo "Setup file $DM_SETUP_FILE does not exist."
exit 2
fi
. $DM_SETUP_FILE > /dev/null
PGROOT=$DM_SUPPORT_DIR/postgresql/$DM_HOST_ARCH
PGENGINE=$PGROOT/bin
#PGUSER=dm
PGUSER=`whoami`
PGGROUP=`groups $PGUSER | cut -f3 -d ' '`
PGPORT=11136 # 111-DM
PGDATA=$PGROOT/data
PGRUNDIR=$DM_INSTALL_DIR/var/run
PGLOGDIR=$DM_INSTALL_DIR/var/log
PGSTARTUPLOG=$PGLOGDIR/postgresql
PGPIDFILE=$PGRUNDIR/postmaster.pid
PGLOCKFILE=$PGRUNDIR/postmaster.lock
mkdir -p $PGDATA && chown -R $PGUSER:$PGGROUP $PGDATA || exit 1
mkdir -p $PGRUNDIR && chown -R $PGUSER:$PGGROUP $PGRUNDIR || exit 1
mkdir -p $PGLOGDIR && chown -R $PGUSER:$PGGROUP $PGLOGDIR || exit 1
export PGDATA
export PGPORT
export LD_LIBRARY_PATH=$PGROOT/lib
# Check that networking is up.
# Pretty much need it for postmaster.
[ "${NETWORKING}" = "no" ] && exit 1
[ -f "$PGENGINE/postmaster" ] || exit 1
script_result=0
start() {
PSQL_START=$"Starting ${NAME} service: "
# Make sure startup-time log file is valid
if [ ! -e "$PGSTARTUPLOG" -a ! -h "$PGSTARTUPLOG" ]; then
touch "$PGSTARTUPLOG" || exit 1
chown $PGUSER:$PGGROUP "$PGSTARTUPLOG"
chmod go-rwx "$PGSTARTUPLOG"
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGSTARTUPLOG"
fi
# Check for the PGDATA structure
if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]; then
# Check version of existing PGDATA
if [ x`cat "$PGDATA/PG_VERSION"` != x"$PGMAJORVERSION" ]; then
SYSDOCDIR="(Your System's documentation directory)"
echo
echo $"An old version of the database format was found."
echo $"You need to upgrade the data format before using PostgreSQL."
echo $"See $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
exit 1
fi
# No existing PGDATA! Warn the user to initdb it.
else
echo
echo "$PGDATA is missing. Use \"$0 initdb\" to initialize the cluster first."
echo_failure
echo
exit 1
fi
echo -n "$PSQL_START"
cmd="$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &"
runCommand $cmd
sleep 2
pid=`pidof -s "$PGENGINE/postmaster"`
if [ $pid ] && [ -f "$PGDATA/postmaster.pid" ]; then
success "$PSQL_START"
touch $PGLOCKFILE
head -n 1 "$PGDATA/postmaster.pid" > $PGPIDFILE
echo
else
failure "$PSQL_START"
echo
script_result=1
fi
}
stop() {
echo -n $"Stopping ${NAME} service: "
cmd="export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; $PGENGINE/pg_ctl stop -D '$PGDATA' -s -m fast"
runCommand $cmd
ret=$?
if [ $ret -eq 0 ]; then
echo_success
else
echo_failure
script_result=1
fi
echo
rm -f $PGPIDFILE
rm -f $PGLOCKFILE
}
restart() {
stop
start
}
condrestart() {
[ -e $PGLOCKFILE ] && restart
}
condstop() {
[ -e $PGLOCKFILE ] && stop
}
reload() {
cmd="export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; $PGENGINE/pg_ctl reload -D '$PGDATA' -s"
runCommand $cmd
}
initdb() {
if [ -f "$PGDATA/PG_VERSION" ]; then
echo -n "Data directory is not empty!"
echo_failure
echo
script_result=1
else
echo -n $"Initializing database: "
if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]; then
mkdir -p "$PGDATA" || exit 1
chown $PGUSER:$PGGROUP "$PGDATA"
chmod go-rwx "$PGDATA"
fi
# Clean up SELinux tagging for PGDATA
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
# Make sure the startup-time log file is OK, too
if [ ! -e "$PGSTARTUPLOG" -a ! -h "$PGSTARTUPLOG" ]; then
touch "$PGSTARTUPLOG" || exit 1
chown $PGUSER:$PGGROUP "$PGSTARTUPLOG"
chmod go-rwx "$PGSTARTUPLOG"
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGSTARTUPLOG"
fi
# Initialize the database
cmd="$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'"
runCommand $cmd
# Create directory for postmaster log
mkdir -p "$PGDATA/pg_log"
chown $PGUSER:$PGGROUP "$PGDATA/pg_log"
chmod go-rwx "$PGDATA/pg_log"
if [ -f "$PGDATA/PG_VERSION" ]; then
echo_success
else
echo_failure
script_result=1
fi
echo
fi
}
# This script is slightly unusual in that the name of the daemon (postmaster)
# is not the same as the name of the subsystem (postgresql)
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status postmaster
script_result=$?
;;
restart)
restart
;;
condrestart)
condrestart
;;
condstop)
condstop
;;
reload|force-reload)
reload
;;
initdb)
initdb
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop|reload|force-reload|initdb}"
exit 1
esac
exit $script_result
../src/python
\ No newline at end of file
#!/bin/sh
#
# Script used for configuring DM webapp
# Deployment configuration can be set in etc/$DM_DB_NAME.deploy.conf file
#
# Usage:
#
# $0 [DM_DB_NAME]
#
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
if [ -z "${DM_ROOT_DIR}" ]; then
DM_ROOT_DIR=$MY_DIR/..
fi
DM_ENV_FILE=${DM_ROOT_DIR}/setup.sh
if [ ! -f ${DM_ENV_FILE} ]; then
echo "Environment file ${DM_ENV_FILE} does not exist."
exit 2
fi
. ${DM_ENV_FILE} > /dev/null
# Use first argument as db name, if provided
DM_DB_NAME=${DM_DB_NAME:=dm}
if [ ! -z "$1" ]; then
DM_DB_NAME=$1
fi
echo "Using DB name: $DM_DB_NAME"
# Look for deployment file in etc directory, and use it to override
# default entries
deployConfigFile=$DM_ROOT_DIR/etc/${DM_DB_NAME}.deploy.conf
if [ -f $deployConfigFile ]; then
echo "Using deployment config file: $deployConfigFile"
. $deployConfigFile
else
echo "Deployment config file $deployConfigFile not found, using defaults"
fi
DM_HOST_ARCH=`uname | tr [A-Z] [a-z]`-`uname -m`
GLASSFISH_DIR=$DM_SUPPORT_DIR/glassfish/$DM_HOST_ARCH
JAVA_HOME=$DM_SUPPORT_DIR/java/$DM_HOST_ARCH
export AS_JAVA=$JAVA_HOME
ASADMIN_CMD=$GLASSFISH_DIR/bin/asadmin
DM_DB_HOST=${DM_DB_HOST:=localhost}
DM_DB_PORT=${DM_DB_PORT:=11136}
DM_DB_USER=${DM_DB_USER:=dm}
DM_DB_PASSWORD=${DM_DB_PASSWORD:=dm}
DM_DB_POOL=postgresql_${DM_DB_NAME}_DbPool
DM_DATA_SOURCE=${DM_DB_NAME}_DataSource
DM_DOMAIN=domain1
# copy db driver
echo "Copying db driver"
rsync -ar $DM_ROOT_DIR/src/java/DmWebPortal/lib/postgresql-9.3-1102.jdbc41.jar $GLASSFISH_DIR/glassfish/domains/${DM_DOMAIN}/lib/ext
# restart server
echo "Restarting glassfish"
$ASADMIN_CMD stop-domain ${DM_DOMAIN}
$ASADMIN_CMD start-domain ${DM_DOMAIN}
# create JDBC connection pool
echo "Creating JDBC connection pool $DM_DB_POOL"
$ASADMIN_CMD create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGSimpleDataSource --restype javax.sql.DataSource --property user=${DM_DB_USER}:password=${DM_DB_PASSWORD}:driverClass="org.postgresql.Driver":portNumber=${DM_DB_PORT}:databaseName=${DM_DB_NAME}:serverName=${DM_DB_HOST}:url="jdbc\:postgresql\://${DM_DB_HOST}\:${DM_DB_PORT}/${DM_DB_NAME}" ${DM_DB_POOL}
# create JDBC resource associated with this connection pool
echo "Creating JDBC resource $DM_DATA_SOURCE"
$ASADMIN_CMD create-jdbc-resource --connectionpoolid ${DM_DB_POOL} ${DM_DATA_SOURCE}
# test the connection settings
echo "Testing connection"
$ASADMIN_CMD ping-connection-pool $DM_DB_POOL || exit 1
#!/bin/sh
#
# Script used for creating DM database
# Deployment configuration can be set in etc/$DM_DB_NAME.deploy.conf file
#
# Usage:
#
# $0 [DM_DB_NAME [DM_DB_SCRIPTS_DIR]]
#
DM_DB_NAME=dm
DM_DB_USER=dm
DM_DB_PASSWORD=dm
DM_DB_HOST=127.0.0.1
DM_DB_PORT=11136
DM_DB_ADMIN_USER=postgres
DM_DB_ADMIN_HOSTS="127.0.0.1 bluegill1.aps.anl.gov visa%.aps.anl.gov"
DM_DB_ADMIN_PASSWORD=
DM_DB_CHARACTER_SET=utf8
CURRENT_DIR=`pwd`
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
cd $CURRENT_DIR
if [ -z "${DM_ROOT_DIR}" ]; then
DM_ROOT_DIR=$MY_DIR/..
fi
DM_SQL_DIR=$DM_ROOT_DIR/db
DM_RUN_DIR=$DM_ROOT_DIR/var/run
DM_ENV_FILE=${DM_ROOT_DIR}/setup.sh
if [ ! -f ${DM_ENV_FILE} ]; then
echo "Environment file ${DM_ENV_FILE} does not exist."
exit 1
fi
. ${DM_ENV_FILE} > /dev/null
# DM_SUPPORT_DIR should now be defined.
if [ -z "$DM_SUPPORT_DIR" ]; then
echo "Invalid environment file ${DM_ENV_FILE}: DM_SUPPORT_DIR is not defined."
exit 1
fi
PG_DIR=$DM_SUPPORT_DIR/postgresql/$DM_HOST_ARCH
PG_CONTROL_SCRIPT=$DM_ROOT_DIR/etc/init.d/dm-postgresql
PG_DATA_DIR=$PG_DIR/data
PG_HBA_CONF=$PG_DATA_DIR/pg_hba.conf
DB_LOCK_FILE=${DM_RUN_DIR}/${DM_DB_NAME}.db.lock
DB_CREATE_SCRIPT=${DM_ROOT_DIR}/db/create_${DM_DB_NAME}_db.sql
# Use first argument as db name, if provided
if [ ! -z "$1" ]; then
DM_DB_NAME=$1
fi
echo "Using DB name: $DM_DB_NAME"
# Look for deployment file in etc directory, and use it to override
# default entries
deployConfigFile=$DM_ROOT_DIR/etc/${DM_DB_NAME}.deploy.conf
if [ -f $deployConfigFile ]; then
echo "Using deployment config file: $deployConfigFile"
. $deployConfigFile
else
echo "Deployment config file $deployConfigFile not found, using defaults"
fi
# Second argument overrides directory with db population scripts
DM_DB_SCRIPTS_DIR=${DM_DB_SCRIPTS_DIR:=$DM_SQL_DIR}
if [ ! -z "$2" ]; then
DM_DB_SCRIPTS_DIR=$2
fi
if [ ! -d $DM_DB_SCRIPTS_DIR ]; then
echo "DB Scripts directory $DM_DB_SCRIPTS_DIR does not exist."
exit 1
fi
echo "Using DB scripts directory: $DM_DB_SCRIPTS_DIR"
execute() {
msg="$@"
if [ ! -z "$DM_DB_ADMIN_PASSWORD" ]; then
sedCmd="s?$DM_DB_ADMIN_PASSWORD?\\*\\*\\*\\*\\*\\*?g"
echo "Executing: $@" | sed -e $sedCmd
else
echo "Executing: $@"
fi
eval "$@"
}
createDb() {
if [ -f $DB_LOCK_FILE ]; then
echo "Database lock file $DB_LOCK_FILE already exists, will not proceed."
return 1
fi
echo "Creating database $DM_DB_NAME"
${PG_DIR}/bin/createdb -U $DM_DB_USER -h $DM_DB_HOST -p $DM_DB_PORT $DM_DB_NAME || return 1
echo "Creating database schema for $DM_DB_NAME"
${PG_DIR}/bin/psql -U $DM_DB_USER -h $DM_DB_HOST -p $DM_DB_PORT -d $DM_DB_NAME -f $DB_CREATE_SCRIPT || return 1
touch $DB_LOCK_FILE
}
createDbUser() {
_dbUser=$1
shift 1
_createFlags=$@
# create user
${PG_DIR}/bin/createuser -h $DM_DB_HOST -p $DM_DB_PORT $_createFlags $_dbUser || return 1
}
modifyDbUserPassword() {
_dbUser=$1
_dbPassword=$2
_tmpFile=/tmp/$$.sql
echo "alter user $_dbUser with password '$_dbPassword';" > $_tmpFile
$PG_DIR/bin/psql -h $DM_DB_HOST -p $DM_DB_PORT -d postgres -f $_tmpFile
rm -f $_tmpFile
}
# Check for failed earlier attempt
if [ -f $PG_HBA_CONF.orig ]; then
echo "File $PG_HBA_CONF.orig exists, refusing to proceed."
exit 1
fi
# Initialize db if needed
dbAction=restart
createDbRootUser=false
if [ ! -f $PG_HBA_CONF ]; then
$PG_CONTROL_SCRIPT initdb || exit 1
dbAction=start
createDbRootUser=true
fi
# Modify db permissions, restart db.
echo "Modifying db access permissions"
mv $PG_HBA_CONF $PG_HBA_CONF.orig
cat $PG_HBA_CONF.orig | sed 's?host.*all.*all.*127.*?host all all 127.0.0.1/32 trust?g' | sed 's?host.*all.*all.*::1/128.*?host all all ::1/128 trust?g' > $PG_HBA_CONF || exit 1
echo "Restarting database server"
$PG_CONTROL_SCRIPT $dbAction
# Create db root user if needed
sttyOrig=`stty -g`
if [ $createDbRootUser = "true" ]; then
# Read db password if needed
if [ -z "$DM_DB_ADMIN_PASSWORD" ]; then
stty -echo
read -p "Enter DB password for the $DM_DB_ADMIN_USER (DB root) user: " DM_DB_ADMIN_PASSWORD
echo
stty $sttyOrig
fi
# Create postgres user
echo "Creating $DM_DB_ADMIN_USER"
createDbUser $DM_DB_ADMIN_USER -E -s || exit 1
modifyDbUserPassword $DM_DB_ADMIN_USER $DM_DB_ADMIN_PASSWORD || exit 1
fi
# Read user db password if needed
if [ -z "$DM_DB_USER_PASSWORD" ]; then
stty -echo
read -p "Enter DB password for the $DM_DB_USER user: " DM_DB_USER_PASSWORD
echo
stty $sttyOrig
fi
# Create db user
echo "Creating $DM_DB_USER"
createDbUser $DM_DB_USER -E -d || exit 1
modifyDbUserPassword $DM_DB_USER $DM_DB_USER_PASSWORD || exit 1
# Create db
echo "Creating database: $DM_DB_NAME"
createDb || exit 1
# populate db
cd $CURRENT_DIR && cd $DM_DB_SCRIPTS_DIR
DM_DB_TABLES="\
experiment_type \
user_info \
role_type \
user_system_role \
policy_type \
policy_property \
allowed_policy_value
"
for dbTable in $DM_DB_TABLES; do
dbFile=populate_$dbTable.sql
if [ -f $dbFile ]; then
echo "Populating $dbTable using $dbFile script"
execute ${PG_DIR}/bin/psql -U $DM_DB_USER -h $DM_DB_HOST -p $DM_DB_PORT -d $DM_DB_NAME -f $dbFile || exit 1
else
echo "$dbFile not found, skipping $dbTable update"
fi
done
# cleanup
echo "Restoring db access permissions"
if [ $createDbRootUser = "true" ]; then
# db was just created, enable password access
cat $PG_HBA_CONF.orig | sed 's?host.*all.*all.*127.*?host all all 127.0.0.1/32 md5?g' | sed 's?host.*all.*all.*::1/128.*?host all all ::1/128 md5?g' > $PG_HBA_CONF || exit 1
rm -f $PG_HBA_CONF.orig
else
# no changes needed to original hba file
mv $PG_HBA_CONF.orig $PG_HBA_CONF
fi
echo "Restarting database server"
$PG_CONTROL_SCRIPT restart
echo "Database $DM_DB_NAME created successfully"
echo
../src/python/dm/daq_web_service/service/daqWebService.py
\ No newline at end of file
#!/bin/sh
#
# Script used for deploying DM webapp
# Deployment configuration can be set in etc/$DM_DB_NAME.deploy.conf file
#
# Usage:
#
# $0 [DM_DB_NAME]
#
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
if [ -z "${DM_ROOT_DIR}" ]; then
DM_ROOT_DIR=$MY_DIR/..
fi
DM_ENV_FILE=${DM_ROOT_DIR}/setup.sh
if [ ! -f ${DM_ENV_FILE} ]; then
echo "Environment file ${DM_ENV_FILE} does not exist."
exit 2
fi
. ${DM_ENV_FILE} > /dev/null
# Use first argument as db name, if provided
DM_DB_NAME=${DM_DB_NAME:=dm}
if [ ! -z "$1" ]; then
DM_DB_NAME=$1
fi
echo "Using DB name: $DM_DB_NAME"
# Look for deployment file in etc directory, and use it to override
# default entries
deployConfigFile=$DM_ROOT_DIR/etc/${DM_DB_NAME}.deploy.conf
if [ -f $deployConfigFile ]; then
echo "Using deployment config file: $deployConfigFile"
. $deployConfigFile
else
echo "Deployment config file $deployConfigFile not found, using defaults"
fi
DM_HOST_ARCH=`uname | tr [A-Z] [a-z]`-`uname -m`
DM_CONTEXT_ROOT=${DM_CONTEXT_ROOT:=dm}
GLASSFISH_DIR=$DM_SUPPORT_DIR/glassfish/$DM_HOST_ARCH
DM_DEPLOY_DIR=$GLASSFISH_DIR/glassfish/domains/domain1/autodeploy
DM_DIST_DIR=$DM_ROOT_DIR/src/java/DmWebPortal/dist
DM_BUILD_WAR_FILE=DmWebPortal.war
DM_WAR_FILE=$DM_CONTEXT_ROOT.war
JAVA_HOME=$DM_SUPPORT_DIR/java/$DM_HOST_ARCH
if [ ! -f $DM_DIST_DIR/$DM_BUILD_WAR_FILE ]; then
echo "$DM_BUILD_WAR_FILE not found in $DM_DIST_DIR."
exit 1
fi
# Modify war file for proper context/persistence settings and
# repackage it into new war
echo "Repackaging war file for context root $DM_CONTEXT_ROOT"
cd $DM_DIST_DIR
rm -rf $DM_CONTEXT_ROOT
mkdir -p $DM_CONTEXT_ROOT
cd $DM_CONTEXT_ROOT
jar xf ../$DM_BUILD_WAR_FILE
configFile=WEB-INF/glassfish-web.xml
cmd="cat $configFile | sed 's?<context-root.*?<context-root>${DM_CONTEXT_ROOT}</context-root>?g' > $configFile.2 && mv $configFile.2 $configFile"
eval $cmd
configFile=WEB-INF/classes/META-INF/persistence.xml
cmd="cat $configFile | sed 's?<jta-data-source.*?<jta-data-source>${DM_DB_NAME}_DataSource</jta-data-source>?g' > $configFile.2 && mv $configFile.2 $configFile"
eval $cmd
jar cf ../$DM_WAR_FILE *
export AS_JAVA=$JAVA_HOME
ASADMIN_CMD=$GLASSFISH_DIR/bin/asadmin
# copy war file
echo "Copying war file $DM_DIST_DIR/$DM_WAR_FILE to $DM_DEPLOY_DIR"
rm -f $DM_DEPLOY_DIR/${DM_WAR_FILE}_*
cp $DM_DIST_DIR/$DM_WAR_FILE $DM_DEPLOY_DIR
# wait on deployment
echo "Waiting on war deployment..."
WAIT_TIME=30
cd $DM_DEPLOY_DIR
t=0
while [ $t -lt $WAIT_TIME ]; do
sleep 1
deploymentStatus=`ls -c1 ${DM_WAR_FILE}_* 2> /dev/null | sed 's?.*war_??g'`
if [ ! -z "$deploymentStatus" ]; then
break
fi
t=`expr $t + 1`
done
echo "Deployment Status: $deploymentStatus"
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
SVN_ROOT=https://subversion.xray.aps.anl.gov/DataManagement
svn ls $SVN_ROOT/releases
#!/bin/sh
SVN_ROOT=https://subversion.xray.aps.anl.gov/DataManagement
svn ls $SVN_ROOT/tags
This diff is collapsed.