-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added service catalog cli details #9653
added service catalog cli details #9653
Conversation
@jpeeler PTAL I still need to update the examples though. |
|
||
[[service-catalog-cli-broker-details]] | ||
=== Get broker details | ||
TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be done...
[[service-catalog-cli-usage]] | ||
== Using `svcat` | ||
This section includes common commands to handle the user associated tasks listed | ||
in xref:index.adoc#service-catalog-design[the service catalog workflow]. Use the `svcat help` command to get more information and view other available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"svcat help" change to "svcat --help"
---- | ||
<1> Replace `<project-name>` with name of your project. | ||
|
||
. Create a service instance definition file *_postgresql-apb.yaml_*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should better use svcat command. For example,
$ svcat provision -n szh-project postgresql-instance --class rh-postgresql-apb --plan dev --params-json '{"postgresql_database":"admin","postgresql_password":"admin","postgresql_user":"admin","postgresql_version":"9.6"}'
Name: postgresql-instance
Namespace: szh-project
Status:
Class: rh-postgresql-apb
Plan: dev
Parameters:
postgresql_database: admin
postgresql_password: admin
postgresql_user: admin
postgresql_version: "9.6"
. The service catalog controller adds those credentials as secrets to the project. | ||
==== | ||
|
||
. Create a service binding definition file *_postgresql-apb-mediawiki-apb-bind.yaml_* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think we should better use svcat command. For example,
$ svcat bind postgresql-instance --name mediawiki-postgresql-binding
Name: mediawiki-postgresql-binding
Namespace: szh-project
Status:
Secret: mediawiki-postgresql-binding
Instance: postgresql-instance
Parameters:
{}
$ svcat get bindings
NAME NAMESPACE INSTANCE STATUS
+------------------------------+-------------+---------------------+--------+
mediawiki-postgresql-binding szh-project postgresql-instance Ready
+ | ||
[source, bash] | ||
---- | ||
$ oc delete -n <project-name> servicebindings <binding-name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unbind the service instance is ok, we don't need to delete the service binding in step 2.
$ svcat unbind --name mediawiki-postgresql-binding
deleted mediawiki-postgresql-binding
$ svcat unbind -n <project-name> <instance-name> | ||
---- | ||
|
||
. Delete the service instance: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprovision the service instance is ok, we don't need to delete the service instance in step 2.
$ svcat deprovision postgresql-instance
deleted postgresql-instance
$ oc delete clusterservicebrokers <broker-name> | ||
---- | ||
|
||
To verify that the broker is removed, view the `ClusterServiceClass` resources for the broker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should verify the broker is removed first.
$ svcat get brokers
NAME URL STATUS
+------------------------+------------------------------------------------------------------------------+--------+
@jpeeler @sunzhaohua2 I was unable to test or run the commands myself. Can you please help me by providing example commands and output for following commands so that all the commands follow a single example through out.
Please see the rendered document for this PR to identify the commands and the flow. |
@gaurav-nelson Below are some examples you can refer. And delete bindings and instances using commands "svcat unbind" and "svcat deprovision" are ok, we should remove "oc delete" command related. Thanks.
|
Thank you @sunzhaohua2 I will update this soon. |
@sunzhaohua2 @jpeeler I have updated this doc, Can you please review this? |
To view the available ClusterServiceClass resources: | ||
[source, bash] | ||
---- | ||
$ svcat get classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. This part need to update. The new version svcat doesn't include UUID in get class|plan output.
$ svcat get classes
NAME DESCRIPTION
+-------------------+--------------------------------+
rh-mediawiki-apb Mediawiki apb implementation
...
rh-mariadb-apb Mariadb apb implementation
rh-mysql-apb Software Collections MySQL APB
rh-postgresql-apb SCL PostgreSQL apb
implementation
[source, bash] | ||
---- | ||
$ svcat get plans | ||
NAME CLASS DESCRIPTION UUID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part also need to update. The new version svcat doesn't include UUID in get class|plan output.
$ svcat get plans
NAME CLASS DESCRIPTION
+---------+-------------------+--------------------------------+
default rh-mediawiki-apb An APB that deploys MediaWiki
...
prod rh-mariadb-apb This plan deploys a single
MariaDB instance with 10 GiB
of persistent storage
dev rh-mariadb-apb This plan deploys a single
MariaDB instance with
ephemeral storage
prod rh-mysql-apb A MySQL server with persistent
storage
dev rh-mysql-apb A MySQL server with ephemeral
storage
prod rh-postgresql-apb A single DB server with
persistent storage
dev rh-postgresql-apb A single DB server with no
storage
To view service instance details, run the command: | ||
[source, bash] | ||
---- | ||
svcat get instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add "$ "
Thanks @sunzhaohua2 I have made suggested updates. |
@openshift/team-documentation PTAL |
The Service Catalog command-line interface (CLI) utility called *`svcat`* is | ||
available to handle these user related tasks. Although these tasks can be | ||
handled by various `oc` commands, `svcat` provides simpler commands to do the | ||
same tasks, allowing easier interaction with the Service Catalog resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid adverbs and passive voice, can I suggest:
While oc
commands can perform the same tasks, you can use svcat
to allow easier interaction with Service Catalog resources.
|
||
[[service-catalog-cli-find-broker]] | ||
==== Find brokers | ||
To view all the brokers installed on the cluster, run the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because #minimalism, maybe drop the "run the following command"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happens a few more times in this PR.
[[service-catalog-cli-view-serviceplans]] | ||
==== View service plans | ||
To view the ClusterServicePlan resources available in the cluster, run the | ||
command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
|
||
[[service-catalog-cli-delete-servicebrokers]] | ||
=== Deleting service brokers | ||
. To remove broker services for the service catalog, delete the `ClusterServiceBroker` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: at the end
ansible-service-broker https://asb.openshift-ansible-service-broker.svc:1338/ansible-service-broker Ready | ||
---- | ||
|
||
. View the `ClusterServiceClass` resources for the broker, to verify that the broker is removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@gaurav-nelson I made some nits 🐄 |
Thanks @bfallonf 💵 |
+ | ||
[source, bash] | ||
---- | ||
$ svcat unbind -n <project-name> <instance-name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part doesn't seem to flow well to me. Since 1 and 2 are really the same step, I think they should be combined.
Also, it should be made clear that that when bindings are removed this way, the user doesn't have to explicitly name each binding to remove. But then give an example of how that is done, such as with svcat unbind -n szh-project --name mediawiki-postgresql-binding
.
Thanks @jpeeler I have updated the example and added a note with additional command to delete individual bindings. |
+ | ||
[source, bash] | ||
---- | ||
$ svcat get classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output should be as below, uuid have been removed.
$ svcat get classes
NAME DESCRIPTION
+------+-------------+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sunzhaohua2 I have updated this.
/cherrypick enterprise-3.10 |
@gaurav-nelson: new pull request created: #10377 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
For https://trello.com/c/0EVVA4po/855-document-catalog-310-add-svcat-cli-to-service-catalog-in-openshift
Preview: https://service-catalog-cli--gnelson-preview.netlify.com/openshift-enterprise/(head%20detached%20at%20fetch_head)/architecture/service_catalog/service_catalog_cli.html