-
Notifications
You must be signed in to change notification settings - Fork 244
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
Improve service catalog related stuff from PR 413 #680
Improve service catalog related stuff from PR 413 #680
Conversation
@surajnarwade I would be glad if you could also resolve #678 as part of this PR |
@@ -34,7 +34,7 @@ var catalogListCmd = &cobra.Command{ | |||
|
|||
var catalogListComponentCmd = &cobra.Command{ | |||
Use: "components", | |||
Short: "List all available component types.", | |||
Short: "List all components available.", | |||
Long: "List all available component types from OpenShift's Image Builder.", | |||
Example: ` # Get the supported components | |||
odo catalog list components |
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.
Is the word components
appropriate here as the goal is to list the builder
images available. I propose/suggest then that you use this command -> List all builder's images available
and odo catalog list builders
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.
From user perspective, it is component, right ?
@@ -34,7 +34,7 @@ var serviceCreateCmd = &cobra.Command{ | |||
|
|||
If service name is not provided, service type value will be used. | |||
|
|||
A full list of service types that can be deployed is available using: 'odo service catalog'`, | |||
A full list of service types that can be deployed are available using: 'odo catalog list services'`, | |||
Example: ` # Create new mysql-persistent service from service catalog. | |||
odo service create mysql-persistent |
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 consistent, the syntax of this command should be
- creation :
odo catalog service create <name_of_the_service_class>
- deletion :
odo catalog service delete mysql-persistent
WDYT ?
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.
odo catalog
is supposed to only list and search images and services
while odo create
or odo delete
will deal with components and
odo service xxx
will deal with services
cmd/catalog.go
Outdated
Example: ` # List all services | ||
odo catalog list services | ||
|
||
# Search for a supported services | ||
# Search for a supported a service | ||
odo catalog search services mysql |
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.
Should we use the plural or singular form ? If the odo's command can do a search to retrieve all the services containing the word passed as parameter, then go ahead to use the plural services
word otherwise that should be the singular
-> odo catalog search service mysql
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 agree with @cmoulliard maybe we should use just service
instead.
@@ -34,7 +34,7 @@ var serviceCreateCmd = &cobra.Command{ | |||
|
|||
If service name is not provided, service type value will be used. | |||
|
|||
A full list of service types that can be deployed is available using: 'odo service catalog'`, | |||
A full list of service types that can be deployed are available using: 'odo catalog list services'`, |
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.
Do you also envision to list the plans
, brokers
, instances
and bindings
created ?
odo catalog list services|plans|brokers|bindings
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,
-
odo catalog list services
should showservice name
,plans
& requiredparameters
-
odo service create service_name --plan plan_name -p parameters
-
odo link component_name --service service_name
which will do the binding stuff
WDYT ?
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.
a) Plan detail
You need a command to show the detail of a plan as we can do with svcat
We could then use by example : odo catalog plan <serviceName>/<planName>
b) Create service
I agree with you for the command to create the service excepted that you must also pass the class name
odo service create service_name --class class_name --plan plan_name -p parameters
Remark : As some parameters are json typed, then it will be very difficult to pass them using a one line command and -p, -p ... This is why, we have in our prototype, defined such parameters/info into a yaml config file
c) Mount the secret to component/
To do the binding, then you must also pass the name of the secret
odo link component_name --secret secret_name
component_name corresponds to the DeploymentConfig's name
secret_name : secret containing the parameters
Remark : There is a step that you don't convert which is "generating the secret with the parameters of the plan selected. Is it something that you will do automatically during the creation of the service ? If this is what you plan to do, then you must also pass the name of the secret ->
odo service create service_name --class class_name --plan plan_name --secret secret_name -p parameters
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.
Looks like you missed #413 (comment)
@@ -34,7 +34,7 @@ var catalogListCmd = &cobra.Command{ | |||
|
|||
var catalogListComponentCmd = &cobra.Command{ | |||
Use: "components", | |||
Short: "List all available component types.", | |||
Short: "List all components 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.
I seem to get confused between component and component type
My current understanding is that a component is an application built using a builder imagestream of type same as component type.. which makes me arrive at
component === app
component type === builder image stream of respective type..
It is possible that I am missing something
Please correct me if I am wrong...
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.
- App is your application which consist of multiple components
- Components is one of the part of your app
- component type is type of component, for example, java or python
cmd/catalog.go
Outdated
Example: ` # List all services | ||
odo catalog list services | ||
|
||
# Search for a supported services | ||
# Search for a supported a service |
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.
Search for a supported service :)
cmd/catalog.go
Outdated
Short: "Lists all the services from service catalog", | ||
Long: "Lists all the services from service catalog", | ||
Short: "Lists all services available", | ||
Long: "Lists all services 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.
Can this be : List all available services ? @cdrage
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.
Yup. That's correct
b568f64
to
948f367
Compare
May be good to change the title / name as well to not include my name haha. Maybe "Improve documentation for catalog" or something along those lines. |
cmd/catalog.go
Outdated
Short: "Lists all the services from service catalog", | ||
Long: "Lists all the services from service catalog", | ||
Short: "Lists all services available", | ||
Long: "Lists all services 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.
Yup. That's correct
cmd/catalog.go
Outdated
Example: ` # List all services | ||
odo catalog list services | ||
|
||
# Search for a supported services | ||
# Search for a supported a service | ||
odo catalog search services mysql |
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 agree with @cmoulliard maybe we should use just service
instead.
cmd/service.go
Outdated
odo service delete mysql-persistent | ||
`, | ||
Args: cobra.MaximumNArgs(1), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
glog.V(4).Infof("service delete called") | ||
|
||
glog.V(4).Infof("service delete called\n") |
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.
similar to my previous comment, can we merge these two debug / info messages?
948f367
to
4ec8f4a
Compare
This LGTM. Need more reviews however before merging. |
@surajnarwade needs another rebase and LGTM. |
4ec8f4a
to
6bbedb1
Compare
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 PR LGTM, merge once travis is green though
Since PR 413 is merged, there were few minor comments charlie mentioned later. Those comments are addressed in this PR.
6bbedb1
to
00b85a5
Compare
Since PR 413 is merged, there were few minor comments charlie mentioned later.
Those comments are addressed in this PR.