Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Namespaced Broker Test Plan
- 1) Bring up standard OpenShift cluster -- the method of setup should not matter
- (openshift-ansible or oc cluster up). Additionally, it should not matter if there
- is a cluster-scoped Ansible Service Broker present or not. The requirement is that
- the user creating the `install.md` file should have sufficient permissions to
- create the broker's resources (`cluster-admin`).
- 2) Confirm in the catalog-manager's `DeploymentConfig` that the namespaced
- broker feature flag has been enabled. The command should contain
- `NamespacedServiceBroker=true`.
- 3) Once the catalog's pods are confirmed healthy, the namespaced broker can
- be installed with `kubectl create` on the following file. NOTE: Be sure to
- substitute the APB image the broker_image where required in the file. These
- should be the respective downstream images once they become available. The
- namespace where the broker is going to be installed can also be customized, in
- this case I chose `test_ns_broker` for the namespace. It will be automatically
- created thanks to the `create_broker_namespace=true` argument:
- ```yaml
- ---
- apiVersion: v1
- kind: Namespace
- metadata:
- name: automation-broker-apb
- ---
- apiVersion: v1
- kind: Pod
- metadata:
- name: automation-broker-apb
- namespace: automation-broker-apb
- spec:
- serviceAccount: automation-broker-apb
- containers:
- - name: apb
- image: <INSTERT_APB_IMAGE_HERE>
- args: [ "provision", "--extra-vars", '{ "broker_image": "<INSERT_BROKER_IMAGE_HERE>", broker_kind": "ServiceBroker", "broker_namespace": "test_ns_broker", "create_broker_namespace": true }' ]
- imagePullPolicy: IfNotPresent
- restartPolicy: Never
- ```
- The APB should run to successful completion without failed tasks.
- 4) Wait until the broker pods within the `broker_namespace` have started and
- are healthy (this could take a little bit depending on the configured discovery repos).
- 5) `kubectl get servicebrokers -n test_ns_broker` should list a single automation
- broker. This is the list of namespaced brokers within this namespace.
- 6) Confirm the `ServiceClasses` and `ServicePlans` that the namespaced broker
- provides to the catalog have been created as expected. This can be done either by
- waiting for the catalog to automatically relist, or can be executed manually
- by running `kubectl edit servicebroker automation-broker -n test_ns_broker` and
- incrementing the `relistRequests` field. The following commands should list
- clases and plans:
- `kubectl get serviceclasses -n test_ns_broker`
- `kubectl get serviceplans -n test_ns_broker`
- 7) A full regression should be run through without failure with the following
- `ServiceInstance` and `ServiceBinding`. The notable difference here are the
- `service{Class,Plan}ExternalName` fields on the service instance, rather than
- `clusterService{Class,Plan}ExternalName`. These refer to the namespaced class
- and plans rather than those on the cluster level.
- **mediawiki instance**
- ```yaml
- apiVersion: servicecatalog.k8s.io/v1beta1
- kind: ServiceInstance
- metadata:
- name: mediawiki
- namespace: test_ns_broker
- spec:
- serviceClassExternalName: dh-mediawiki-apb
- servicePlanExternalName: default
- parameters:
- app_name: mediawiki
- mediawiki_db_schema: "mediawiki"
- mediawiki_site_name: "Mediawiki-CI"
- mediawiki_site_lang: "en"
- mediawiki_admin_user: "ci-user"
- mediawiki_admin_pass: "admin"
- ```
- **postgresql instance**
- ```yaml
- apiVersion: servicecatalog.k8s.io/v1beta1
- kind: ServiceInstance
- metadata:
- name: postgresql
- namespace: test_ns_broker
- spec:
- serviceClassExternalName: dh-postgresql-apb
- servicePlanExternalName: dev
- parameters:
- app_name: "postgresql"
- postgresql_database: "admin"
- postgresql_password: "admin"
- postgresql_user: "admin"
- postgresql_version: "9.6"
- ```
- **binding**
- ```yaml
- apiVersion: servicecatalog.k8s.io/v1beta1
- kind: ServiceBinding
- metadata:
- name: mediawiki-postgresql-binding
- namespace: test_ns_broker
- spec:
- instanceRef:
- name: postgresql
- secretName: mediawiki-postgresql-binding
- ```
Add Comment
Please, Sign In to add comment