3.4.2 Add a virtual server (deploy)
Function
This service template can start and stop instances in an Amazon EC2 environment.
The required server is shown below:
- AWS control server (execution-target server)
This is a server on which AWS Tools for Windows PowerShell (hereinafter referred to as "AWS Tools") is installed. This product can forward plugins to the server to be executed.
- Instance
This is a regular virtual server in an Amazon EC2 environment.
General processing is as follows:
(1) Starting an instance
Specify the AMI ID (the aws.amiId property) and the instance type (the aws.instanceType property). As options, a key pair name (the aws.keyPairName property), the security group ID (the aws.securityGroupId property), the subnet ID for the first one (the aws.subnetId1 property), and the private IP address for the first one (the aws.privateIpAddress1 property) can be set.
(2) If you specify a subnet ID for the second one (the aws.subnetId2 property), a network interface is added to the started instance, and the second private IP address is assigned.
The second private IP address is automatically assigned within the range of the subnet that was set to the subnet ID for the second one. However, if you specify the private IP address for the second one (the aws.privateIpAddress2 property), the specified value is assigned.
(3) The instance is stopped if you set "yes" to the aws.stopInstanceEnabled property that defines whether to stop the instance.
Notes on property settings are described as follows:
(1) If you do not specify a key pair name (the aws.keyPairName property), no key pair is set to the instance.
(2) If you do not specify a security group ID (the aws.securityGroupId property), the default security ID is set.
(3) If you do not specify a subnet ID for the first one (the aws.subnetId1 property), the default subnet ID is set.
(4) If you do not specify a private IP address for the first one (the aws.privateIpAddress1 property), an IP address is automatically assigned within the range of the subnet that was set to the subnet ID for the first one.
(5) If you specify a subnet ID for the second one (the aws.subnetId2 property) but do not specify a private IP address for the second one (the aws.privateIpAddress2 property), an IP address is automatically assigned within the range of the subnet that was set to the subnet ID for the second one.
Prerequisites
For the most recent information about the prerequisite product in the system, prerequisite products on the execution-target server for the service templates, supported OSs for the prerequisite products on the execution-target server for the service templates, and prerequisite products on the execution-target system for the service templates, see the Release Notes.
Prerequisite product in the system:
JP1/Automatic Operation 12-00 or later
Prerequisite products on the execution-target server for the service template:
- AWS Tools for Windows PowerShell
- Microsoft .Net Framework 3.5 or later
Supported OSs for the prerequisite products on the execution-target server for the service template:
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
Note: A Server Core installation environment is out of scope.
Prerequisite products in the execution-target system for the service template:
(1) Prerequisite OSs for an instance
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
- Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
- Red Hat Enterprise Linux Server 7 (64-bit x86_64)
- Red Hat Enterprise Linux Server 8 (64-bit x86_64)
Conditions for using the prerequisite products in the execution-target system for the service template:
(1) Conditions for setting an Amazon EC2 environment
- The AMI used for starting instances must have been created.
(2) Conditions for this product
- To execute this service, the execution-target server must have been set as the agentless connection destination. If you use a local server as the execution-target server, you need to specify a loopback address that can be resolved by "localhost".
Cautions
(1) IP addresses in use or out of range cannot be used for the IP addresses below. If you make use of these, the task will abnormally end.
- Private IP address for the first one (the aws.privateIpAddress1 property)
- Private IP address for the second one (the aws.privateIpAddress2 property)
(2) If starting an instance abnormally ends with the return value of 1 (/awsCreateVM step), the started instance will remain. If starting an instance abnormally ends with the return value of 2, the created network interface will remain in addition to the started instance.
Execution privilege
(1) The policy must be set to allow an IAM user to log in to AWS to perform the following actions:
- Starting and stopping instances, along with obtaining instance statuses
- Creating and connecting network interfaces, along with obtaining interface statuses
Version
02.00.00
Tags
Add VM,AWS
Property list
The following shows the list of the property groups set in the property:
Property group |
Description |
Initial display |
---|---|---|
Virtual system environment information |
Specify the AWS information. |
Y |
Instance information |
Specify the information about the instance to be started. |
Y |
Execute option |
This property checks the instance status when starting and stopping instances. If necessary, modify the property. |
N |
The following shows the list of the properties to be displayed in the "Service Definition" window:
- (Legend)
-
R: The property must be specified.
O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
aws.targetHost |
Host name of the AWS control server |
Specify the host name or IP address of the AWS control server. IPv6 address is not supported. |
Input |
Disabled |
R |
Virtual system environment information |
aws.accessKeyId |
Access key ID |
Specify the access key ID for connecting to AWS. |
Input |
Disabled |
R |
Virtual system environment information |
aws.secretAccessKey |
Secret access key |
Specify the secret access key for connecting to AWS. |
Input |
Disabled |
R |
Virtual system environment information |
aws.region |
Region |
Specify an AWS region that is a connection destination. |
Input |
Disabled |
R |
Virtual system environment information |
aws.checkInstanceEnabledCount |
Instance status (started) check count |
Specify the number of times to check for instance start. The maximum waiting time is determined by combining this count and the instance status (started) check interval. This property is also used to check the completion of adding network interfaces. |
Input |
Disabled |
R |
Execute option |
aws.checkInstanceEnabledInterval |
Instance status (started) check interval |
Specifies an interval in seconds to check if an instance is started. This property is also used to check the completion of adding network interfaces. |
Input |
Disabled |
R |
Execute option |
aws.stopInstanceEnabled |
Whether to stop the instance |
Specify whether to stop the running instance. If yes is selected, the running instance stops. |
Input |
Disabled |
R |
Instance information |
aws.checkInstanceDisabledCount |
Instance status (stopped) check count |
Specify the number of times to check for an instance stop. The maximum waiting time is determined from this count and the instance status (stopped) check interval. This property is mandatory if the property for stopping an instance is set to "yes". |
Input |
Disabled |
O |
Execute option |
aws.checkInstanceDisabledInterval |
Instance status (stopped) check interval |
Specifies an interval in seconds to check if an instance is stopped. If you specify "yes" to the property for stopping an instance, you must specify this property. |
Input |
Disabled |
O |
Execute option |
The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
aws.amiId |
AMI ID |
Specify an AMI ID used for instance start. |
Input |
Disabled |
R |
Instance information |
aws.instanceType |
Instance type |
Specify an instance type used for instance start. |
Input |
Disabled |
R |
Instance information |
aws.keyPairName |
Key pair name |
Specify a key pair name used for the instance. If this property is omitted, no key pair name is set for the instance. |
Input |
Disabled |
O |
Instance information |
aws.securityGroupId |
Security group ID |
Specify the ID of the security group to which the instance is assigned. If this property is omitted, the instance is assigned to a default security group. To specify multiple security groups, separate their IDs by using a comma. |
Input |
Disabled |
O |
Instance information |
aws.subnetId1 |
Subnet ID 1 |
Specify the ID of the subnet that indicates the range of the first private IP address assigned to the instance. If this property is omitted, a default subnet is assigned. |
Input |
Disabled |
O |
Instance information |
aws.privateIpAddress1 |
Private IP address 1 |
Specify the first private IP address assigned to the instance. IPv6 address is not supported. If this property is omitted, an IP address within the range determined by the subnet corresponding to the specified subnet ID 1 is automatically assigned. |
Input |
Disabled |
O |
Instance information |
aws.subnetId2 |
Subnet ID 2 |
Specify the ID of the subnet that indicates the range of the second private IP address assigned to the instance. This property is required when the second IP address is set. If this property is omitted, the second IP address is not set. |
Input |
Disabled |
O |
Instance information |
aws.privateIpAddress2 |
Private IP address 2 |
Specify the second private IP address assigned to the instance (IPv4 only). This property takes effect when subnet ID 2 is specified. By default, an IP address within the range determined by the specified subnet ID 2 is assigned. |
Input |
Disabled |
O |
Instance information |
The following shows the list of the properties to be displayed in the "Task Details" window only:
Property key |
Property name |
Description |
I/O type |
Shared |
---|---|---|---|---|
aws.instanceIdOutput |
Instance ID |
Stores the ID of the instance. |
Output |
Disabled |
aws.instanceIPaddress |
Instance IP address |
Stores the instance IP address. If multiple IP addresses are set for the instance, the IP addresses are output in comma-separated format. |
Output |
Disabled |
aws.networkInterfaceId |
Network interface ID |
If subnet ID 2 is specified, the ID of the network interface added to the instance is stored. |
Output |
Disabled |
The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:
Property key |
Characters that can be input |
---|---|
aws.targetHost |
No more than 256 single-byte alphanumeric characters, periods (.), or hyphens (-). |
aws.accessKeyId |
No more than 64 single-byte alphanumeric characters or single-byte symbols (excluding the following symbols: <, >, |, ", ', ;, and &). |
aws.secretAccessKey |
No more than 128 single-byte alphanumeric characters or single-byte symbols (excluding the following symbols: <, >, |, ", ', ;, and &). |
aws.region |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
aws.checkInstanceEnabledCount |
An integer from 1 to 2,147,483,647. |
aws.checkInstanceEnabledInterval |
An integer from 1 to 60. |
aws.stopInstanceEnabled |
Select one of the following values: yes,no |
aws.checkInstanceDisabledCount |
An integer from 1 to 2,147,483,647. |
aws.checkInstanceDisabledInterval |
An integer from 1 to 60. |
The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Characters that can be input |
---|---|
aws.amiId |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
aws.instanceType |
No more than 32 single-byte alphanumeric characters or periods (.). |
aws.keyPairName |
No more than 255 single-byte alphanumeric characters or single-byte symbols (excluding the following symbols: <, >, |, ", ', ;, and &). |
aws.securityGroupId |
No more than 256 single-byte alphanumeric characters, hyphens (-), or commas (,). |
aws.subnetId1 |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
aws.privateIpAddress1 |
No more than 15 single-byte numeric characters or periods (.). |
aws.subnetId2 |
No more than 32 single-byte alphanumeric characters or hyphens (-). |
aws.privateIpAddress2 |
No more than 15 single-byte numeric characters or periods (.). |
Flow specification details
The following table shows the detailed specification of the flow:
Hierarchy |
Display name |
Plug-in |
||
---|---|---|---|---|
Plug-in name |
Description |
Error recovery method |
||
1 |
awsCreateVM |
awsCreateVM |
Creates a virtual server in an Amazon EC2 environment. (In Amazon EC2, this is referred to as "starting instances".) |
After removing the cause of the error, run the service again. |
2 |
checkPropertyValue |
checkPropertyValue |
Assesses whether to stop the started instance. |
-- |
3 |
awsShutdownVM |
awsShutdownVM |
Shuts down a virtual server an the Amazon EC2 environment. (In Amazon EC2, this is referred to as "stopping instances".) |
After removing the cause of the error, execute it from this step onward. |