Skip to content

Commit

Permalink
Update the help usage for odo create and odo url create
Browse files Browse the repository at this point in the history
**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

/kind cleanup
/kind documentation

**What does does this PR do / why we need it**:

Updates the `--help` in the following way:
 - Changes the `odo create --help` usage to a 1-sentence summary similar
 to every other command
 - Updates our documentation to remove any mention of crc for something
 more neutral (example.com) similar to kubectl / kubernetes
 documentation, for example: https://kubernetes.io/docs/concepts/services-networking/ingress/

**Which issue(s) this PR fixes**:

Fixes redhat-developer#3463

**PR acceptance criteria**:

- [X] Documentation

- [X] I have read the [test guidelines](https://github.com/openshift/odo/blob/master/docs/dev/test-architecture.adoc)

**How to test changes / Special notes to the reviewer**:

`odo create --help`

and

`odo url create --help`

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
  • Loading branch information
cdrage committed Aug 27, 2020
1 parent fa709ab commit 762ed22
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
26 changes: 13 additions & 13 deletions docs/public/deploying-a-devfile-using-odo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ Alternatively, you can pass in `--starter` to `odo create` to have odo download
+
[source,sh]
----
$ odo url create
✓ URL myspring-8080.apps-crc.testing created for component: myspring
$ odo url create --host example.com
✓ URL myspring-8080.example.com created for component: myspring
To apply the URL configuration changes, please use odo push
----
Expand All @@ -164,7 +164,7 @@ NOTE: If deploying on Kubernetes, you need to pass ingress domain name via `--ho
✓ Waiting for component to start [5s]
Applying URL changes
✓ URL myspring-8080: http://myspring-8080.apps-crc.testing created
✓ URL myspring-8080: http://myspring-8080.example.com created
Syncing to component myspring
✓ Checking files for pushing [2ms]
Expand All @@ -185,14 +185,14 @@ NOTE: If deploying on Kubernetes, you need to pass ingress domain name via `--ho
$ odo url list
Found the following URLs for component myspring
NAME URL PORT SECURE
myspring-8080 http://myspring-8080.apps-crc.testing 8080 false
myspring-8080 http://myspring-8080.example.com 8080 false
----
. View your deployed application using the generated URL:
+
[source,sh]
----
$ curl http://myspring-8080.apps-crc.testing
$ curl http://myspring-8080.example.com
----
. To delete your deployed application:
Expand Down Expand Up @@ -250,8 +250,8 @@ In this example we will be deploying an https://github.com/odo-devfiles/nodejs-e
+
[source,sh]
----
$ odo url create
✓ URL mynodejs-8080.apps-crc.testing created for component: mynodejs
$ odo url create --host example.com
✓ URL mynodejs-8080.example.com created for component: mynodejs
To apply the URL configuration changes, please use odo push
----
Expand All @@ -271,7 +271,7 @@ NOTE: If deploying on Kubernetes, you need to pass ingress domain name via `--ho
✓ Waiting for component to start [3s]
Applying URL changes
✓ URL mynodejs-3000: http://mynodejs-3000.apps-crc.testing created
✓ URL mynodejs-3000: http://mynodejs-3000.example.com created
Syncing to component mynodejs
✓ Checking files for pushing [2ms]
Expand All @@ -292,14 +292,14 @@ NOTE: If deploying on Kubernetes, you need to pass ingress domain name via `--ho
$ odo url list
Found the following URLs for component mynodejs
NAME URL PORT SECURE
mynodejs-8080 http://mynodejs-8080.apps-crc.testing 8080 false
mynodejs-8080 http://mynodejs-8080.example.com 8080 false
----
. View your deployed application using the generated URL:
+
[source,sh]
----
$ curl http://mynodejs-8080.apps-crc.testing
$ curl http://mynodejs-8080.example.com
----
. To delete your deployed application:
Expand Down Expand Up @@ -342,8 +342,8 @@ In this example we will be deploying a https://github.com/odo-devfiles/quarkus-e
+
[source,sh]
----
$ odo url create
✓ URL myquarkus-8080.apps-crc.testing created for component: myquarkus
$ odo url create --host example.com
✓ URL myquarkus-8080.example.com created for component: myquarkus
To apply the URL configuration changes, please use odo push
----
Expand Down Expand Up @@ -385,7 +385,7 @@ Pushing devfile component myquarkus
$ odo url list
Found the following URLs for component myspring
NAME URL PORT SECURE
myquarkus-8080 http://myquarkus-8080.apps-crc.testing 8080 false
myquarkus-8080 http://myquarkus-8080.example.com 8080 false
----
You can now continue developing your application. Just run `odo push` and refresh your browser to view the latest changes.
Expand Down
20 changes: 10 additions & 10 deletions pkg/odo/cli/url/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ var (
%[1]s example --port 8080
`)

urlCreateExampleExperimental = ktemplates.Examples(` # Create a URL with a specific host by automatically detecting the port used by the component (using CRC as an exampple)
%[1]s example --host apps-crc.testing
urlCreateExampleExperimental = ktemplates.Examples(` # Create the URL myurl.example.com by automatically detecting the port used by the component
%[1]s myurl --host example.com
# Create a URL with a specific name and host (using CRC as an example)
%[1]s example --host apps-crc.testing
# Create a URL with a specific name and host
%[1]s myurl --host example.com
# Create a URL for the current component with a specific port and host (using CRC as an example)
%[1]s --port 8080 --host apps-crc.testing
# Create a URL for the current component with a specific port and host
%[1]s --port 8080 --host example.com
# Create a URL of ingress kind for the current component with a host (using CRC as an example)
%[1]s --host apps-crc.testing --ingress
# Create a URL of ingress kind for the current component with a host
%[1]s --host example.com --ingress
# Create a secure URL for the current component with a specific host (using CRC as an example)
%[1]s --host apps-crc.testing --secure
# Create a secure URL for the current component with a specific host
%[1]s --host example.com --secure
`)

urlCreateExampleDocker = ktemplates.Examples(` # Create a URL with a specific name by automatically detecting the port used by the component
Expand Down

0 comments on commit 762ed22

Please sign in to comment.