The aws_instance
resource enables Cluster to create customized instance
groups.
The following is a basic example:
resource:
aws_instance:
linux_worker_swarm:
instance_type: "t2.xlarge"
os: "Ubuntu 18.04"
quantity: "1"
role: "linux_worker"
swarm_labels:
com.docker.ucp.orchestrator.kubernetes: "true"
com.docker.ucp.orchestrator.swarm: "false"
The following is an example of using a custom AMI by name:
resource:
aws_instance:
linux_worker:
ami:
name: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
owner: "099720109477"
platform: "ubuntu"
The following is an example of using a custom AMI by ID:
resource:
aws_instance:
linux_worker:
ami:
id: "ami-003634241a8fcdec0"
Setting | Type | Default | Description |
---|---|---|---|
ami | Object | Derived from os |
Custom AMI, see ami below |
data_disk_size |
String | Derived from os |
Size of the data disk |
instance_type |
String | “t2.xlarge” | Specifies the AWS instance type to provision |
key_name |
String | Generated | Name of an existing AWS EC2 Key Pair |
os |
String | “Ubuntu 18.04” | Alias that is expanded to an AMI
Make sure the OS you select is
compatible
with the product you’re installing.
Options:
- “CentOS 7”
- “Oracle Linux 7.6”
- “RHEL 7.6”
- “RHEL 7.7”
- “RHEL 8.0”
- “RHEL 8.1”
- “SLES 12 SP4”
- “SLES 15”
- “Ubuntu 16.04”
- “Ubuntu 18.04”
- “Windows Server 2016”
- “Windows Server 2016 Core”
- “Windows Server 2019”
- “Windows Server 2019 Core”
|
os_disk_size |
String | Derived from os |
Size of the OS disk |
quantity |
String | None | Number of instances |
role |
String | Derived | The instance group’s cluster role
Options:
- “linux_ucp”
- “linux_dtr”
- “linux_worker”
- “windows_worker”
- “windows_worker_ssh”
|
ssh_private_key |
String | Generated | Path to the SSH private key file for key_name |
swarm_labels |
String | Generated | Additional key-value pairs of swarm labels to apply to each instance |
tags |
String | Object(key-value pair) | Additional key-value pairs to assign to each instance |
username |
String | os dependent:- CentOS = “centos”“
- Oracle Linux = “ec2-user”
- RedHat = “ec2-user”
- SLES = “ec2-user”
- Ubuntu = “ubuntu”
|
Username for the Linux instance’s user with administrative privileges |
Setting | Type | Default | Description |
---|---|---|---|
id |
String | None | ID of the AMI |
name |
String | None | Name of the AMI |
owner |
String | None | AWS account ID of the AMI owner |
platform |
String | None | Platform of the AMI |