Base Deployment Template
A deployment configuration is a manifest of the application. It defines the runtime behavior of the application. You can select one of the default deployment charts or custom deployment charts which are created by super admin.
To configure a deployment chart for your application, do the following steps:
Go to Applications and create a new application.
Go to App Configuration page and configure your application.
On the Base Deployment Template page, select the drop-down under Chart type.
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreating-application%2Fdeployment-template%2Fdeployment-chart-v3.jpg&width=768&dpr=4&quality=100&sign=cd74ec0f&sv=1)
Selecting a Chart Type
Who Can Perform This Action?
Users need to have Admin role or above to select a chart.
Note
After you select and save a chart type for a given application, you won't be able to change it later. Make sure to choose the correct chart type before saving. You can select a chart from Devtron Charts or other Deployment Charts.
From Devtron Charts
You can select a default deployment chart from the following options:
Deployment (Recommended)
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreating-application%2Fdeployment-template%2Fselect-devtron-chart.gif&width=768&dpr=4&quality=100&sign=2da609be&sv=1)
From Deployment Charts
This option will be available only if a custom chart exists. If it doesn't, a user with super admin
permission may upload one in Global Configurations → Deployment Charts.
You can select an available custom chart as shown below. You can also view the description of the custom charts in the list.
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreating-application%2Fdeployment-template%2Fselect-custom-chart.gif&width=768&dpr=4&quality=100&sign=8a2d4279&sv=1)
Selecting a Chart Version
Who Can Perform This Action?
Users need to have Admin role or above to select a chart version.
Once you select a chart type, choose a chart version using which you wish to deploy the application.
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreating-application%2Fdeployment-template%2Fchart-version.jpg&width=768&dpr=4&quality=100&sign=28ea008a&sv=1)
Devtron uses helm charts for deployments and it maintains multiple chart versions based on the features it supports.
One can see available chart versions in the drop-down. You can select any chart version as per your requirements. By default, the latest version of the helm chart is selected.
Every chart version has its own YAML file that provides specifications for your application. To make it easy to use, we have created templates for the YAML file and have added some variables inside the YAML. You can provide or change the values of these variables as per your requirement.
Configuring the Chart
Who Can Perform This Action?
Users need to have Admin role or above to configure a chart. However, super-admins can lock keys in base deployment template to prevent non-super-admins from modifying them. Refer Lock Deployment Configuration to know more.
Using Basic GUI
If you are not an advanced user, you may use the Basic (GUI) section to configure your chosen chart.
By default, the following fields are available for you to modify in the Basic (GUI) section:
Fields | Description |
---|---|
Arguments | Enable the |
Command | Enable the |
HTTP Request Routes | Enable the
You can define multiple paths as required by clicking Add path. |
Resources | Here, you can tweak the requests and limits of the CPU resource and RAM resource as per the application. |
Autoscaling | Define the autoscaling parameters to automatically scale your application's deployment based on resource utilization.
|
Environment Variables (Key/Value) | Define
You can define multiple env variables by clicking Add EnvironmentVariables. |
Container Port | The internal port on which the container listens for HTTP requests. Specify the container port and optionally the service port that maps to it. |
Service | Configure the service that exposes your application to the network.
|
Readiness Probe | Define the readiness probe to determine when a container is ready to start accepting traffic.
|
Liveness Probe | Define the liveness probe to check if the container is still running and to restart it if it is not.
|
Tolerations | Define tolerations to allow the pods to be scheduled on nodes with matching taints.
|
ServiceAccount | Specify the service account for the deployment to use, allowing it to access Kubernetes API resources.
|
Click Save Changes. If you want to do additional configurations, then click the Switch to Advanced button or Advanced (YAML) button for modifications.
Note
If you change any values in the 'Basic (GUI)', then the corresponding values will change in 'Advanced (YAML)' too.
Users who are not super-admins will land on 'Basic (GUI)' section when they visit Base Deployment Template page; whereas super-admins will land on 'Advanced (YAML)' section. This is just a default behavior; therefore, they can still navigate to the other section if needed.
By default, the Basic (GUI)
section comes with multiple predefined fields as seen earlier in the table. However, if you wish to display a different set of fields to your team, you can modify the whole section as per your requirement.
This is useful in scenarios where:
Your team members find it difficult to understand and edit the Advanced (YAML) section.
You frequently edit certain fields in Advanced (YAML), which you expect to remain easily accessible in Basic (GUI) section.
You don't require some fields in Basic (GUI) section.
You need the autonomy to keep the Basic (GUI) unique for applications/clusters/environments/charts, or display the same Basic (GUI) everywhere.
There are two ways you can customize the Basic GUI, use any one of the following:
From Deployment Charts section
Using APIs (explained below)
You can pass a custom JSON (deployment schema) of your choice through the following API. You may need to run the API with the POST
method if you are doing it for the first time.
In the
name
field, give a name to your schema, e.g., schema-1Enter the
type
as JSON.The
schema
field is for entering your custom deployment schema. Perform the following steps:To create a custom schema of your choice, you may use RJSF JSON Schema Tool.
Copy the final JSON and stringify it using any free online tool.
Paste the stringified JSON in the
schema
field of the API request body.Send the API request. If your schema already exists, use the
PUT
method instead ofPOST
in the API call.
The
attributeSelector
object helps you choose the scope at which your custom deployment schema will take effect.Priority Category Scope Description 1 (High)
APP_ENV
Specific to an application and its environment
2
APP
Applies at the application level if no specific environment is defined
3
ENV
Applies to specific deployment environment
4
CHART_REF
Applies to all applications using a specific chart type and version
5
CLUSTER
Applies across all applications and environments within a specific cluster
6
GLOBAL
Universally applies if no other more specific schemas are defined
Using Advanced (YAML)
If you are an advanced user wishing to perform additional configurations, you may switch to Advanced (YAML) for modifications.
Refer the respective templates to view the YAML details.
Application Metrics
Depending on the chart type and version you select, application metrics of your application may be viewed. This includes:
Status codes 2xx, 3xx, 5xx
Throughput
Latency ...and many more
Enable Show application metrics toggle to view the application metrics on the App Details page.
IMPORTANT: Enabling application metrics introduces a sidecar container to your main container which may require some additional configuration adjustments. We recommend you to do load test after enabling it in a non-production environment before enabling it in production environment.
Select Save & Next to save your configurations.
Last updated