Application deployment options

6 minute readReferenceAutomation

CloudBees CD/RO supports the following out-of-the-box options to deploy applications:

Author processes or procedures

When defining a step for an application or component process, you must select the actions if a step fails:

  • On Error: Select Stop on Error, Continue on Error, Manual Retry on Error, Automated Retry on Error.

  • Run if: When there are conditions to be met before going to the next step, select one of the following options. The default is all.

  • all: All conditions must be met before the step proceeds.

  • any: At least one condition must be met for the step to proceed.

You can also attach parameters and credentials that affect how the step is executed at runtime. Depending on the type of step that you selected, different sets of parameters or fields are displayed. See Example: Modeling and Deploying Applications for examples of how to define component and application process steps.

  • Application processes:

    • Component –Use this to run a component process when the step is executed.

    • Plugins –Use this to run a third-party plugin.

    • Command –Use this to run one or more commands or a script.

    • Procedure –Use this to run a set of best practices, subroutines, modules, or functions that you can create and reuse at the platform level.

    • Utilities –Use this to run a higher-order operation than a third-party plugin for application modeling.

    • Manual –Use this when a manual step is to be performed by a designated assignee.

    • Rollback –Use this to restore the deployment model to a previous state before a deployment failed.

  • Component processes:

    • Component Operations –Use this to run a component operation.

    • Plugins –Use this to run a third-party plugin.

    • Command –Use this to run one or more commands or a script.

    • Procedure –Use this to run a set of best practices, subroutines, modules, or functions that you can create and reuse at the platform level.

    • Utilities –Use this to run a higher-order operation than a third-party plugin for application modeling.

    • Manual –Use this when a manual step is to be performed by a designated assignee.

      You can use process branching to specify the path through an application or component process based on transition conditions other than out-of- the-box options. Decisions about the next step in the flow are made while the process runs. For more information about process branching states and conditions and how to set them in a process, refer to Process branching.

  • When defining a step for a procedure, you must select the Error handling action if the step fails.

    You can set the parameters for subprocedure steps.

  • When modeling environments:

    Environment tiers in the environment model represent groups of targets defined by their purpose, such as web servers, databases, and artifact repositories. For example, an environment may have environment tiers for the different types of web servers called "Apache," "Tomcat," and "MS SQL", which contain all the files for your company’s website in one or more locations. The resources in the Apache environment tier are the Apache servers in each location.

    Environment Reservation and Calendaring allows you to manage and reduce deployment conflicts and risk when deploying applications, pipelines, or releases.You can schedule blackout periods for planned maintenance work and reserve environments to ensure that resources are available when you need them. The Calendar view makes it easy to visualize planned deployments and conflicts.

  • When staging artifacts before the runtime:

    Artifact staging retrieves artifacts that will be deployed before the deployment run starts. This ensures that all the artifacts are downloaded and available during runtime. It also reduces the application runtime. Artifact staging is enabled by default. See Artifact Staging for more information.

  • At runtime, select one of the following ways to deploy the application. See Example: Modeling and Deploying Applications for deployment examples.

    • Smart deploy

      This deployment method reduces risk and time by only deploying changed objects. CloudBees CD/RO automatically detects the differences between what is about to be deployed and what has already deployed to an environment. It deploys only those objects not yet deployed to a specific resource or to resources where the object version is different. You can use this method throughout the software release life cycle.

      Smart deploy support is limited to EC-Artifact (native artifact repository), EC-Nexus (repository manager), and EC-Artifactory (JFrog artifactory) plugins.
    • Full run

      The system deploys the application with all the application processes, components, and artifacts.

    • Partial run

      The system deploys the application with only the selected application processes, components, and artifacts.

    • Selecting artifacts with specific versions to deploy

      The system runs the application with only the selected versions of the artifacts.

    • Snapshot

      The system deploys a snapshot of the application. Also See Example: Creating, Deploying, and Comparing Snapshots for an example using snapshots.

    • A combination of these ways:

      Smart deploy

      Full run

      Partial run

      Artifacts with

      specific versions

      Snapshot

      Smart deploy

      No

      Yes

      Yes

      Yes

      Full run

      No

      No

      Yes

      Yes

      Partial run

      Yes

      No

      Yes

      Yes

      Artifacts with specific versions

      Yes

      Yes

      Yes

      Yes

      Snapshot

      Yes

      Yes

      Yes

      Yes

  • Artifact Staging

    CloudBees CD/RO retrieves the artifacts that will be deployed in an application run before the deployment starts. This ensures that all the artifacts are downloaded and available on the target. It also minimizes the time it takes to retrieve artifacts and reduces downtime during the deployment. See Artifact Staging for more information.

  • When an action fails in the process

    When an application deployment fails, you can use rollback to restore the deployment to a previous state before the failure occurred. This operation is supported only in application processes in the deployment model. See Rollback for more information.

