Customize DeploymentβοΈ
When deploying applications into environments, it's important to automate both pre-deployment and post-deployment procedures.
Pre-deployment procedures include essential tasks such as deploying databases, configuring specific software, and preparing the environment. Additionally, post-deployment procedures, such as testing, configuring, and removing old information from the environment, are crucial for ensuring the smooth operation of the deployed application. To facilitate these processes, the custom deployment feature was implemented in KubeRocketCI.
This page provides comprehensive guidelines on how to adjust the deployment logic to cater your needs.
Deploy Custom PipelineβοΈ
Overall, the custom pipeline creation involves the following steps:
graph LR;
A(Create TriggerTemplate resource) --> B(Create Pipeline resource) --> C(Deploy custom environment)
- Create TriggerTemplate resource - On this step, we create the
TriggerTemplate
custom resource that will appear as an option in the in the environment stage creation menu. - Create Pipeline - On this step, we create custom resource called
Pipeline
that complements the trigger template. This resource contains all the tasks to perform within the custom pipeline. - Integration - On this step, you simply select your custom pipeline logic when creating a stage for your environment.
To customize your deployment pipeline, follow the steps below:
- Create the
TriggerTemplate
custom resource by adding the following label:
Note
Please refer to the TriggerTemplate
example for more details. Remember to set your pipeline name in the spec.resourcetemplates.spec.pipelineRef.name parameter (line #33).
-
Create the custom pipeline with your custom logic. Refer to the custom pipeline example for more details.
-
Apply the created manifest files in the
edp
namespace. -
In the
Create stage
window of the KubeRocketCI portal, select the added trigger template in the corresponding window: -
(Optional) In case you need to implement custom deployment in a remote cluster, do the following:
- Connect the KubeRocketCI platform with the remote cluster if it is not integrated yet. Please refer to the Add Cluster page for more details;
- Mount the secret to the
run-quality-gate
resource by changing the volumes and volumeMounts sections; - Switch the context by specifying the appropriate kube config file of the
run-quality-gate
resource; -
In the
Create stage
window of the KubeRocketCI portal, select the appropriate cluster in the corresponding window: