Provisioning

Each component-type can define it's default way of provisioning. As a service moves through SDLC, there may be use cases where a given service needs to be deployed with different configuration in the same env type or different env type e.g. dev and load. Provisioning config enables a service owner to define different provisioning config while deploying a service and for different environment types as well.

Let's look at different ways of using provisioning config

Provisioning config during deployment

To provide a provisioning config during deployment let's create a file called provisioning.config which outlines the provisioning behaviour for each component with that service. You should only mention component which you need to override, for components not mentioned in this file Odin will take the default provisioning config from the component-type definition.

[
    {
        "component_name": "COMPONENT_1",
        "deployment_type": "container"
    },
    {
        "component_name": "COMPONENT_2",
        "deployment_type": "container"
    }
]

See list of all params that can be passed for various component-type configs here.

odin deploy service --file definition.json --provisioning provisioning.json --env ENV_NAME

or

odin deploy service --name sevice_1 --version v1 --provisioning provisioning.json --env ENV_NAME

Provisioning config during service release

While releasing a service, default provisioning config for various environment types can be defined.

Once you have the list of various environment types and provisioning config has been defined for various environment types, organise them as per the below convention

service-definition-folder
  definition.json
  provisioning-dev.json
  provisioning-load.json
  provisioning-int.json

definition.json is the service-definition file.

Assuming the various environment types available are dev, load, int. The three files provisioning-dev.json, provisioning-load.json and provisioning-int.json respectively will act as default provisioning config in the corresponding environment types.

Use odin release command to release the service by passing the folder path

odin release service --path service-definition-folder-path

Now service deployed by anyone in the given environment types will be provisioned with the definitions given unless overrriden during deployment. Go to next section to learn about default and override-able params in service definition.

Last updated