Thursday, 3 February 2011

SGE in PWBC

Below is the output from installing SGE via apt-get:




Creating config file /etc/default/gridengine with new version
Setting up gridengine-master (6.2u5-1ubuntu1) ...
Initializing cluster with the following parameters:
=> SGE_ROOT: /var/lib/gridengine
=> SGE_CELL: default
=> Spool directory: /var/spool/gridengine/spooldb
=> Initial manager user: sgeadmin
Initializing spool (/var/spool/gridengine/spooldb)
Initializing global configuration based on /usr/share/gridengine/default-configuration
Initializing complexes based on /usr/share/gridengine/centry
Initializing usersets based on /usr/share/gridengine/usersets
Adding user sgeadmin as a manager
Cluster creation complete
Setting up libxp6 (1:1.0.0.xsf1-2build1) ...
Setting up lesstif2 (1:0.95.2-1) ...
Setting up gridengine-qmon (6.2u5-1ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place


When running "qstat-f" on exec host, it complains:




error: commlib error: got select error (No route to host)
error: unable to contact qmaster using port 6444 on host "pwbclinuxlab.garvan.unsw.edu.au"


pwbclinuxlab.garvan.unsw.edu.au is the ex-qmaster which has been removed. Even in the new qmaster, add the exec host again, the exec host still remember the old one. Because it's the string hardcoded in:



/var/lib/gridengine/default/common/act_qmaster


When running "qstat-f" on exec host, it has another complain...




error: commlib error: access denied (client IP resolved to host name "". This is not identical to clients host name "")
error: unable to contact qmaster using port 6444 on host "sgeqmast01.garvan.unsw.edu.au"

Read Things to think about before installing Grid Engine.


This is very likely related to DNS. SGE requires both forward and reverse DNS queries. So make sure DNS server has been setup properly. In case of DNS server setup is too difficult, adding proper entries to /etc/hosts will fix the issue.


Remember: qmaster's hosts file must contain all SGE hosts' (qsub host, qexec host etc) record. Any other SGE host must contain qmaster's record.



127.0.0.1 localhost
129.94.136.232 sgeqexec01.garvan.unsw.edu.au sgeqexec01
129.94.136.230 sgeqmast01.garvan.unsw.edu.au sgeqmast01

Thursday, 6 January 2011

Ubuntu 10.10 Base Image Installation Note

On the new VMware platform, I need to create a Ubuntu base image, which will be used as a deployment template for other groups. The base image has to be basic, flexible and secure.



Partioning the virtual hard disk, 36GB, LVM is used.



I create a volume group called VG01 on the 36GB HDD. From there I use the follow partion schema. There is no dedicated partition for /home because the users store the data to NFS space.




  • 210MB /boot ext3

  • 15.1GB / ext4

  • rest swap



Partitioning Strategies


The Linux Logical Volume Manager



Enable OpenSSH



Just remember to select it during the installation.



Build up the min security FIRST



First modify the entries in the following files:




root@pwbclinuxlab:~# cat /etc/hosts.allow
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#

#Allow servers & admin
...
root@pwbclinuxlab:~# cat /etc/hosts.deny
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: some.host.name, .some.domain
# ALL EXCEPT in.fingerd: other.host.name, .other.domain
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
# The PARANOID wildcard matches any host whose name does not match its
# address.
#
# You may wish to enable this to ensure any programs that don't
# validate looked up hostnames still leave understandable logs. In past
# versions of Debian this has been the default.
# ALL: PARANOID
ALL: ALL


Optional: change root password




sudo passwd



Optional: enable RSA SSH login



Password-less SSH via PuTTY



Config the network interface for internet access, DNS, hostname etc



Ubuntu Networking Configuration Using Command Line



Update the apt source.list so apt-get sources from Arrnet.



root@pwbclinuxlab:~# cat /etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted

#deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

#deb http://au.archive.ubuntu.com/ubuntu/ maverick main restricted
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick main restricted
deb http://mirror.aarnet.edu.au/ubuntu/ maverick main restricted
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick main restricted

## Major bug fix updates produced after the final release of the
## distribution.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates main restricted
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick universe
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick universe
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates universe
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates universe
deb http://mirror.aarnet.edu.au/ubuntu/ maverick universe
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick universe
deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates universe
deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#deb http://au.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick multiverse
#deb http://au.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
#deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
#deb http://mirror.aarnet.edu.au/ubuntu/ maverick multiverse
#deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick multiverse
#deb http://mirror.aarnet.edu.au/ubuntu/ maverick-updates multiverse
#deb-src http://mirror.aarnet.edu.au/ubuntu/ maverick-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://au.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu maverick main
# deb-src http://extras.ubuntu.com/ubuntu maverick main

deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse


Install VMware Tools



Do not get the one from atp-get. It is unsupported by VMware. Follow the VMware official guide instead.



VMware Tools Installation Guide For
Operating System Specific Packages


VMwareTools



Install other useful utilities like htop etc



Enable LDAP auth



LDAP feature can be enabled on another new image which is a clone of this one, so that I can have two images: with or without LDAP.



LDAPClientAuthentication


OpenLDAP Server

Wednesday, 5 January 2011

X11, Xming Confusion: Which X Server is Serving You?!

When I tried to start qmon, a X11 application from SGE, it gave my errors:




Warning: Cannot convert string "-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--12-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-*" to type FontStruct
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 45 (X_OpenFont)
Serial number of failed request: 343
Current serial number in output stream: 354


According to many posts like this one, suggest to add required fonts from the repository then add to X11 path. Makes perfect sense. But I stuck in the step that adding fonts to X11 path by using xset fp+:




unused@pwbclinuxlab:~$ xset fp+ /usr/share/fonts/X11/100dpi
xset: bad font path element (#90), possible causes are:
Directory does not exist or has wrong permissions
Directory missing fonts.dir
Incorrect font server address or syntax


I tried many ways to fix it, like permissions, created fonts.dir by using mkfontdir (See here). Nothing helps. I had to try to find X11's conf file to see if anything there, but I couldn't find any!!! I checked X11 directories under /etc, /usr all empty or no binary there!! Now I realized that there is no X11 server running.



I almost forgot, I use PuTTY in a Windows platform, with Xming running, and now I am almost sure, Xming is the X server I need to modify, not the one on the server!! I found the font support installation from sourceforge called Xming-fonts-7-5-0-25-setup.exe, installed it, everything is fine!!

Password-less SSH via PuTTY

I need to connect to a Ubuntu 10.10 server via PuTTY, password-lessly.


You can generate the key pair from two places:



  • On the Unbuntu server by using ssh-keygen. Detail

  • On the local machine, using a utility called PuTTYgen



But using either way alone won't work because:



  1. PuTTY only understands the private key file generated by PuTTYgen. PuTTY complains if I select a private key generated by ssh-keygen (on the server).

  2. Ubuntu OpenSSH doesn't understand the public key generated by PuTTYgen. The server will give you Server refused our key if I copy the public key generated by PuTTYgen.



The solution is tricky but simple: all I need to do is, generate the key pair on the server by using ssh-keygen. Copy the generated private key to local machine, and load it to PuTTYgen, then convert it into PuTTY format. That's all!

Thursday, 25 March 2010

Solaris FAQ

wget etc Cannot Resolve Host Name


Need to add DNS server list in /etc/resolv.conf with the following content:



domain garvan.unsw.edu.au
nameserver xxx.xxx.xxx.xxx


gpg: Can't check signature: public key not found


Need to import pub key into gpg:



gpg --import *.asc


When installing perl DBI, it complains:


Need to import pub key into gpg:



CPAN.pm needs either both external programs tar and gzip installed or
both the modules Archive::Tar and Compress::Zlib. Neither prerequisite
is available. Can't continue.

How To Resolve – CPAN.pm needs tar, gzip and bzip2 installed – error message

Monday, 15 March 2010

NCI UPT 4.2 Tricky Post

Installation Properties


This is the install.properties used in command line installation process. Testing on WinXP VBox and only enable typical (central) configuration.




##############################################################
#
# $Id: install.properties 1593 2009-04-27 21:29:25Z saksass $
# $HeadURL: https://gforge.nci.nih.gov/svnroot/automation/trunk/software/bda-build-template/software/build/install.properties $
#
# This properties file is for cancer center installs.
#
##############################################################

##############################
### APPLICATION SETTINGS ###
##############################
# install/build.xml set application.base.path to correct path based on os type
application.base.path.linux=REPLACE_VALUE
application.base.path.windows=C:/NCI/upt
env.name=external
exclude.access-logs=true

###########################
### DATABASE SETTINGS ###
###########################
database.type=mysql
super.admin.user=superadmin
database.re-create=true
#exclude.database=true
# Required for upt central config

upt.central.database.re-create=true
#upt.central.database.drop-schema=true
upt.central.authentication.type=db

upt.central.database.type=mysql
upt.central.database.server=localhost
upt.central.database.version=5.0.27
upt.central.database.port=3306
upt.central.database.name=upt
upt.central.database.system.user=root
upt.central.database.system.password=
upt.central.database.user=mysql
upt.central.database.password=
upt.central.database.url.prefix=jdbc:mysql
upt.central.database.system.url=${upt.central.database.url.prefix}://${upt.central.database.server}:${upt.central.database.port}
upt.central.database.url=${upt.central.database.system.url}/${upt.central.database.name}
upt.central.database.driver.class=org.gjt.mm.mysql.Driver
upt.central.database.encrypt.enabled=YES
upt.central.database.dialect=org.hibernate.dialect.MySQLDialect

upt.central.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.central.ldaps.basedn=ou=nci,o=nih
upt.central.ldaps.userid.label=cn
upt.central.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.central.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.userid.label=uid
upt.central.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.admin.user.password=CSM@admin!

########################
### JBOSS SETTINGS ###
########################
# jboss.home will be generated as ${application.base.path}/${jboss.relateive.path}
jboss.relative.path=${jboss.binaries.relative.dir}
jboss.server.hostname=localhost
jboss.server.name=default
jboss.web.user=pwbc_admin
jboss.web.password=

# If you want to use JBboss NCICB Standard port configurations, uncommment the lines below and comment out all the ports. Be sure to pick a correct prot configuration (see https://wiki.nci.nih.gov/x/0gqy)
exclude.jboss-login-config=true
#jboss.ncicb-standard.port-config=true
#jboss.server.ports.name=config39080
jboss.server.ports.name=bda-ports

jboss.server.jndi.port=46200
jboss.server.port=46210
jboss.cobraorb.port=46350
jboss.ejbinvoker.port=46150
jboss.hajndi.port=46160
jboss.hajrmi.port=46260
jboss.jms.port=46170
jboss.jmx-rmi.port=46290
jboss.messaging.port=46330
jboss.pooledha.port=46270
jboss.remoting.port=46320
jboss.server.bind.port=0
jboss.server.rmi.port=46230
jboss.service.rmiobject.port=46240
jboss.snmp.port=46310
jboss.snmp-trapd.port=46300
jboss.web.service.port=46250
jboss.server.redirect.port=46298

jboss.ssl.enable=false

#@Resolve this property
jboss.external.http.host=

##################################
### Filesystem Data Repository ###
##################################
# If you need to store files on the file system add properties to this section otherwise delete it
#@Resolve this property
fs-data.base.dir=

##############
### TOMCAT ###
##############
# tomcat.home will be generated as ${application.base.path}/${tomcat.relateive.path}
exclude.tomcat.backup=true
tomcat.ssl.enable=false
exclude.tomcat=true

###############
### Log4J ###
###############
log4j.maxFileSize=100MB
log4j.maxDays=7
log4j.level=WARN

###################################
# PRE-POST VALIDATION PROPERTIES #
###################################
validation.pre.port.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.server.port},${jboss.web.service.port}
validation.post.http.list=${jboss.server.port}
validation.post.socket.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.web.service.port}

