Application model and topology document examples
The application model and topology documents are core pieces of the Cloud Pak System Software for Power® modeling and deployment.
The sample Java™ Enterprise Edition (Java EE) web application that is provided with the web application virtual application pattern type is used to show examples of these related documents.
Application model
The appmodel.json file
represents the serialization of the model that is defined in the Pattern Builder user
interface. Components (nodes) and links, along with user-specified
property values, are represented.
{
"model":{
"name":"Sample",
"nodes":[
{
"attributes":{
"WAS_Version":"7.0",
"archive":"artifacts/tradelite.ear",
"clientInactivityTimeout":60,
"asyncResponseTimeout":120,
"propogatedOrBMTTranLifetimeTimeout":300,
"totalTranLifetimeTimeout":120
},
"id":"application",
"type":"EAR"
},
{
"attributes":{
"dbSQLFile":"artifacts/setup_db.sql"
},
"id":"database",
"type":"DB2"
}
],
"links":[
{
"source":"application",
"target":"database",
"annotation":"",
"attributes":{
"connectionTimeout":180,
"nontransactional":false,
"minConnectionPool":1,
"jndiDataSource":"jdbc/TradeDataSource",
"XADataSource":false,
"maxConnectionPool":50
},
"type":"WASDB2",
"id":"WASDB2_1"
}
]
}
}
Topology document
The final topology document
for an application model depends on the deployment environment, such
as storehouse URL and image ID. This sample shows two
vm-templates
from
the web application, application-was and database-db2.
Each vm-template
has a list of node parts and parts
to be installed, and run time roles to be managed.{
"vm-templates":[
{
"parts":[
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/was\/parts\/was-7.0.0.11.tgz",
'parms':{
"installDir":"\/opt"
}
},
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/was\/parts\/was.scripts.tgz"
},
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/wasdb2\/parts\/db2.jdbc.tgz",
'parms':{
"installDir":"\/opt\/db2jar"
}
},
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/wasdb2\/parts\/wasdb2.scripts.tgz"
}
],
"node-parts":[
{
'parms':{
"private":"127.0.0.1"
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/firewall\/nodeparts\/firewall.tgz"
},
{
'parms':{
"iaas-port":"8080",
"agent-dir":"\/opt\/IBM\/maestro\/agent",
"http-port":9999,
"iaas-ip":"127.0.0.1"
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/agent\/nodeparts\/agent-linux-x64.tgz"
},
{
'parms':{
"installerURL":"files\/itmosv6.2.2fp2_linuxx64.tar.gz",
"omnibustarget":"",
"temsip":"",
"omnibusip":""
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/monitoring\/nodeparts\/monitoring.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/deployinlet\/nodeparts\/deployinlet.tgz"
},
{
'parms':{
"collectors":[
{
"url":"http:\/\/COLLECTOR_NODE_IP:8080"
}
]
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/logging\/nodeparts\/logging.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/cloud.HSLT\/nodeparts\/iaas.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/autoscaling\/nodeparts\/autoscaling.tgz"
}
],
"scaling":{
"min":1,
"max":1
},
"image":{
"type":"medium",
"image-id":"none",
"activators":[
"https:\/\/localhost:9444\/storehouse\/\/admin\/clouds\/mockec2.zip"
]
},
"name":"application-was",
"roles":[
{
"depends":[
{
"role":"database-db2.DB2",
'parms':{
"MAXPOOLSIZE":"$$2",
"installDir":"\/opt\/db2jar",
"inst_id":1,
"POOLTIMEOUT":180,
"NONTRAN":false,
"DS_JNDI":"jdbc\/TradeDataSource",
"MINPOOLSIZE":"$$3"
},
"type":"DB2"
}
],
'parms':{
"clientInactivityTimeout":"60",
"ARCHIVE":"$$1",
"propogatedOrBMTTranLifetimeTimeout":"300",
"asyncResponseTimeout":"120",
"USERID":"virtuser",
"totalTranLifetimeTimeout":"120",
"PASSWORD":"<xor>BW4SbzM9FhwuFgUxE2YyOW4="
},
"external-uri":"http:\/\/{SERVER}:9080\/",
"type":"WAS",
"name":"WAS",
"requires":{
"memory":256
}
}
],
"packages":[
"WAS",
"WASDB2"
]
},
{
"parts":[
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/db2\/parts\/db2-9.7.0.1.tgz",
'parms':{
"installDir":"\/opt\/ibm\/db2\/V9.7"
}
},
{
"part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/db2\/parts\/db2.scripts.tgz"
}
],
"node-parts":[
{
'parms':{
"private":"127.0.0.1"
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/firewall\/nodeparts\/firewall.tgz"
},
{
'parms':{
"iaas-port":"8080",
"agent-dir":"\/opt\/IBM\/maestro\/agent",
"http-port":9999,
"iaas-ip":"127.0.0.1"
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/agent\/nodeparts\/agent-linux-x64.tgz"
},
{
'parms':{
"installerURL":"files\/itmos-v6.2.2fp2_linuxx64.tar.gz",
"omnibustarget":"",
"temsip":"",
"omnibusip":""
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/monitoring\/nodeparts\/monitoring.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/deployinlet\/nodeparts\/deployinlet.tgz"
},
{
'parms':{
"collectors":[
{
"url":"http:\/\/COLLECTOR_NODE_IP:8080"
}
]
},
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/logging\/nodeparts\/logging.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/cloud.HSLT\/nodeparts\/iaas.tgz"
},
{
"node-part":"https:\/\/localhost:9444\/storehouse\/admin\/plugins\/autoscaling\/nodeparts\/autoscaling.tgz"
}
],
"scaling":{
"min":1,
"max":1
},
"image":{
"type":"large",
"image-id":"none",
"activators":[
"https:\/\/localhost:9444\/storehouse\/\/admin\/clouds\/mockec2.zip"
]
},
"name":"database-db2",
"roles":[
{
'parms':{
"DB_PORT":50000,
"DB_PATH":"\/home\/db2inst1",
"PASSWORD":"<xor>NRA0aWgHOGoRaG47DiU=",
"DB_NAME":"adb",
"SQL_URL":"https:\/\/localhost:9444\/storehouse\/user\/applications\/a-0d1ac0d4-4e4c-49d7-954f-d4884a6ad703\/artifacts\/setup_db.sql"
},
"external-uri":"jdbc:db2:\/\/{SERVER}:50000\/adb:user=db2inst1;password=jOk67Xg5N71dQz;",
"type":"DB2",
"name":"DB2"
}
],
"packages":[
"DB2"
]
}
]
}