Guest User

Untitled

a guest
Jul 27th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. # Namespaced Broker Test Plan
  2.  
  3. 1) Bring up standard OpenShift cluster -- the method of setup should not matter
  4. (openshift-ansible or oc cluster up). Additionally, it should not matter if there
  5. is a cluster-scoped Ansible Service Broker present or not. The requirement is that
  6. the user creating the `install.md` file should have sufficient permissions to
  7. create the broker's resources (`cluster-admin`).
  8.  
  9. 2) Confirm in the catalog-manager's `DeploymentConfig` that the namespaced
  10. broker feature flag has been enabled. The command should contain
  11. `NamespacedServiceBroker=true`.
  12.  
  13. 3) Once the catalog's pods are confirmed healthy, the namespaced broker can
  14. be installed with `kubectl create` on the following file. NOTE: Be sure to
  15. substitute the APB image the broker_image where required in the file. These
  16. should be the respective downstream images once they become available. The
  17. namespace where the broker is going to be installed can also be customized, in
  18. this case I chose `test_ns_broker` for the namespace. It will be automatically
  19. created thanks to the `create_broker_namespace=true` argument:
  20.  
  21. ```yaml
  22. ---
  23. apiVersion: v1
  24. kind: Namespace
  25. metadata:
  26. name: automation-broker-apb
  27. ---
  28. apiVersion: v1
  29. kind: Pod
  30. metadata:
  31. name: automation-broker-apb
  32. namespace: automation-broker-apb
  33. spec:
  34. serviceAccount: automation-broker-apb
  35. containers:
  36. - name: apb
  37. image: <INSTERT_APB_IMAGE_HERE>
  38. args: [ "provision", "--extra-vars", '{ "broker_image": "<INSERT_BROKER_IMAGE_HERE>", broker_kind": "ServiceBroker", "broker_namespace": "test_ns_broker", "create_broker_namespace": true }' ]
  39. imagePullPolicy: IfNotPresent
  40. restartPolicy: Never
  41. ```
  42.  
  43. The APB should run to successful completion without failed tasks.
  44.  
  45. 4) Wait until the broker pods within the `broker_namespace` have started and
  46. are healthy (this could take a little bit depending on the configured discovery repos).
  47.  
  48. 5) `kubectl get servicebrokers -n test_ns_broker` should list a single automation
  49. broker. This is the list of namespaced brokers within this namespace.
  50.  
  51. 6) Confirm the `ServiceClasses` and `ServicePlans` that the namespaced broker
  52. provides to the catalog have been created as expected. This can be done either by
  53. waiting for the catalog to automatically relist, or can be executed manually
  54. by running `kubectl edit servicebroker automation-broker -n test_ns_broker` and
  55. incrementing the `relistRequests` field. The following commands should list
  56. clases and plans:
  57.  
  58. `kubectl get serviceclasses -n test_ns_broker`
  59.  
  60. `kubectl get serviceplans -n test_ns_broker`
  61.  
  62. 7) A full regression should be run through without failure with the following
  63. `ServiceInstance` and `ServiceBinding`. The notable difference here are the
  64. `service{Class,Plan}ExternalName` fields on the service instance, rather than
  65. `clusterService{Class,Plan}ExternalName`. These refer to the namespaced class
  66. and plans rather than those on the cluster level.
  67.  
  68. **mediawiki instance**
  69.  
  70. ```yaml
  71. apiVersion: servicecatalog.k8s.io/v1beta1
  72. kind: ServiceInstance
  73. metadata:
  74. name: mediawiki
  75. namespace: test_ns_broker
  76. spec:
  77. serviceClassExternalName: dh-mediawiki-apb
  78. servicePlanExternalName: default
  79. parameters:
  80. app_name: mediawiki
  81. mediawiki_db_schema: "mediawiki"
  82. mediawiki_site_name: "Mediawiki-CI"
  83. mediawiki_site_lang: "en"
  84. mediawiki_admin_user: "ci-user"
  85. mediawiki_admin_pass: "admin"
  86. ```
  87.  
  88. **postgresql instance**
  89.  
  90. ```yaml
  91. apiVersion: servicecatalog.k8s.io/v1beta1
  92. kind: ServiceInstance
  93. metadata:
  94. name: postgresql
  95. namespace: test_ns_broker
  96. spec:
  97. serviceClassExternalName: dh-postgresql-apb
  98. servicePlanExternalName: dev
  99. parameters:
  100. app_name: "postgresql"
  101. postgresql_database: "admin"
  102. postgresql_password: "admin"
  103. postgresql_user: "admin"
  104. postgresql_version: "9.6"
  105. ```
  106.  
  107. **binding**
  108.  
  109. ```yaml
  110. apiVersion: servicecatalog.k8s.io/v1beta1
  111. kind: ServiceBinding
  112. metadata:
  113. name: mediawiki-postgresql-binding
  114. namespace: test_ns_broker
  115. spec:
  116. instanceRef:
  117. name: postgresql
  118. secretName: mediawiki-postgresql-binding
  119. ```
Add Comment
Please, Sign In to add comment