ibmcloudgen2prov_templates.json reference
The host template file for IBM® Cloud Virtual Servers for VPC Gen 2 lists all the templates that host factory can use to provision IBM Cloud Gen 2 hosts. This file must be configured with the correct values from your IBM Cloud Gen 2 environment.
Each host template represents a class of instances that share some attributes, such as hardware configuration, installed software stack, operating system, and security settings.
Location
Parameters
- templateId
- Required. Unique name of the template. Valid value is a string of up to 64 characters, which can contain the following characters: 0-9, A-Z, a-z, -, and _.
- maxNumber
- Required. Maximum number of hosts of this template that can be provisioned. Valid values are an integer in the range 1 - 10000 or -1 to indicate an unlimited number of hosts, up to a maximum of 10,000. You can also set 0 to indicate that no hosts of this template must be provisioned.
- attributes
- Required.
- type
- Required. Type of the VM (string). Supported values are any EGO_MACHINE_TYPE, including X64_64.
- ncpus
- Required. Number of CPUs per host (numeric). Valid value is a positive integer higher than 0.
- nram
- Required. Available RAM (MB). Valid value is a positive integer higher than 0.
- rank
- For more information about configuring this rank parameter, see Selecting cost-based and rank-based cloud host topic.
- priceInfo
- For more information about configuring this priceInfo parameter and its attributes, see Selecting cost-based and rank-based cloud host topic.
- imageId
- Required. The image name of the IBM Cloud Gen 2 image. The image name is used to launch virtual machine instances of this template.
- subnetId
- Optional. The unique virtual private cloud (VPC) subnet name. This
attribute is used together with the region parameter when you use a VPC where
the subnet creation mode is
Custom. It is not needed if you use a VPC withAutomaticsubnet creation mode. Use the subnet through which the instance can communicate with the cluster. - vpcId
- Optional. Unique name of the virtual private cloud (VPC) that the instances use. If not specified, the default VPC is used. The default VPC is created automatically when you create a new project.
- vmType
- Required. Unique name of the IBM Cloud Gen 2 machine type.
- securityGroupIds
- Optional. A list of strings for IBM Cloud Gen 2 security groups that are applied to instances. If you don't specify the securityGroupIds parameter, IBM Cloud Gen 2 uses the default group.
- sshkey_id
- Optional. The UUID (Universally Unique Identifier) of the RSA (Rivest Shamir Adleman) SSH key to connect to the provisioned virtual server instances.
- region
- Optional. The unique name of the region. This attribute is used
together with the subnetId parameter when you use a VPC where the subnet
creation mode is
Custom. It is not needed if you use a VPC withAutomaticsubnet creation mode. - zone
- Optional. The unique name of the zone that the instances are created
in. For example,
us-south-1. - hostPrefix
- Optional. Prefix that must be added to names of provisioned hosts for easier
identification. Valid value must start with a letter and can contain letters, numbers, and
non-consecutive dashes, up to a maximum of 10 characters. Default is compute
for all hosts
provisioned from IBM
Cloud Gen 2.
When this parameter is defined (for example) as mycluster, the provisioned host name is similar to mycluster-1605114914400.tor01.example.com, where 1605114914400 identifies a randomly generated host string, tor01 identifies the IBM Cloud Gen 2 datacenter, and example.com identifies the domain. Note that a hyphen is automatically appended after the prefix to separate the hostname from the host string; in the example, mycluster becomes mycluster-.
- postProvisionFile
- Required. Full path of a post-provisioning script that must be run on a provisioned virtual server. For information on using sample scripts, see Configuring the post-provisioning script for IBM Cloud Gen 2.
resourceGroupId- Optional. An identifier string for IBM Cloud Gen 2 resource groups that are applied to instances. If you don't specify the resourceGroupId parameter, IBM Cloud Gen 2 uses the default resource group.