Skip to content
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

Document use of "odo url create" for devfile in CLI and docs #2832

Closed
dharmit opened this issue Apr 7, 2020 · 8 comments · Fixed by #2875
Closed

Document use of "odo url create" for devfile in CLI and docs #2832

dharmit opened this issue Apr 7, 2020 · 8 comments · Fixed by #2875
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@dharmit
Copy link
Member

dharmit commented Apr 7, 2020

/kind bug

What versions of software are you using?

Operating System: all

Output of odo version: master

How did you run odo exactly?

Tried odo url create for a component based on DevFile.

$ odo url create
 ✗  host must be provided in order to create ingress

$ odo url create -h
Create a URL for a component. The created URL can be used to access the specified component from outside the OpenShift cluster.

Usage:
  odo url create [url name] [flags]

Examples:
  # Create a URL with a specific name by automatically detecting the port used by the component
  odo url create example
  # Create a URL for the current component with a specific port
  odo url create --port 8080
  
  # Create a URL with a specific name and port
  odo url create example --port 8080

Flags:
      --context string      Use given context directory as a source for component settings
      --devfile string      Path to a devfile.yaml (default "./devfile.yaml")
  -h, --help                Help for create
      --host string         Cluster ip for this URL
      --now                 Push changes to the cluster immediately
      --port int            Port number for the url of the component, required in case of components which expose more than one service port (default -1)
      --secure              Creates a secure https url
      --tls-secret string   Tls secret name for the url of the component if the user bring his own tls secret

Additional Flags:
  -v, --v Level              Log level for V logs. Level varies from 0 to 9 (default 0).
      --vmodule moduleSpec   Comma-separated list of pattern=N settings for file-filtered logging

Actual behavior

Command failed asking me to provide a value for host. But there's no example for how this can be done in odo url create -h or in the docs.

Expected behavior

There should at least be CLI docs (i..e. and example in output of odo url create -h) for this.

I understand that adding it to documentation might take some time since this is experimental and subject to change.

@dharmit dharmit added the area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. label Apr 7, 2020
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 7, 2020
@dharmit
Copy link
Member Author

dharmit commented Apr 9, 2020

Setting high priority on this one because creation of URL is pretty important to access the component deployed on the cluster.

/label priority/high

@openshift-ci-robot
Copy link
Collaborator

@dharmit: The label(s) /label priority/high cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash

In response to this:

Setting high priority on this one because creation of URL is pretty important to access the component deployed on the cluster.

/label priority/high

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.

@dharmit dharmit added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Apr 9, 2020
@dharmit
Copy link
Member Author

dharmit commented Apr 9, 2020

ping @kadel @elsony

@kadel
Copy link
Member

kadel commented Apr 9, 2020

Command failed asking me to provide a value for host. But there's no example for how this can be done in odo url create -h or in the docs.

this is a side-effect of the fact that odo url create creates only Ingress. Ingress requires host to be specified not like Route that can determine host automatically on the cluster based on router controller configuration.

Route support should be added back as part of #2727

I think that this is more a documentation issue than bug.

@dharmit
Copy link
Member Author

dharmit commented Apr 9, 2020

I am running a CRC VM on my laptop and I've tried to do:

$ odo url create --host console-openshift-console.apps-crc.testing --secure

It creates a URL without any error, I push it as well. But the application is not accessible on the URL thus created. Maybe it's the ingres vs. route thing as you mentioned @kadel.

I think that this is more a documentation issue than bug.

I didn't add it as documentation because that might have got the docs team looking into this which is not what we need right now. 😄

@kadel
Copy link
Member

kadel commented Apr 9, 2020

@dharmit you should use just --host apps-crc.testing

@kadel
Copy link
Member

kadel commented Apr 9, 2020

The flag actually doesn't specify full host for Ingress, but rather base domain, the actually host will be <url name>.<--host value>

so if you do odo url create --port 8080 --host apps-crc.testing the name of the url is autogenerated from the component name and port. The actual url will be http://mycomponent-8080.apps-crc.testing

if you do odo url create myurl --port 8080 --host apps-crc.testing the url will be http://myurl.apps-crc.testing

@yhontyk
Copy link

yhontyk commented Apr 9, 2020

@dharmit I actually almost started to update the CLI reference doc. :D Tag/ping me if this will need an update in the docs on the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants