Skip to content

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)
  1. 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.
  2. 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.
  3. 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:

  1. Create the TriggerTemplate custom resource by adding the following label:
    labels:
        app.edp.epam.com/pipelinetype: deploy
    

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).

  1. Create the custom pipeline with your custom logic. Refer to the custom pipeline example for more details.

  2. Apply the created manifest files in the edp namespace.

  3. In the Create stage window of the KubeRocketCI portal, select the added trigger template in the corresponding window:

    Select trigger template
    Select trigger template

  4. (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:

      Select cluster
      Select cluster

Related Articlesβš“οΈŽ