I have made some progress running the AWI in a Cloud Foundry
platform-as-a-service (PaaS) environment* This is
so much easier than
setting up a dedicated machine or VM,
installing & configuring Apache & tomcat, getting certificates, and so on. Once
you’ve installed a web app this way, you will not want to do it the hard
way ever again. Once the application directory has been prepared and
customized, it takes literally 2 minutes to deploy a working AWI server.
I prepared
several different directories — one for each AWI environment I intend to deploy.
These directories contain the contents of theawi.war(orecc.war) file.
- awi-exp
- config
- uc4config.xml
- logback.xml
- framework-logging.xml
- felix.properties
- configuration.properties
- theme
- colors.properties
- logo-exp.png
- logo-dev.png
- logo-ite.png
- logo-prod.png
- META-INF
- WEB-INF
- translations.msl
- awi-dev
- awi-ite
- awi-prod
The directories
for the DEV, ITE, and PROD environments contain the same files. Only the files above in bold differ between the
environments. I was able to avoid having to use a different uc4config.xml file
for each environment by including all of the connections for all environments
in the uc4config.xml file, and specifying the connection for each environment using
the automationEngine.index property in configuration.properties. (Thanks to Markus_Holzer_493 for the [DEAD LINK https://community.automic.com/discussion/comment/24717/#Comment_24717]idea!)
Theuc4config.xmlfile looks like this:
<?xml version="1.0" encoding="ISO-8859-15"?>
<configuration>
<!-- 0: off, 1: send, 2: receive, >=3: all -->
<trace count="10" xml="0"></trace>
<connections>
<connection name="UC4_EXP" system="UC4_EXP">
<cp ip="uc4a-exp.mycompany.com" port="33330"/>
<cp ip="uc4b-exp.mycompany.com" port="33331"/>
<cp ip="uc4a-exp.mycompany.com" port="33332"/>
<cp ip="uc4b-exp.mycompany.com" port="33333"/>
<cp ip="uc4a-exp.mycompany.com" port="33334"/>
</connection>
<connection name="UC4_DEV" system="UC4_DEV">
<cp ip="uc4a-dev.mycompany.com" port="33330"/>
<cp ip="uc4b-dev.mycompany.com" port="33331"/>
<cp ip="uc4a-dev.mycompany.com" port="33332"/>
<cp ip="uc4b-dev.mycompany.com" port="33333"/>
<cp ip="uc4a-dev.mycompany.com" port="33334"/>
</connection>
<connection name="UC4_ITE" system="UC4_ITE">
<cp ip="uc4a-ite.mycompany.com" port="33330"/>
<cp ip="uc4b-ite.mycompany.com" port="33331"/>
<cp ip="uc4a-ite.mycompany.com" port="33332"/>
<cp ip="uc4b-ite.mycompany.com" port="33333"/>
<cp ip="uc4a-ite.mycompany.com" port="33334"/>
</connection>
<connection name="UC4_PROD" system="UC4_PROD">
<cp ip="uc4a.mycompany.com" port="33330"/>
<cp ip="uc4b.mycompany.com" port="33331"/>
<cp ip="uc4a.mycompany.com" port="33332"/>
<cp ip="uc4b.mycompany.com" port="33333"/>
<cp ip="uc4a.mycompany.com" port="33334"/>
</connection>
</connections>
</configuration>
The
configuration.properties file for EXP looks like this:
# This is the configuration file for the AWI. Here you can customize the configuration according to the installation guide if needed.
# Home Dashboards
defaultHomeDashboard=MYCOMPANY_DASHBOARD
customHomeDashboardsFolder=SYSTEM/AWI/DASHBOARDS/HOME
# Cookies
autofill.cookie.allowed=true
# Login settings
sso.enabled=true
parameter_login.enabled=true
# Automation Engine systems: 0=UC4_EXP, 1=UC4_DEV, 2=UC4_ITE, 3=UC4_PROD
automationEngine.index=0
# Network settings
push=true
# AWI Online Help
#helpUrl.english=https://docs.automic.com/documentation/WEBHELP/English/all/components/DOCU/latest/AWA Guides/help.htm
# AWI Object Validation
#promptset.validation.mandatory=true
To deploy to DEV, I simply changeautomationEngine.indexto 1; for ITE, 2; for PROD, 3.
Tocustomize the look and feelof each environment, I also customized the main highlight color
and the logo that appears in the header. Here is the colors.properties file for
EXP:
maincolor = #FFFF00;
logo.filename = logo-exp.png
There is acustom logo filefor each environment, color-coded to match the main highlight color.
I push the app to the cloud foundry PaaS platform using thecf push command, with the standardjava_buildpack. It takes less than a minute to install, stage, and start up. So far it has worked just fine, with the exception of a.
*
Cloud foundry providers include Pivotal, IBM, Cisco, Atos, SAP, and Swisscom.