###################################
# upt backwards compatible multiple installation configuration #
###################################
upt.central.config=true
upt.31.installed=false
upt.32.installed=false
upt.40.installed=false
upt.41.installed=false
# When typical setup is enable (i.e. upt.central.config=true), it has been experiencing /upt42/Login.do not found (HTTP 404).
# It's confirmed that typical setup installs UPT 4.2 but 404 happens if upt.42.installed is not enabled. Guessing this option
# may fully expose everything that UPT 4.2 needs.
upt.42.installed=true



This is the install.properties used in command line installation process. Used on installation on ptest with non-typical configuration enabled. This enables all backward compatibility for CSM 3.1 - 4.2. Each version requires its own DB named as uptdbxx where xx could be 31, 32, 42 etc. All other config such as port are left as default.




##############################################################
#
# $Id: install.properties 1593 2009-04-27 21:29:25Z saksass $
# $HeadURL: https://gforge.nci.nih.gov/svnroot/automation/trunk/software/bda-build-template/software/build/install.properties $
#
# This properties file is for cancer center installs.
#
##############################################################

##############################
### APPLICATION SETTINGS ###
##############################
# install/build.xml set application.base.path to correct path based on os type
application.base.path.linux=/opt/nci/upt
application.base.path.windows=C:/NCI/upt
env.name=external
exclude.access-logs=true

