Open d95776 opened 2 years ago
@d95776 thanks for raising this. Can you please help us with which OpenShift cluster you are connected to? (CRC, OpenShift DevConsole, Sandbox)
I connected to our company's openshift cluster.
any comments?
@d95776 Do you see any items it Registries View? You should see the same item as on screenshot. Default registry URL is https://registry.devfile.io/viewer. You might have no access to it because you are behind proxy server and odo cli cannot fetch list of components form the registry server.
yes, I see the same items on the screen except I can't create or see components. I am able to login to our OCP server and see my namespace. is there a way to setup a proxy?
The only supported way right now is through env variables
Just setup it globally and restart VSCode to pick it up.
there's no proxy between the vscode ide and our openshift clusters. if I setup http proxy, the openshift clusters even can't be reached. without proxy, at least I can see my project on the cluster but just not see any component. I guess there's some issue with the extension. The kubernets extension works fine.
@d95776 That is a good point. I'll open issue for related project. Can you see the components from the registry with env variables set?
@d95776 I forgot to mention you can also use NOPROXY env var to exclude your openshift cluster from being connected through proxy.
May I ask what registry do you refer to? I can see the cluster and my namespace. But can't see any items under the namespace.
Do you refer to DefaultDevfileRegistry?
even set NO_PROXY, I get the same result. I think if we can connect to the openshift cluster and my namespace, then there would not be proxy issue and also Kubernetes extension works fine
Under namespace or project extension shows only 'Deployment' resources. There are two kinds of deployments:
So if you see nothing under namespace there are no Deployment resources in it.
In issue description you mentioned 'odo catalog list' reports "no deployable components available" that means extension cannot load so called components or devfiles from the registry here https://registry.devfile.io/viewer.
If you click do you see anything in opened editor?
when I click on it, see message "Loading Registry View" and it hangs for long time. looks like I can't get registry view
once I setup https_proxy, we got error Devfile Registry is not accessible.
It seems that odo losing error info when requesting devfiles from registry could you run command from issue description with -v 10
and see if there are any errors related to communication with registry?
could you please tell the command and from where to run it?
use terminal view in vscode and run this:
"/Users/hchen/.vscode/extensions/redhat.vscode-openshift-connector-0.4.0-darwin-x64/out/tools/darwin/odo" catalog list components -o json -v 10
The command I found is a little bit different from you provided. Here's the result "/Users/hchen/.vscode/extensions/redhat.vscode-openshift-connector-0.6.0-darwin-x64/out/tools/darwin/odo-darwin-amd64" catalog list components -o json -v 10 I0829 19:04:01.029677 92576 util.go:795] HTTPGetRequest: https://raw.githubusercontent.com/redhat-developer/odo/master/build/VERSION I0829 19:04:01.029790 92576 implem.go:107] The path for preference file is /Users/hchen/.odo/preference.yaml I0829 19:04:01.031362 92576 util.go:816] Response will be cached in /var/folders/1w/spg6p9ns2l71rt48yvkv107c7l6swt/T/odohttpcache for 1h0m0s ? Help odo improve by allowing it to collect usage data. Read about our privacy statement: https://developers.redhat.com/article/tool-data-collection. You can change your preference later by changing the ConsentTelemetry preference. (Y/n) I0829 19:04:01.616292 92576 version.go:143] Error checking if newer odo release is available: unable to get latest release tag: error getting latest release: fail to retrive https://raw.githubusercontent.com/redhat-developer/odo/master/build/VERSION: Not Found ? Help odo improve by allowing it to collect usage data. Read about our privacy statement: https://developers.redhat.com/article/tool-data-collection. You can change your preference later by changing the ConsentTelemetry preference. Yes I0829 19:05:03.759284 92576 segment.go:251] Checking telemetry enable status
{ "kind": "Error", "apiVersion": "odo.dev/v1alpha1", "metadata": { "creationTimestamp": null }, "message": "no deployable components found" }
I don't see anything specific to registry, it looks like registry literally has no components. What does command below print out?
"/Users/hchen/.vscode/extensions/redhat.vscode-openshift-connector-0.4.0-darwin-x64/out/tools/darwin/odo" registry list
run /Users/hchen/.vscode/extensions/redhat.vscode-openshift-connector-0.6.0-darwin-x64/out/tools/darwin/odo-darwin-amd64 registry list get the following NAME URL SECURE DefaultDevfileRegistry https://registry.devfile.io No
any one could still look at the issue?
@d95776 yes. Please try latest release of the CLI we use under the hood.
odo-darwin-amd64 registry list
It supposed to show underlying cause when it cannot required info from the registry.
./odo-darwin-amd64 registry list
⚠ Registry DefaultDevfileRegistry is not set up properly with error: Get "https://registry.devfile.io/index": context deadline exceeded (Client.Timeout exceeded while awaiting headers), please check the registry URL, and credential and remove add the registry again (refer to odo preference add registry --help
)
✗ no deployable components found
there's a proxy and how to pass it
@d95776 thanks! At least it shows the error now not just saying 'no components found'.
Could you check if you can access the registry with HTTPS_PROXY env var set as it is shown below?
HTTPS_PROXY=https://url-to-proxy odo-darwin-amd64 registry list
If that works I'll provide the setting to setup proxy for accessing the registry and you would be able to use the extension.
tried HTTPS_PROXY=https://url-to-proxy odo-darwin-amd64 registry list and get same error. our proxy also requires certificate. for this request, how to set it up?
@d95776 I have no solution for that yet. There seems not way to configure sert using env vars. How do you configure that in OS?
proxy are not set at OS level. we set proxy for each application. However, a lot of applications use env var http_proxy and certificate store is set differently for different app. May I ask why we need to access registry even we use on prem openshift? also can registry be a file and can be uploaded into the plugin?
May I ask why we need to access registry even we use on prem openshift? also can registry be a file and can be uploaded into the plugin?
Registry is a set of templates to start. If you already have your source code you you can just download devfile.yaml from the registry website and put it into project's root folder. Your project should be recognized as 'Component' and you would be able to run all applicable commands.
Another option is to deploy the registry on the same cluster and update default registry url to new one.
proxy are not set at OS level. we set proxy for each application. However, a lot of applications use env var http_proxy and certificate store is set differently for different app.
I suspect the lib used to communicate with registry is not looking up for any certs, but I have to confirm that with other team. That should be fixed.
For < Registry is a set of templates to start. If you already have your source code you you can just download devfile.yaml from the registry website and put it into project's root folder. Your project should be recognized as 'Component' and you would be able to run all applicable commands.
I downloaded a java springboot devfile.yaml to one of my springboot application project's root. right click on the file, I can see a menu "Start Dev". My question now is what's the next step to make my sprngboot app deployed to openshift by using this tool? is there any step by step tutorial?
@d95776 Once the component is available in the components View, do the following:
You can stop the component running in development mode by running Stop Dev
command. This will also clear up the resources created in the cluster.
If your spring-boot devfile has deploy and debug configurations, you can deploy the component on the cluster, by clicking the Deploy
command. This will basically deploy your app on the cluster.
Show Logs
and Follow Logs
work as previously to showcase the logs of the running container.
Open in Browser
will open the application using port-forwarding with the ports specified in the devfile.
We are going to add Step by Step
Tutorial soon in the repository discussing all the scenarios.
I installed the openshift connector extension for vscode. I tried to deploy a spring boot restful api java application to openshift cluster. When I did "create a new component", get the following error. What settings I have to configure such that the extension can find a deployable component?
Command failed: "/Users/hchen/.vscode/extensions/redhat.vscode-openshift-connector-0.4.0-darwin-x64/out/tools/darwin/odo" catalog list components -o json { "kind": "Error", "apiVersion": "odo.dev/v1alpha1", "metadata": { "creationTimestamp": null }, "message": "no deployable components found" }