Skip to content

Deploy to OpenShift command #316

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

Merged

Conversation

datho7561
Copy link
Contributor

@datho7561 datho7561 commented Oct 30, 2020

Uses the existing menu to select which Quarkus project to deploy.
Uses OpenShift Connector in order to deploy the Quarkus project to
OpenShift.
OpenShift Connector handles selecting/creating the application and
naming the component.

Closes #313

Signed-off-by: David Thompson [email protected]

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 4 times, most recently from 469ce40 to 9ef087e Compare October 30, 2020 20:29
@datho7561 datho7561 linked an issue Nov 3, 2020 that may be closed by this pull request
@datho7561
Copy link
Contributor Author

@mohitsuman @dgolovin This is a POC for selecting a Quarkus project to deploy from the current workspace. The next step would be integrating with OpenShift Connector in order to deploy the selected Quarkus project to OpenShift.

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 2 times, most recently from b9171e1 to bf30aac Compare November 10, 2020 21:49
@datho7561
Copy link
Contributor Author

I think this should work now. I don't have access to an OpenShift cluster to test this on, though. I tried with minikube and it looks like that doesn't work.

How to use:

  • Build and install a .vsix of OpenShift Connector from the master branch on the GitHub
  • Install the vscode-microprofile extension from your preferred extension marketplace
  • Follow these instructions to get a development environment for this extension
  • Build and run this extension
  • Make a Quarkus project
  • Open the folder that contains the Quarkus project
  • Run the "Quarkus: Deploy to OpenShift" command

This should also work for multi root workspaces. There should be a dialog that prompts to select which project to deploy.

Copy link
Collaborator

@fbricon fbricon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work for me:

Screenshot 2020-11-13 at 10 40 15

Maybe it's because I'm running vscode-quarkus from the Extension Development Host? The openshift extension does install though

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2020

After installing the latest vscode-openshift-tools CI build from https://download.jboss.org/jbosstools/adapters/snapshots/vscode-openshift-tools/?C=M;O=D, without even creating/connecting to an openshift cluster, the deploy command gives me 2 conflicting messages:

Screenshot 2020-11-13 at 17 44 00

@dgolovin if there's no cluster available, we want the deploy command to initiate the creation/configuration of the cluster

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 2 times, most recently from 15de542 to a6ded85 Compare November 13, 2020 19:41
@datho7561
Copy link
Contributor Author

After installing the latest vscode-openshift-tools CI build from https://download.jboss.org/jbosstools/adapters/snapshots/vscode-openshift-tools/?C=M;O=D, without even creating/connecting to an openshift cluster, the deploy command gives me 2 conflicting messages:

I was expecting the command to reject if something goes wrong. If there is a command that returns if there is a cluster or rejects if there is none, I could use that before trying to deploy.

@dgolovin
Copy link
Contributor

dgolovin commented Nov 14, 2020

@datho7561 @fbricon I generated quarkus project, it is using maven. Then I am trying to deploy and get this error: "No quarkus project detected in this folder". How do I set this folder?
quarkus-deploy-project

@datho7561
Copy link
Contributor Author

datho7561 commented Nov 16, 2020

@fbricon it looks like the issue dgolovin ran into is related to jdt.ls not automatically importing the project. I'll investigate and open a bug this afternoon.

@dgolovin If you open the project folder (quarkus-getting-started) through Ctrl+K O, it will complete some initial setup that should have been done automatically. Then, if you try the Deploy to OpenShift, it should work.

I'll also open an issue for improving improve the "no projects detected" to better explain which folders it looks through for the Quarkus project.

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 2 times, most recently from 2a3d8db to 8184429 Compare November 17, 2020 16:11
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch from 8184429 to e8bd39c Compare December 1, 2020 18:53
@datho7561 datho7561 marked this pull request as ready for review December 1, 2020 18:59
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch from e8bd39c to afe3e25 Compare December 3, 2020 22:20
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 3 times, most recently from bdad270 to 13436f9 Compare March 8, 2021 15:50
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch from 570af11 to 0dec4fe Compare March 15, 2021 15:49
@fbricon
Copy link
Collaborator

fbricon commented May 5, 2021

It should be openshift-tools' responsibility to perform the necessary checks for deploying to openshift (stuff involving kubectl for instance). @dgolovin please check what parts of this PR should be moved to openshift tools

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 2 times, most recently from cdcb84f to 8d2bec4 Compare May 11, 2021 19:57
@datho7561
Copy link
Contributor Author

Thanks for the review, Denis! I have addressed the comments.

@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 3 times, most recently from 4f25c20 to ddec3cc Compare May 13, 2021 13:43
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch 2 times, most recently from 507fac2 to e9861ba Compare May 26, 2021 15:17
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch from e9861ba to 72d72f0 Compare May 26, 2021 15:40
@datho7561 datho7561 requested a review from fbricon May 27, 2021 15:44
@datho7561
Copy link
Contributor Author

@fbricon This should work properly with the snapshot build of OpenShift Connector 0.2.7

@dgolovin
Copy link
Contributor

dgolovin commented Jun 9, 2021

@datho7561 0.2.7 was released last week.

Uses the existing menu to select which Quarkus project to deploy.
Uses OpenShift Connector in order to deploy the Quarkus project to
OpenShift.
The component is created if it does not exist yet (i.e. no .odo folder
is present), and it's pushed if it already exists.
OpenShift Connector handles selecting/creating the application and
naming the component.

Closes redhat-developer#313

Signed-off-by: David Thompson <[email protected]>
@datho7561 datho7561 force-pushed the 313-deploy-to-openshift branch from 72d72f0 to 8cc3dac Compare June 9, 2021 13:17
@mohitsuman
Copy link
Collaborator

Hi @datho7561, for this command, do we have any changes for it to be merged ?

@datho7561
Copy link
Contributor Author

@mohitsuman this PR should be good to merge. I'll merge it now.

@datho7561 datho7561 merged commit 68dc8f8 into redhat-developer:master Jun 16, 2021
@datho7561 datho7561 deleted the 313-deploy-to-openshift branch June 16, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a "Deploy to OpenShift" command
4 participants