The Ekara descriptor is a YAML document consisting of the following top-level sections:
The following properties define the basic information of the environment:
# Name of the environment (mandatory)
name: myEnvironment
# Optional qualifier of the environment (like dev, test, prod, ...)
qualifier: dev
# Optional description of the environment
descriptor: This is my awesome ekara environment.
The ekara
section controls the Ekara platform settings:
ekara:
# The base location for short-form repositories
base: https://github.com
# Parent component to inherit from
parent:
repository: ekara-platform/parent
ref: v1
# Additional components to be imported
components:
myComponent:
repository: my-organization/my-component
ref: v2
Read more about how components are discovered and parsed.
The base location is used to resolve short repository names for the descriptor only:
ekara:
base: https://a.given.base.com
parent:
repository: my-organization/parent
components:
myComponent:
repository: my-organization/my-component
The declaration above will result in the following resolved URLs:
When no base is specified, Ekara will use https://github.com
as default.
The parent is a component from which everything will be inherited in the environment. A parent can also have a parent itself.
Additional components can be declared in the components
section but will only be fetched and imported upon effective use in the descriptor.
An environment descriptor can define variables, which can then be used in templating:
vars:
var1_key: descriptor_var1_values
var2_key: descriptor_var2_values
A variable can only be used in templating if it already has been declared in:
Variable precedence follow the component precedence rules.
Although the Ekara descriptor itself is always templated, if you want to template other files of the component you must declare them in the following section:
templates:
- docker-compose.yaml
- config/**/*.conf
Template paths must be relative to the descriptor file (i.e. the component root). Glob patterns can be used to match multiple files in a single expression.
Read more about templating for more details.
The providers
section declares the cloud providers that can be used for creating node sets:
providers:
ek-aws:
# Name of the provider component
component: ek-aws
# Provider parameters applicable to all node sets (unless overridden)
params:
region: eu-west-1
The orchestrator
section declares the container orchestrator that will be installed:
orchestrator:
# Name of the orchestrator component
component: ek-swarm
# Orchestrator parameters applicable to all node sets
params:
someParam: someValue
# Docker parameters applicable to all node sets
docker:
someParam: someValue
While the params
section is used to configure the orchestrator, the docker
section is used for Docker itself.
The nodes
section declares the machines on which the environment will run, grouped by node sets:
nodes:
managers:
# Number of identical nodes in this node set
instances: 3
# Node labels for selection purposes
labels:
label1: value1
label2: value2
# Provider for node provisioning
provider:
# Name of a provider declared in the providers section
name: ek-aws
# Provider parameters for this node set (overriding general provider parameters)
params:
someAwsParam: someValue
orchestrator:
# Orchestrator parameters for this node set (overriding general orchestrator parameters)
params:
someSwarmParam: someValue
# Docker parameters for this node set (overriding general docker parameters)
docker:
someDockerParam: someValue
A special node set named *
can be declared for parameters common to all nodesets.
The stacks
section declares the software stacks that will be deployed in the environment:
stacks:
myStack:
# Component containing the software stack
component: some-stack
The component referenced must contain:
docker-compose.yaml
file for Docker Swarm),deploy.yaml
playbook for custom deployment.The tasks
section declares the tasks that can be executed in the environment:
tasks:
myTask:
# The component containing the task
component: myComponent
# The location of the playbook to execute
task: task1.yaml
# The parameters to be passed to the playbook
params:
param1: value1
# If specified the task will be executed automatically according to the specified schedule
cron: 0 * * * *