Deploying Applications

Deploy applications by running a DevOps deployment pipeline.

Before you run a pipeline, you must have a deployment pipeline defined. To run deployment pipelines you must enable logging for the DevOps project. To enable logging, see DevOps Logs.

Each service in Oracle Cloud Infrastructure (OCI) integrates with Identity and Access Management (IAM) for authentication and authorization. To grant users permission to access the DevOps deployment pipelines and other resources, you must create dynamic groups and IAM policies.

For creating dynamic groups and policies for deployment pipelines, see Deployment Pipeline Policies. For more details, see DevOps IAM Policies.

For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.

    1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
    2. On the DevOps Projects page, select a project and a pipeline associated with that project.
    3. Click Run pipeline.
    4. Accept the default name entered for the deployment, or change it.
    5. (Optional) Select the Enable Dry Run check box to preview the difference between Helm chart's current version and the upgrade before deploying.
      With this option, you can see the difference between the upgraded Helm chart and the deployed chart before running the deployment, allowing you to make any changes before deploying the Helm chart. The dry run might pass or fail, the outcome of which is available in the log.
      Note

      This check box is applicable only for Helm chart deployment.
    6. Review the defined parameters for the pipeline. You can update the parameter values. For more information, see Configuring Parameters.
      Pipeline parameters can be overridden by stage parameters.
      Note

      The deployment occurs only when the Helm chart is deployed for the first time, or if any updates are detected in the artifact and any other Helm stage parameter. To deploy the Helm chart irrespective of the updates, set the ENFORCE_HELM_DEPLOYMENT parameter to true.
    7. (Optional) Define parameters for the specific stages in the pipeline.
      You can override pipeline parameters by stage parameters or add new stage parameters.
    8. Click Start Manual Run.

    Deployment progress and status are displayed in the Deployments tab. You can stop a deployment in progress before it completes, by clicking Stop Run. Note the reason for canceling the deployment. Only one deployment can run at a time for a pipeline.

    During deployment of the Install Helm chart to Kubernetes cluster or run Helm commands on Kubernetes cluster stage, you have option to cancel the deployment that results in rollback of the stage to the previous state. See Deploying a Helm Artifact.

    If the deployment pipeline has an Approval stage, then the deployment waits for the manual approval before completion. Approver can approve or reject the deployment. Reason for approval or rejection must be mentioned. You can rerun completed deployments, see Deployment Rerun. After the deployment completes, you can manually roll back individual stages in the pipeline. For more information, see Rolling Back a Deployment.

  • To run a deployment pipeline, run the create-pipeline-deployment command:

    oci devops deployment create-pipeline-deployment --pipeline-id

    To redeploy a pipeline, run the create-pipeline-redeployment command:

    oci devops deployment create-pipeline-redeployment --deployment-id

    To update a deployment, run the update-pipeline-deployment command:

    oci devops deployment update-pipeline-deployment --deployment-id

    To cancel a deployment, run the cancel command:

    oci devops deployment cancel --deployment-id --reason

    To approve a deployment, run the approve command:

    oci devops deployment approve

    Required parameters to provide for the approve command:

    • --deployment-id
    • --action
    • --stage-id

    To get all the commands for deployment:

    oci devops deployment -h
  • To run a deployment pipeline, use the CreateDeployment operation.

    To approve a deployment, use the ApproveDeployment operation.

    To update a deployment, use the UpdateDeployment operation.

    To cancel a deployment, use the CancelDeployment operation.