Adding a Traffic Shift Stage

Traffic Shift stage routes the traffic between two sets of backend IPs. You can specify the IPs in each group and also configure the batch count and batch delay based on which the traffic is distributed.

Before adding this stage, you must have a load balancer and listener configured in the Oracle Cloud Console. When you create a load balancer resource, you must specify the backend servers. See Load Balancer Management. The essential components for load balancing include:
    1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
    2. Select a project and a pipeline associated with that project.
    3. To add the Traffic Shift stage sequentially or in parallel, click the + icon and select Add stage.
    4. Select Control - Traffic Shift, and then click Next.
    5. Enter stage name and description. Adding a description is optional.
    6. Click Select load balancer.
      1. Select the load balancer region and compartment.
      2. Select a load balancer from the available list.
    7. Select a listener from the available list.
      After you select a listener, the IP addresses of the servers in the backend set are listed under two groups: group A and group B. You can select an IP address to be in one of the two groups.
    8. To shift the traffic to one of the target groups, select the Traffic Target.
      The Traffic Shift stage shifts the traffic to the selected IP addresses in the target group.
    9. Enter a Batch Count to define the total number of batches that are used to shift the traffic.
      For example, if the batch count is 5, then the traffic shift occurs in 5 batches.
    10. Enter a Batch Delay in seconds to define the delay between each batch.
    11. (Optional) Enter Ramp Limit to specify the maximum traffic to be shifted.
      For example, if the ramp limit is 50 and batch count is 5, then each batch shifts an additional 10% (50/5) of the traffic to the selected target group. The default ramp limit is 100 implying 100% traffic shift to the target group. The service adjusts the weight of the backend set to achieve the preferred traffic shift configuration.
    12. To add the Traffic Shift stage to the pipeline, click Add.
  • To add a traffic shift stage to the pipeline, run the create-load-balancer-traffic-shift-stage command:

    oci devops deploy-stage create-load-balancer-traffic-shift-stage

    Required parameters for the create-load-balancer-traffic-shift-stage command:

    • --blue-backend-ips
    • --green-backend-ips
    • --load-balancer-config
    • --pipeline-id
    • --rollout-policy
    • --stage-predecessor-collection
    • --traffic-shift-target

    To get all the commands for deploy-stage:

    oci devops deploy-stage -h

    To get help for the create-load-balancer-traffic-shift-stage command:

    oci devops deploy-stage create-load-balancer-traffic-shift-stage -h
  • To add a traffic shift stage to the pipeline, use the CreateDeployStage operation. For deployStageType attribute, specify the LOAD_BALANCER_TRAFFIC_SHIFT value.