Before starting service deployment, ensure the application artifact is created and uploaded to the correct path in the Artifactory (JFrog). The deployment images require this artifact; otherwise, the deployment will fail
A service can be deployed in two ways:
via definition.json
named service and version
A service is always deployed in an environment, we'll use the environment created in the for this.
Let's deploy the defined service
odin deploy service --file /path/to/definition.json --provisioning /path/to/provisioning-dev.json --env ENV_NAME
A service definition file must always be accompanied by a provisioning file. Ensure that you provide the provisioning configuration for each component specified in the definition file.
The output will look something like this:
For Odin 1.x.x
If it's a new service or you have changes in your config store, use your service's config store branch to deploy service using the flag --d11-config-store-namespace
Initiating service deployment: SERVICE_NAME@1.0.1-QA-SNAPSHOT in dev-2511
Validating profile@peri-dev-2511-c0548d-SNAPSHOT
Validation succeeded.
Creating images for the components...
Artifact for profile for container created successfully(25s)
All artifacts created successfully. Deploying service.
Initiating deployment in dev-2511
Adding service profile@perishable to dev-2511
Provisioning started for [profile@peri-dev-5004-c0548d-SNAPSHOT]
Service deployed successfully.
For Odin 2.0 and above
The --d11-config-store-namespace flag is now deprecated. Instead:
You can specify this information in theenv_variables object of the provisioning file for the application component.
Use CONFIG_STORE_BRANCH as the key and set its value to the config store branch/tag you want to use.
Example Provisioning config
[
{
"component_name": "<component_name>",
"deployment_type": "<deployment_type>",
"env_variables": {
"CONFIG_STORE_BRANCH": "<config store branch/tag to use>"
}
}
]
Once a service is deployed, the respective components can be found at below URL by default unless the user has provided custom routes for their component