This topic describes the cluster YAML file format.
The variable section supports basic parameterization by defining keys-value pairs.
variable:
variable_name: variable_value
A variable can also have a type sub-key which changes the behavior of the variable.
variable:
variable_name:
variable_type: variable_type_value
Variable Type | Data Type | Value | Description |
---|---|---|---|
env |
String | MY_ENVIRONMENT_VARIABLE |
Set the value based on the environment variable |
prompt |
Boolean | true or false |
Prompt the user to enter the value |
secret |
Boolean | true or false |
Prompt the user to enter the value without displaying the input |
Variables are referenced in the cluster definition as ${variable_name}
.
In the following example, ${region}
would be substituted as us-east-1
through the cluster definition.
variable:
region: "us-east-1"
username:
prompt: true
password:
secret: true
instance_type:
env: AWS_INSTANCE_TYPE
The provider section defines the providers and provider specific configuration required for provisioning resources for the cluster.
provider:
acme:
email: ${email}
server_url: https://acme-staging-v02.api.letsencrypt.org/directory
aws:
region: ${region}
For available providers and their configuration see Providers
The cluster section defines components and their configuration for the cluster.
cluster:
dtr:
version: "docker/dtr:2.8.0"
engine:
version: "ee-stable-19.03"
ucp:
version: "docker/dtr:2.8.0"
username: "admin"
password: "M1r@nt15!"
For available components and their configuration see Components
The resource section defines what resources will be provisioned for the cluster. Resources are organized as shown in the following example:
resource:
resource_type:
resource_group_name:
resource_parameters
For a given resource_type
, there may be one or more groups of resources to
provision.
For a given resource_group_name
, a resource may have one or more
parameters.
For available resources and their configuration see Resources
variable:
domain: "example.com"
subdomain: "my-cluster"
region: "us-east-1"
email: "user@example.com"
ucp_password:
secret: true
provider:
acme:
email: ${email}
server_url: "https://acme-staging-v02.api.letsencrypt.org/directory"
aws:
region: ${region}
cluster:
dtr:
version: "docker/dtr:2.8.0"
engine:
version: "ee-stable-19.03"
ucp:
version: "docker/ucp:3.3.0"
username: "admin"
password: ${ucp_password}
resource:
aws_instance:
managers:
instance_type: "t2.xlarge"
os: "Ubuntu 18.04"
quantity: "3"
registry:
instance_type: "t2.xlarge"
os: "Ubuntu 18.04"
quantity: "3"
workers:
instance_type: "t2.xlarge"
os: "Ubuntu 18.04"
quantity: "3"
aws_lb:
apps:
domain: ${subdomain}.${domain}
instances:
- "workers"
ports:
- "80:8080"
- "443:8443"
dtr:
domain: ${subdomain}.${domain}
instances:
- "registry"
ports:
- "443:443"
ucp:
domain: ${subdomain}.${domain}
instances:
- "managers"
ports:
- "443:443"
- "6443:6443"
aws_route53_zone:
dns:
domain: ${domain}
subdomain: ${subdomain}