###########################
### DATABASE SETTINGS ###
###########################
database.type=mysql
super.admin.user=superadmin
database.re-create=true
#exclude.database=true
# Required for upt central config

upt.central.database.re-create=true
#upt.central.database.drop-schema=true
upt.central.authentication.type=db

upt.central.database.type=mysql
upt.central.database.server=localhost
upt.central.database.version=5.0.27
upt.central.database.port=3306
upt.central.database.name=csm_dev_bkwrdscmptbl_central
upt.central.database.system.user=root
upt.central.database.system.password=
upt.central.database.user=mysql
upt.central.database.password=
upt.central.database.url.prefix=jdbc:mysql
upt.central.database.system.url=${upt.central.database.url.prefix}://${upt.central.database.server}:${upt.central.database.port}
upt.central.database.url=${upt.central.database.system.url}/${upt.central.database.name}
upt.central.database.driver.class=org.gjt.mm.mysql.Driver
upt.central.database.encrypt.enabled=YES
upt.central.database.dialect=org.hibernate.dialect.MySQLDialect

upt.central.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.central.ldaps.basedn=ou=nci,o=nih
upt.central.ldaps.userid.label=cn
upt.central.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.central.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.userid.label=uid
upt.central.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.central.ldap.admin.user.password=CSM@admin!

