This function creates a default webcontainer instance
Location of target host
Pathname to installation root
'Copy webcontainer %s to host %s' % (WC_ZIPNAME,location)
{ 'location' : STAXServiceMachine,
'srcfile' : '%s/%s' % (WC_ZIPPATH,WC_ZIPNAME),
'destfile' : '%s/%s' % (wcPath,WC_ZIPNAME),
'remotehost' : mylocation
}
'Extract temporary webcontainer zip archive to %s %s.' % (location, wcPath)
{ 'location' : mylocation,
'zipfile' : '%s/%s' % (wcPath,WC_ZIPNAME),
'unzipdir' : '%s' % wcPath }
'%s' % mylocation
'fs'
' LIST DIRECTORY %s/%s-%s/bin EXT sh' % \
(wcPath, WC_TYPE, WC_VERSION)
'shFilesResult=%s' % shFilesResult
'%s' % mylocation
'chmod +x %s' % shFilesResult
'%s/%s-%s/bin' % (wcPath, WC_TYPE, WC_VERSION)
['PATH=/bin:/usr/bin']
STAXServiceMachine
'var'
'resolve string {STAF/Config/STAFRoot}'
{ 'name' : 'Generate a Certificate',
'location' : STAXServiceMachine,
'command' : '%s/bin/keytool' % (JAVA_HOME),
'arguments' : '-genkey -alias tomcat -keyalg rsa \
-dname "cn=tomcat,O=Sun Microsystems,C=US" \
-keystore "%s/services/DSML/tomcatCertificate" \
-storepass "changeit" -keypass "changeit" \
-storetype JKS ' % (stafRoot),
'path' : '%s/bin' % (JAVA_HOME),
'expectedRC': 0
}
{ 'location' : STAXServiceMachine,
'srcfile' : '%s/services/DSML/tomcatCertificate' % (stafRoot),
'destfile' : '%s/%s-%s/conf/tomcatCertificate' % (wcPath, WC_TYPE, WC_VERSION),
'remotehost' : mylocation
}
'Configure webcontainer ports HTTP %s / HTTPS %s' % (WC_PORT, WC_SSL_PORT)
'%s' % mylocation
'fs'
' GET FILE %s/%s-%s/conf/server.xml ' % \
(wcPath, WC_TYPE, WC_VERSION)
{'srcfile' : '%s/%s-%s-%s_server.xml' % (TMPDIR, STAF_REMOTE_HOSTNAME, WC_TYPE, WC_VERSION),
'destfile' : '%s/%s-%s/conf/server.xml' % (wcPath, WC_TYPE, WC_VERSION),
'remotehost' : '%s' % STAF_REMOTE_HOSTNAME
}
'Configure webcontainer SSL keystore '
RC
'caught %s with %s' % (eType,eInfo)
'Remove temporary webcontainer zip archive from %s %s' % (location,wcPath)
{ 'location' : location ,
'foldername' : '%s' % wcPath }
This function deploys a Web Application War file
Location of target host
Pathname to installation root
Web application war file path
Web application war destination file path
'setup: deploy web application %s to %s/%s-%s/webapps/%s' % (warFilePath, wcPath, WC_TYPE, WC_VERSION, destWarFileName)
{ 'location' : STAXServiceMachine,
'srcfile' : '%s' % warFilePath,
'destfile' : '%s/%s-%s/webapps/%s' % (wcPath, WC_TYPE, WC_VERSION, destWarFileName),
'remotehost' : location}
This function stops a webcontainer
Location of target host
Pathname to installation root
'%s' % STAFCmd
{ 'location' : location,
'command' : STAFCmd,
'env' : STAFCmdEnv,
'name' : STAFCmd,
'path' : wcBinPath
}
{ 'returncode' : stopRC,
'result' : stopResult }
stopResult
This function start a webcontainer
Location of target host
Pathname to installation root
'%s' % STAFCmd
{ 'location' : location,
'command' : STAFCmd,
'env' : STAFCmdEnv,
'name' : STAFCmd,
'path' : wcBinPath
}
{ 'returncode' : startRC ,
'result' : startResult }
startResult
This function removes the webcontainer instance
Location of target host
Pathname to installation root
'Remove webcontainer from %s %s.' % (location,wcPath)
{ 'location' : location,
'foldername' : '%s/%s-%s' % (wcPath, WC_TYPE, WC_VERSION) }
RC
'caught %s with %s' % (eType,eInfo)
'Remove temporary webcontainer zip archive from %s %s' % (location,wcPath)
{ 'location' : location ,
'foldername' : '%s/%s-%s' % (wcPath, WC_TYPE, WC_VERSION) }