From 762ed22678878dbbdb8b26ec2a4949c5a38d57cb Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Thu, 27 Aug 2020 16:18:07 -0400 Subject: [PATCH] Update the help usage for odo create and odo url create **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 https://github.com/openshift/odo/issues/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 --- .../public/deploying-a-devfile-using-odo.adoc | 26 +++++++++---------- pkg/odo/cli/url/create.go | 20 +++++++------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/public/deploying-a-devfile-using-odo.adoc b/docs/public/deploying-a-devfile-using-odo.adoc index 743fcf3fba7..9554d141860 100644 --- a/docs/public/deploying-a-devfile-using-odo.adoc +++ b/docs/public/deploying-a-devfile-using-odo.adoc @@ -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 ---- @@ -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] @@ -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: @@ -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 ---- @@ -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] @@ -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: @@ -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 ---- @@ -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. diff --git a/pkg/odo/cli/url/create.go b/pkg/odo/cli/url/create.go index 88751a8fead..9033b10f90a 100644 --- a/pkg/odo/cli/url/create.go +++ b/pkg/odo/cli/url/create.go @@ -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