###################################
# upt backwards compatible multiple database configuration #
###################################
upt.31.database.re-create=true
#upt.31.database.drop-schema=true
upt.31.authentication.type=db

upt.31.database.type=mysql
upt.31.database.server=localhost
upt.31.database.version=5.0.27
upt.31.database.port=3306
upt.31.database.name=uptdb31
upt.31.database.system.user=root
upt.31.database.system.password=
upt.31.database.user=mysql
upt.31.database.password=
upt.31.database.url.prefix=jdbc:mysql
upt.31.database.system.url=${upt.31.database.url.prefix}://${upt.31.database.server}:${upt.31.database.port}
upt.31.database.url=${upt.31.database.system.url}/${upt.31.database.name}
upt.31.database.driver.class=org.gjt.mm.mysql.Driver
upt.31.database.encrypt.enabled=NO
upt.31.database.dialect=org.hibernate.dialect.MySQLDialect

upt.31.ldaps.url=ldaps://ncids4a.nci.nih.gov:636
upt.31.ldaps.basedn=ou=nci,o=nih
upt.31.ldaps.userid.label=cn
upt.31.ldap.url=ldap://ncicbds-dev.nci.nih.gov:389
upt.31.ldap.searchable.base=ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.31.ldap.userid.label=uid
upt.31.ldap.admin.user.name=uid=csmAdmin,ou=csm,dc=ncicb-dev,dc=nci,dc=nih,dc=gov
upt.31.ldap.admin.user.password=CSM@admin!
#---------------------------------#
upt.32.database.re-create=true
#upt.32.database.drop-schema=true
upt.32.authentication.type=db

upt.32.database.type=mysql
upt.32.database.server=localhost
upt.32.database.version=5.0.27
upt.32.database.port=3306
upt.32.database.name=uptdb32
upt.32.database.system.user=root
upt.32.database.system.password=
upt.32.database.user=mysql
upt.32.database.password=
upt.32.database.system.url=jdbc:mysql://${upt.32.database.server}:${upt.32.database.port}
upt.32.database.url=${upt.32.database.system.url}/${upt.32.database.name}
upt.32.database.driver.class=org.gjt.mm.mysql.Driver
upt.32.database.encrypt.enabled=YES
upt.32.database.dialect=org.hibernate.dialect.MySQLDialect

