Bug 1368877

Summary: [DOCS] [3.3] Document the ability to run two versions of an application and run A/B tests
Product: OpenShift Container Platform Reporter: Vikram Goyal <vigoyal>
Component: DocumentationAssignee: Ashley Hardin <ahardin>
Status: CLOSED CURRENTRELEASE QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: medium    
Version: 3.3.0CC: aos-bugs, jokerman, mmccomas, rchopra, yadu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 20:48:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vikram Goyal 2016-08-22 02:29:47 UTC
Ability to run two versions of an application and control, entirely within OpenShift, percentage of traffic to/from each (variable load balance).

Might have already shipped in OSE 3.2.1.

Might need to interview the SME/GSS/QE for what needs documenting.

Related RFE: https://bugzilla.redhat.com/show_bug.cgi?id=1304283

Eng card: https://trello.com/c/QbXwz8wF

Comment 1 Ashley Hardin 2016-08-22 21:31:17 UTC
@Rajat Do you have any guidance on what should be documented here? Thanks!

Comment 2 Rajat Chopra 2016-08-23 00:23:53 UTC
Rough attempt on how one could use AB load balancing:

To use the openshift's haproxy load balancer to control traffic for an A/B type of deployment, use the new 'Route' structure and the modified template structures as part of the release.
1. If you have two deployments (or more) say A and B, then create respective services for the pods in those deployments. Use the power of labels.
2. The 'Route' resource has a new/additional field called : alternateBackends. Use this field to specify 'Service' objects in addition to the 'To' field. i.e. supply the route with all the backend deployments grouped as services.
3. Also, the 'To' field and the 'AlternateBackends' field have a sub-field called 'weight'. Use this to specify a relative weight in integers ranging from 0 to 256.
4. Finally, deploy the route and observe that the router will balance the traffic according to the weights specified for the services.
5. One can edit the route on the fly (using oc edit route <routename>) and change the percentage/weight of the services in to/alternateBackends fields.

Comment 3 Ashley Hardin 2016-08-24 20:49:54 UTC
Work in progress: https://github.com/openshift/openshift-docs/pull/2731

@Rajat, Thanks for the guidance! Please review the drafted content.

Comment 4 Yan Du 2016-08-26 03:16:16 UTC
The doc looks good. Move bug to verified.