Provision
Each layer maps to one or more nodes
(installations) through a provisioning map defined in the
provision section. The nodes that a layer maps to
are either existing nodes or nodes that will be created when applying the
template. Based on the policy that you set for an environment type
innodes:nodeAlias:aliasMapping:policy:,
each node is referenced by:
- A global node alias, when
policy: HOSTNAME|EXISTING - An indexed node alias when
policy: INDEX
For details about
aliasMapping:policy: see
Nodes.
In the
provision section,
you can map each layer to a list of nodes or you can include a
default section in
which you specify a default mapping that applies to environment types or nodes
that do not have an explicit definition. The
provision section
can also include references to lists of node aliases.
provision:envType:infrastructure
When
aliasMapping:policy: INDEX, you must define the
first layer in each
provisioning:envType
section as
an
infrastructure
layer. The
infrastructure layer does not have a reserved name, but it must come first in
the
environment.type section. This layer includes the
hosts parameter that lists all Platform Manager
nodes used by all layers defined in the template. For example:
provision:
default:
infra:
hosts: [host1, host2, host3]
With the
INDEX policy, each of the layers in
provision (except the infrastructure layer) includes
one the following parameters:
-
aliases:A list of indexed node aliases. The indexed node alias is formed from the value of thealiasMapping:policy:prefixparameter in thenodessection and an index number that indicates the consecutive order of the host on the list in theinfrastructure:hostsparameter. Use "_" as a separator in the indexed node alias. -
indexes:A list of index numbers that indicate the consecutive order of each host on the list in theinfrastructure:hostsparameter.
The index numbers in
aliases: and
indexes: always start from 1.
Examples
- In the following example, the template uses the
INDEXmapping policy. The "infra" layer is the infrastructure layer in the "default" and "envType1" sections and lists all hosts used for all layers defined in the template. By default “layer1” maps to the nodes with indexed aliases "default_node_1" and default_node_2“ and is installed on "host11" and "host12" in the /opt/webmethods/sag_default_node installation directory. In "envType1", "layer1" maps to the nodes with indexed aliases "my_node_3" and "my_node_4" and is installed on "host13" and "host14" in the /opt/webmethods/sag_my_node installation directory. The "esb” layer is installed on "host13" and "host14".provision: default: infra: hosts: [host11,host12,host13,host14] layer1: aliases: [default_node_1,default_node_2] esb: indexes: [3,4] envType1: infra: hosts: [host11,host12,host13,host14] layer1: aliases: [my_node_3,my_node_4] nodes: default: aliasMapping: policy: INDEX prefix: default_node default: bootstrapInfo: installDir: /opt/webmethods/sag_${node.alias.prefix} envType1: aliasMapping: policy: INDEX prefix: my_node - In the following example, the template uses the HOSTNAME mapping
policy. By default the “layer1” and “esb” layers map to the installation with
node alias “node1”. In “envType1”, “layer1” maps to installations with aliases
“node1” and “node2”. The “esb” layer maps to installations with aliases “node2”
and “node3”. “envType2” maps layers to a list of user-defined node aliases.
provision: default: layer1: node1 esb: node1 envType1: layer1: [node1,node2] esb: [node2,node3] envType2: layer1: ${layer1.hosts} esb: ${is.hosts} nodes: default: aliasMapping: policy: HOSTNAME