Deployment Configuration
The deploy.yml
file should contain all necessary configuration for the deployment of your Aineko Cloud project. Please see the following sections for a complete list of configuration options.
Example Configuration
Example deploy.yml
version: 0.1.0
defaults:
machine_config:
type: ec2
mem_gib: 16
vcpu: 8
environments:
develop:
pipelines:
- example-pipeline
load_balancers:
dev-api:
- port: 8000
pipeline: example-pipeline
production:
pipelines:
- example-pipeline
load_balancers:
prod-api:
- port: 8000
pipeline: example-pipeline
pipelines:
example-pipeline:
source: conf/pipeline.yml
Keys
version
Key | Required | Type | Description |
---|---|---|---|
version |
Y | string | Only 0.1.0 is available as of time of writing. |
The version
field is intended to support older projects even as Aineko Cloud undergoes breaking changes.
defaults
If defined, these default parameters will be applied to all pipelines deployed. The following parameters can be defined:
Key | Required | Type | Description |
---|---|---|---|
machine_config |
N | map | Parameters defining machine size to use. |
We highly recommend setting this key
Every pipeline needs to have a machine config defined to successfully deploy. While optional, we highly recommend that you to add some defaults to avoid situations where some pipelines do not have it configured. The alternative is to ensure that every pipeline is defined either in the pipelines
or environments
keys.
machine_config
Machines are parameterized by how many vCPU cores and memory they have. Underlying machines sizes are based on the AWS M5 EC2 instances. Aineko Cloud will intelligently choose the smallest instance that will satisfy both CPU and memory requirements.
Key | Required | Type | Description |
---|---|---|---|
type |
Y | integer | Only ec2 allowed as of this version. |
mem_gib |
Y | integer | Minimum amount of memory in GB to provision for pipelines. |
vcpu |
Y | integer | Minimum amount of vCPUs to provision for pipelines. |
pipelines
This block should contain the definition of all pipelines that are deployed in this project, regardless of environment. The pipelines keys that are generated here will be used in the subsequent environments
block. In this map, each key should represent the name of a pipeline, and the value contains relevant configuration.
<pipeline_name>
Key | Required | Type | Description |
---|---|---|---|
source |
Y | string | Path to pipeline configuration file. |
name |
N | string | Helper field for you to provide an alternative pipeline name for your reference. |
machine_config |
N | map | Will override the one set in defaults , requires the same schema. |
environments
This block contains a mapping of environment definitions for the Aineko Cloud project, which includes pipelines and optionally load balancers. A more detailed explanation on how environments work can be found here.
<env_name>
Key | Required | Type | Description |
---|---|---|---|
pipelines |
Y | list of strings or maps | List of pipelines to run in environment. |
load_balancers |
N | map | Defines load balancer port and pipeline. |
pipeline
To use the pipeline defined in the pipelines
key above, simply use a string. To override specific settings, you can re-define any of the keys again.
Key | Required | Type | Description |
---|---|---|---|
source |
Y | string | Path to pipeline configuration file. |
name |
N | string | Helper field for you to provide an alternative pipeline name for your reference. |
machine_config |
N | map | Will override the one set in defaults , requires the same schema. |
For example, to override the machine_config
:
environments:
develop:
pipelines:
- example-pipeline:
machine_config:
type: ec2
mem_gib: 8
vcpu: 4
load_balancers
What are load balancers?
Load balancers are used to direct public traffic to a specific port in a specific pipeline. For example, if your pipeline was running an API server in a node at port 8000, and you would like to expose the API endpoints to public traffic, you would create a load balancer pointing to the correct port and pipeline. For more information, see this.
This block accepts a list of maps, each map describing a port and pipeline that traffic should be directed to. If multiple maps are provided, traffic will be equally distributed between those pipeline-port pairs, allowing the load balancer to continue serving traffic as long as at least one pipeline is running.
Public access
By default, all incoming public traffic is blocked from entering your pipeline. If a load balancer is defined, Aineko Cloud will allow public traffic to enter that port.
<load_balancer_name>
Note, the load balancer name can have at most 12 characters due to endpoint length limits.
Key | Required | Type | Description |
---|---|---|---|
port |
Y | integer | Access port of pipeline that load balancer should direct traffic to. |
pipeline |
Y | string | Pipeline that load balancer should direct traffic to. |