ectool Example: Component and Application Process Steps

This sample code shows how to design component and application process steps using the ectool API.

#!/bin/bash # set all names hostname='localhost' projectName='default' appName='myApp' envName='myEnv' appTierName='myAppTier' componentName='myComponent' artifactName='DEV:MyArt001' envTierName='myEnvTier' artifactProjectName='EC-Artifact-1.0.9.76076' subProject_artifact='/plugins/EC-Artifact/project' appProcessName='myApp_process' appProcessStepName='myApp_process_step' compProcessName='myComp_process' compProcessStepName='myComp_process_step' resource1='res_1' resource2='res_2' resource3='res_3' resource4='res_4' # login ectool --server $hostname login admin changeme # make sure same application, artifacts, resources don't already exist echo 'make sure same application, artifacts, resources do not already exist' ectool deleteApplication --projectName $projectName --applicationName $appName ectool deleteEnvironment --projectName $projectName --environmentName $envName ectool deleteArtifact --artifactName $artifactName ectool deleteResource --resourceName $resource1 ectool deleteResource --resourceName $resource2 ectool deleteResource --resourceName $resource3 ectool deleteResource --resourceName $resource4 # create application echo 'creating application' ectool createApplication --projectName $projectName --applicationName $appName #create application tier echo 'creating application tier' ectool createApplicationTier --projectName $projectName --applicationName $appName --applicationTierName $appTierName #create and publish artifact versions ectool createArtifact --groupId 'DEV' --artifactKey 'MyArt001'ectool publishArtifactVersion --artifactName $artifactName --version '1.0' --fromDirectory 'tmp/partial_deployment' --includePatterns "abc1.war" ectool publishArtifactVersion --artifactName $artifactName --version '2.0' --fromDirectory 'tmp/partial_deployment' --includePatterns "abc2.war" #create component and add it to app tier ectool createComponent --projectName $projectName --applicationName $appName --componentName $componentName --pluginName $artifactProjectName ectool addComponentToApplicationTier --projectName $projectName --applicationName $appName --applicationTierName $appTierName --componentName $componentName #Set component properties ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details' --propertyType 'sheet' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/artifactName' --value $artifactName ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/versionRange' --value '1.0' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/artifactVersionLocationProperty' --value '/myJob/retrievedArtifactVersions/$[assignedResourceName]' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/overwrite' --value 'update' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/filterList' --value '' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/pluginProcedure' --value 'Retrieve' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_content_details/pluginProjectName' --value 'EC-Artifact' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_ui' --propertyType 'sheet' ectool createProperty --projectName $projectName --applicationName $appName --componentName $componentName --propertyName 'ec_ui/stepType' --value 'operation' #create component process and step ectool createProcess --projectName $projectName --processName $compProcessName --componentApplicationName $appName --processType 'DEPLOY' --componentName $componentName ectool createProcessStep --projectName $projectName --processName $compProcessName --processStepName $compProcessStepName --componentName $componentName --componentApplicationName $appName --subprocedure 'Retrieve' --subproject $subProject_artifact --processStepType 'component' --includeCompParameterRef 1 #create environment, tiers and add resources ectool createEnvironment --projectName $projectName --environmentName $envName --environmentEnabled 'true' ectool createEnvironmentTier --projectName $projectName --environmentName $envName --environmentTierName $envTierName ectool createResource --resourceName $resource1 --hostName $hostname --pools $projectName ectool createResource --resourceName $resource2 --hostName $hostname --pools $projectName ectool createResource --resourceName $resource3 --hostName $hostname --pools $projectName ectool createResource --resourceName $resource4 --hostName $hostname --pools $projectName ectool addResourceToEnvironmentTier --resourceName $resource1 --projectName $projectName --environmentName $envName --environmentTierName $envTierName ectool addResourceToEnvironmentTier --resourceName $resource2 --projectName $projectName --environmentName $envName --environmentTierName $envTierName ectool addResourceToEnvironmentTier --resourceName $resource3 --projectName $projectName --environmentName $envName --environmentTierName $envTierName ectool addResourceToEnvironmentTier --resourceName $resource4 --projectName $projectName --environmentName $envName --environmentTierName $envTierName # create application process and steps ectool createProcess --projectName $projectName --processName $appProcessName --applicationName $appName ectool createProcessStep --projectName $projectName --processName $appProcessName --processStepName $appProcessStepName --errorHandling 'abortJob' --subcomponent $componentName --subcomponentApplicationName $appName --subcomponentProcess $compProcessName --applicationName $appName --applicationTierName $appTierName --processStepType 'process' # create tier mapping