Editing a deployment

You can edit the KPIs, alerts, parameters, size and scale details of your flow deployment under Deployment Settings or using the CDP CLI.

You can either edit your deployment on the CDF UI or through the CLI.
  • You must have the DFFlowAdmin role assigned to perform this task.

  • You must have deployed a flow definition in Cloudera DataFlow.

Editing deployments on the user interface

  1. Open Cloudera DataFlow by clicking the DataFlow tile in the CDP sidebar.
  2. Click Deployments from the left navigation pane.
  3. Select a flow deployment to expand the Deployment Details pane and get deployment, KPI, system metrics, alerts, and event history information.
  4. In Deployment Details, click Actions > Manage Deployment.
    You are redirected to the Deployment Manager page.
  5. Select KPIs and Alerts to edit KPIs or the alerts they trigger.
  6. Select Sizing and Scaling
    • to change the size and number of NiFi nodes provisioned for your flow deployment
    • to toggle auto-scaling
    • to view storage type
  7. Select Parameters to change flow deployment parameter values.

    You can confirm by finding the Deployment Update success, in Alerts under Deployment Details.

  8. Click Apply Changes before exiting each tab.

Editing a deployment using the CLI

  • You have installed CDP CLI.
  • You have run df list-deployments. The output includes the crn field containing the deployment-crn and the service.crn field containing the environment-crn.
  • To obtain the configuration-version, you have run the following command, the output of which contains the configurationVersion field containing the configuration-version value:
    dfworkload get-deployment-configuration 
    --environment-crn [***ENVIRONMENT_CRN***] 
    --deployment-crn [***DEPLOYMENT_CRN***]
To edit an existing flow deployment, use the cdp dfworkload update-deployment command.
cdp dfworkload update-deployment
          --environment-crn <value>
          --configuration-version <value>
          --deployment-crn <value>
          [--parameter-groups <value>]
          [--auto-scaling-enabled | --no-auto-scaling-enabled]
          [--auto-scale-min-nodes <value>]
          [--auto-scale-max-nodes <value>]
          [--static-node-count <value>]
          [--kpis <value>]
          [--asset-update-request-crn <value>]
  • [--static-node-count] – Specifies the number of NiFi nodes when autoscaling is not enabled. You can select between 1 and 32 nodes. The default value is 1.
  • [--auto-scaling-enabled | --no-auto-scaling-enabled] – Specifies whether you want to enable autoscaling. The default is to disable autoscaling.
    • [--auto-scale-min-nodes] – Specifies the minimum nodes when you have autoscaling enabled. If you have autoscaling enabled, this parameter is required.
    • [--auto-scale-max-nodes] – Specifies the maximum nodes when autoscaling is enabled. If you have autoscaling enabled, this parameter is required.
  • [--parameter-groups] – Specifies the location of the parameter group JSON file you, if you are using one for this flow deployment.
  • [--kpis] – Specifies the location of the KPIs JSON file, if you are providing KPIs for this flow.
Example of updating your static node count:

cdp dfworkload update-deployment \
    --environment-crn $ENVIRONMENT_CRN \
    --deployment-crn $DEPLOYMENT_CRN \
    --configuration-version $CONFIGURATION_VERSION \
    --static-node-count 2
Example of how to use a .json file to update parameter values:

cdp dfworkload update-deployment \
    --environment-crn $ENVIRONMENT_CRN \
    --deployment-crn $DEPLOYMENT_CRN \
    --configuration-version $CONFIGURATION_VERSION \
    --parameter-groups file:///tmp/parameter-groups.json