upt.32.ldaps.url=
upt.32.ldaps.basedn=
upt.32.ldaps.userid.label=
upt.32.ldap.url=
upt.32.ldap.searchable.base=
upt.32.ldap.userid.label=
upt.32.ldap.admin.user.name=
upt.32.ldap.admin.user.password=
#--------------------------------#
upt.40.database.re-create=true
#upt.40.database.drop-schema=true
upt.40.authentication.type=db

upt.40.database.type=${database.type}
upt.40.database.server=localhost
upt.40.database.version=5.0.27
upt.40.database.port=3306
upt.40.database.name=uptdb40
upt.40.database.system.user=root
upt.40.database.system.password=
upt.40.database.user=mysql
upt.40.database.password=
upt.40.database.system.url=jdbc:mysql://${upt.40.database.server}:${upt.40.database.port}
upt.40.database.url=${upt.40.database.system.url}/${upt.40.database.name}
upt.40.database.driver.class=org.gjt.mm.mysql.Driver
upt.40.database.encrypt.enabled=YES
upt.40.database.dialect=org.hibernate.dialect.MySQLDialect

upt.40.ldaps.url=
upt.40.ldaps.basedn=
upt.40.ldaps.userid.label=
upt.40.ldap.url=
upt.40.ldap.searchable.base=
upt.40.ldap.userid.label=
upt.40.ldap.admin.user.name=
upt.40.ldap.admin.user.password=
#---------------------------------#
upt.41.database.re-create=true
#upt.41.database.drop-schema=true
upt.41.authentication.type=db

upt.41.database.type=${database.type}
upt.41.database.server=localhost
upt.41.database.version=5.0.27
upt.41.database.port=3306
upt.41.database.name=uptdb41
upt.41.database.system.user=root
upt.41.database.system.password=
upt.41.database.user=mysql
upt.41.database.password=
upt.41.database.system.url=jdbc:mysql://${upt.41.database.server}:${upt.41.database.port}
upt.41.database.url=${upt.41.database.system.url}/${upt.41.database.name}
upt.41.database.driver.class=org.gjt.mm.mysql.Driver
upt.41.database.encrypt.enabled=YES
upt.41.database.dialect=org.hibernate.dialect.MySQLDialect

upt.41.ldaps.url=
upt.41.ldaps.basedn=
upt.41.ldaps.userid.label=
upt.41.ldap.url=
upt.41.ldap.searchable.base=
upt.41.ldap.userid.label=
upt.41.ldap.admin.user.name=
upt.41.ldap.admin.user.password=
#------------------------------------#
upt.42.database.re-create=true
#upt.42.database.drop-schema=true
upt.42.authentication.type=db

upt.42.database.type=${database.type}
upt.42.database.server=localhost
upt.42.database.version=5.0.27
upt.42.database.port=3306
upt.42.database.system.user=root
upt.42.database.system.password=
upt.42.database.name=uptdb42
upt.42.database.user=mysql
upt.42.database.password=
upt.42.database.system.url=jdbc:mysql://${upt.42.database.server}:${upt.42.database.port}
upt.42.database.url=${upt.42.database.system.url}/${upt.42.database.name}
upt.42.database.driver.class=org.gjt.mm.mysql.Driver
upt.42.database.encrypt.enabled=YES
upt.42.database.dialect=org.hibernate.dialect.MySQLDialect

upt.42.ldaps.url=
upt.42.ldaps.basedn=
upt.42.ldaps.userid.label=
upt.42.ldap.url=
upt.42.ldap.searchable.base=
upt.42.ldap.userid.label=
upt.42.ldap.admin.user.name=
upt.42.ldap.admin.user.password=
########################
### JBOSS SETTINGS ###
########################
# jboss.home will be generated as ${application.base.path}/${jboss.relateive.path}
jboss.relative.path=${jboss.binaries.relative.dir}
jboss.server.hostname=ptest.garvan.unsw.edu.au
jboss.server.name=default
jboss.web.user=pwbc_admin
jboss.web.password=

