jbride
2018-09-17 9556e215e2be3a707c3405219464a242567f8629
commit | author | age
9659ff 1 = ocp-workload-3scale-multitenant
J 2
46fd7c 3 == NOTES
J 4
3beab9 5 === API Manager
46fd7c 6 . Using a version of oc utility that corresponds to your target OCP cluster, ensure oc utility is already authenticated as the cluster-admin:   opentlc-mgr
J 7 . This workload requires installation of xmlstarlet on target host executing this ansible
8 . This workload only needs to be executed once per OCP cluster
9 . This workload provisions a single centralized 3scale multi-tenant app in a single OCP namespace called: 3scale-mt-$GUID
d76aab 10 . The OCP namespace for 3scale multi-tenant app will be owned by the following non-existant user:
c79e28 11 .. adm0
J 12 .. adm0 will be assigned a clusterquota so as to manage limits and requests assigned to 3scale
3beab9 13
J 14 === Tenants
15
16 This workload can optionally create multiple tenants in this single multi-tenant 3scale.  If so then ensure the following when invoking this ansible:
17
955244 18 . specify ACTION = "tenant_mgmt"
3beab9 19 . specify "start_tenant" and "end_tenant" variables
J 20 . set value of CREATE_GWS_WITH_EACH_TENANT (true / false) to automate provisioning of a staging and production GW for each tenant
9659ff 21
14b45a 22
J 23 == Execution using localhost oc client
ac6963 24
J 25 -----
f3eb95 26
7e12ac 27
J 28 WORKLOAD="ocp-workload-3scale-multitenant"
9556e2 29 SUBDOMAIN_BASE=`oc whoami --show-server | cut -d'.' -f 2,3,4,5 | cut -d':' -f 1`
14b45a 30
955244 31
J 32 # API manager provision
14b45a 33 ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \
J 34                     -e"ANSIBLE_REPO_PATH=`pwd`" \
35                     -e"ocp_workload=${WORKLOAD}" \
9556e2 36                     -e"ACTION=create" \
J 37                     -e"subdomain_base=$SUBDOMAIN_BASE"
955244 38
9556e2 39
J 40 # Tenant management
41 START_TENANT=1
42 END_TENANT=1
43 CREATE_GWS_WITH_EACH_TENANT=true
955244 44
J 45 # Tenant Management
46 ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \
47                     -e"ANSIBLE_REPO_PATH=`pwd`" \
48                     -e"ocp_workload=${WORKLOAD}" \
49                     -e"ACTION=tenant_mgmt" \
46fd7c 50                     -e"start_tenant=$START_TENANT" \
J 51                     -e"end_tenant=$END_TENANT" \
9556e2 52                     -e"create_gws_with_each_tenant=$CREATE_GWS_WITH_EACH_TENANT" \
J 53                     -e"subdomain_base=$SUBDOMAIN_BASE"
14b45a 54
955244 55
J 56 # Delete
14b45a 57 ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \
J 58                     -e"ANSIBLE_REPO_PATH=`pwd`" \
59                     -e"ocp_workload=${WORKLOAD}" \
9556e2 60                     -e"ACTION=remove" \
J 61                     -e"subdomain_base=$SUBDOMAIN_BASE"
ac6963 62 -----
955244 63
J 64 -----
65 -e"subdomain_base=$SUB_DOMAIN"
66 -----