Provision blocks
This page will give a brief overview over the structure of a Provision. See the Service API reference for all available properties.
A Provision consists of the blocks instance, clusters, nodes, endpoints and dependencies:
# resource kind declaration
spec:
# instance provision
clusters:
# list of cluster provisions
-
nodes:
# list of node provisions
-
endpoints:
# list of endpoint provisions
-
dependencies:
# map of dependency provisions# resource kind declaration
apiVersion: service.aep.asag.io/v1 # the AEP service resource api with version
kind: Provision # the resource type is a provision
metadata:
namespace: prod # the project scope of the provision
name: myshop # a unique name of the provision per project
spec:
# instance provision
name: lemp # the definition name it provisions
vendor: asag # the definition vendor it provisions
version: "0.1" # the definition version it provisions
# the following properties can be omitted if no settings are requested or changes wished for those blocks from the definition
clusters:
# list of cluster provisions
- name: nginx # the cluster shortname
nodes:
# list of node provisions
- {}
- {}
endpoints:
# list of endpoint provisions
- name: web # the endpoint shortname
dependencies:
# map of dependency provisions
db: {} # the dependency shortnameResource kind
In AEP a resource needs to be typed and named and is defined by the resource kind and metadata. For Provisions this resource kind is Provision in the Service API. The metadata specifies the name and the project scope of this resource which combination must be unique. For Provisions namespaces respresent the project.
apiVersion: service.aep.asag.io/v1
kind: Provision
metadata:
namespace: myproject
name: myname
# ...apiVersion: service.aep.asag.io/v1 # the AEP service resource api with version
kind: Provision # the resource type is a provision
metadata:
namespace: prod # the project scope of the provision
name: myshop # a unique name of the provision per project
# ...Instance provision
The instance block primarily contains properties which identify the definition it provisions from. It will be enriched with runtime reference infos once deployed.
version can be omitted to provision from the latest definition.
spec:
name: myservice
vendor: myvendor
version: "0.0.0"
# ...spec:
name: lemp # the definition name it provisions
vendor: asag # the definition vendor it provisions
version: "0.1" # the definition version it provisions
# ...Cluster provision
A cluster block will be enriched with runtime reference infos once deployed. The name must match the cluster shortname in the definition.
clusters can be omitted if there are no settings required from the definition. AEP will automatically create the structure from the definition.
spec:
clusters:
- name: mycluster
# ...spec:
clusters:
- name: nginx # the cluster shortname
# ...Node provision
A node block will be enriched with runtime reference infos once deployed. A list of empty node objects can be specified to define the cluster size for the initial deployment.
nodes can be omitted if the default cluster size should be used and there are no settings required from the definition. AEP will automatically create the structure from the definition.
spec:
clusters:
-
nodes:
-
# ...spec:
clusters:
-
nodes:
- {}
- {}Endpoint provision
An endpoint block will be enriched with runtime reference infos once deployed. The name must match the endpoint shortname in the definition.
endpoints can be omitted if there are no settings required from the definition. AEP will automatically create the structure from the definition.
spec:
clusters:
-
endpoints:
- name: myendpoint
# ...spec:
clusters:
-
endpoints:
- name: web # the endpoint shortname
# ...Dependency provision
A dependency block will be enriched with runtime reference infos once deployed. The name must match the dependency shortname in the definition.
dependencies can be omitted if there are no settings required from the definition. AEP will automatically create the structure from the definition.
spec:
dependencies:
mydependency:
# ...spec:
dependencies:
db: # the dependency shortname
# ...