# If you want to use JBboss NCICB Standard port configurations, uncommment the lines below and comment out all the ports. Be sure to pick a correct prot configuration (see https://wiki.nci.nih.gov/x/0gqy)
exclude.jboss-login-config=true
#jboss.ncicb-standard.port-config=true
#jboss.server.ports.name=config39080
jboss.server.ports.name=bda-ports

jboss.server.jndi.port=46200
jboss.server.port=46210
jboss.cobraorb.port=46350
jboss.ejbinvoker.port=46150
jboss.hajndi.port=46160
jboss.hajrmi.port=46260
jboss.jms.port=46170
jboss.jmx-rmi.port=46290
jboss.messaging.port=46330
jboss.pooledha.port=46270
jboss.remoting.port=46320
jboss.server.bind.port=0
jboss.server.rmi.port=46230
jboss.service.rmiobject.port=46240
jboss.snmp.port=46310
jboss.snmp-trapd.port=46300
jboss.web.service.port=46250
jboss.server.redirect.port=46298

jboss.ssl.enable=false

#@Resolve this property
jboss.external.http.host=

##################################
### Filesystem Data Repository ###
##################################
# If you need to store files on the file system add properties to this section otherwise delete it
#@Resolve this property
fs-data.base.dir=

##############
### TOMCAT ###
##############
# tomcat.home will be generated as ${application.base.path}/${tomcat.relateive.path}
exclude.tomcat.backup=true
tomcat.ssl.enable=false
exclude.tomcat=true

###############
### Log4J ###
###############
log4j.maxFileSize=100MB
log4j.maxDays=7
log4j.level=WARN

###################################
# PRE-POST VALIDATION PROPERTIES #
###################################
validation.pre.port.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.server.port},${jboss.web.service.port}
validation.post.http.list=${jboss.server.port}
validation.post.socket.list=${jboss.server.rmi.port},${jboss.server.jndi.port},${jboss.service.rmiobject.port},${jboss.jms.port},${jboss.web.service.port}

###################################
# upt backwards compatible multiple installation configuration #
###################################
upt.central.config=false
upt.31.installed=true
upt.32.installed=true
upt.40.installed=true
upt.41.installed=true
upt.42.installed=true




User and Application Relationship


UPT can control what applications a user has access to. The very 1st application registered in UPT is csmupt which is UPT itself:



mysql> select * from csm_application;
+----------------+---------------------------+---------------------------------+-
| APPLICATION_ID | APPLICATION_NAME | APPLICATION_DESCRIPTION |
+----------------+---------------------------+---------------------------------+-
| 1 | csmupt | CSM UPT Super Admin Application |
| 2 | sampleHostApplicationName | Application Description |
| 3 | sample31 | Application Description |

When a new user created, it's added in csm_user table without any association.



mysql> select * from csm_user where login_name='derlin';
+---------+------------+---------------+------------+-------
| USER_ID | LOGIN_NAME | MIGRATED_FLAG | FIRST_NAME | LAST_N
+---------+------------+---------------+------------+-------
| 3 | derlin | 0 | Derrick | Lin
+---------+------------+---------------+------------+-------

In UPT, each regiestered application is an protection element, that is in table:



mysql> select * from csm_protection_element where protection_element_name like '%csmupt%';
+-----------------------+-------------------------+----------------------------------------------------+-----------+
| PROTECTION_ELEMENT_ID | PROTECTION_ELEMENT_NAME | PROTECTION_ELEMENT_DESCRIPTION | OBJECT_ID |
+-----------------------+-------------------------+----------------------------------------------------+-----------+
| 1 | csmupt | CSM UPT Super Admin Application Protection Element | csmupt |
+-----------------------+-------------------------+----------------------------------------------------+-----------+

After a user is assigned to an application, essentially, it's a user, protection element many-to-many relationship defined in table:



mysql> select * from csm_user_pe;
+----------------------------+-----------------------+---------+
| USER_PROTECTION_ELEMENT_ID | PROTECTION_ELEMENT_ID | USER_ID |
+----------------------------+-----------------------+---------+
| 9 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| 4 | 4 | 1 |
| 5 | 5 | 1 |
| 6 | 6 | 1 |
| 7 | 7 | 1 |
| 8 | 1 | 3 |<<<< derlin assigned to csmupt
+----------------------------+-----------------------+---------+