openvsx icon indicating copy to clipboard operation
openvsx copied to clipboard

feat: Add configuration for OpenShift deployment and Eclipse Che development

Open svor opened this issue 1 year ago • 2 comments

This PR introduces a .devfile.yaml that sets up a complete development environment in Eclipse Che for developing, testing, and running OpenVSX.

Watch the screencast to see how it works: Run_in_Che.webm

The PR also includes a deployment configuration for OpenShift, enabling the deployment and operation of a custom OpenVSX registry on OpenShift. Additionally, it provides the capability to patch Eclipse Che, allowing it to seamlessly integrate and use this custom registry.

Watch the screencast to see how it works: Deploy_on_OpenShift.webm

A new badge has been added to the main README.md, providing a direct link to open the Eclipse Che developer environment for working with OpenVSX: screenshot-meet_google_com-2024_10_08-17_13_35

Related issue: https://github.com/eclipse-che/che/issues/23148

svor avatar Oct 08 '24 14:10 svor

@svor Who's going to maintain the openshift directory?

amvanbaren avatar Oct 14 '24 07:10 amvanbaren

@amvanbaren Red Hat is going to support the openshift directory. We can contribute the CODEOWNERS file if needed with the specific list of developers

ibuziuk avatar Oct 16 '24 11:10 ibuziuk

@ibuziuk I think it might be better to move the openshift directory to a separate repo. I'm happy to add a link to it in the wiki: https://github.com/eclipse/openvsx/wiki/Deploying-Open-VSX

amvanbaren avatar Oct 24 '24 10:10 amvanbaren

@amvanbaren could you clarify why not to have it in the upstream repo? There are already other product config files / setup for cloud providers available in repository and README.

ibuziuk avatar Oct 30 '24 08:10 ibuziuk

@ibuziuk Yes, those configurations are directly related to running the Open VSX registry (Azure blob storage, Google cloud storage, Github authentication). While running Open VSX on OpenShift is one of numerous ways how the infrastructure can be set up.

amvanbaren avatar Oct 31 '24 09:10 amvanbaren

@amvanbaren well, there are also product-specific configuration files in place for development - https://github.com/eclipse/openvsx?tab=readme-ov-file#development

ibuziuk avatar Oct 31 '24 11:10 ibuziuk

@ibuziuk The proposed changes in README.md and development.md are ok, but I think it might be better to move the openshift directory to the Eclipse Che repo or a new repo.

amvanbaren avatar Oct 31 '24 12:10 amvanbaren

This does seem to contradict Eclipse vendor-neutral governance though? Why one product included and not another? @kineticsquid

deboer-tim avatar Oct 31 '24 15:10 deboer-tim

@deboer-tim @ibuziuk I'm experimenting with your PR. The Dev spaces link, https://docs.redhat.com/en/documentation/red_hat_openshift_dev_spaces, in the readme takes me to a specific devspace release. But it's not clear how I can start a Dev space. Clicking 'My Trials', I see a 'Developer Sandbox' link, but nothing for Dev spaces.

kineticsquid avatar Nov 06 '24 18:11 kineticsquid

@kineticsquid if you navigate to https://workspaces.openshift.com/ and create the Developer Sandbox account you should be able to start a CDE based on the URL from the readme badge https://workspaces.openshift.com#https://github.com/eclipse/openvsx

Screenshot 2024-11-12 at 13 33 36

ibuziuk avatar Nov 12 '24 12:11 ibuziuk

OK, I got my devspaces trial working. I forked @svor's repo and tried the OpenShift link. Got my development environment up and running fine. But, I didn't see a chance to pick a branch and ended up with master. I then made the branch with the changes the default branch and tried again. That worked and I ended up with a development environment with the changes. But, I didn't see an actual running instance of the deployed code. Is that by design, or did I do something wrong?

kineticsquid avatar Nov 12 '24 23:11 kineticsquid

@kineticsquid

But, I didn't see a chance to pick a branch and ended up with master. I then made the branch with the changes the default branch and tried again.

This is expected because the default branch is set to master on https://workspaces.openshift.com#https://github.com/eclipse/openvsx, and changes from the current PR aren’t available there until it is merged.

But, I didn't see an actual running instance of the deployed code. Is that by design, or did I do something wrong?

Initially, the OpenVSX instance doesn’t run in the workspace. To start the OpenVSX instance in the workspace, please follow these instructions: https://github.com/eclipse/openvsx/blob/e85204be985df870e780473f2fd66aab43238390/doc/development.md#using-red-hat-openshift-dev-spaces

The second part of the commands in devfile.yaml (2.1 - 2.6) is designed to build and deploy OpenVSX to an OpenShift cluster. However, these commands (described here) won’t work properly on the https://workspaces.openshift.com/ instance, as they require OpenShift cluster admin privileges. To execute these commands, you need to have admin access to your own OpenShift cluster.

svor avatar Nov 13 '24 10:11 svor

@svor Thanks for the explanation. Re:

The second part of the commands in devfile.yaml (2.1 - 2.6) is designed to build and deploy OpenVSX to an OpenShift cluster. However, these commands (described here) won’t work properly on the https://workspaces.openshift.com/ instance, as they require OpenShift cluster admin privileges. To execute these commands, you need to have admin access to your own OpenShift cluster.

Is there a way to do this free of charge, or to have admin privileges, one needs a paid plan?

kineticsquid avatar Nov 13 '24 22:11 kineticsquid

One other question I think for our committers. This PR includes a script that publishes extensions to an instance deployed on an OpenShift Cluster. It seems this script should either be general for any deployment or, if it needs to be specific to OpenShift, be located in the OpenShift folder.

kineticsquid avatar Nov 13 '24 22:11 kineticsquid

One other question I think for our committers. This PR includes a script that publishes extensions to an instance deployed on an OpenShift Cluster. It seems this script should either be general for any deployment or, if it needs to be specific to OpenShift, be located in the OpenShift folder.

@kineticsquid If I get your question correctly, this script is OpenShift specific and is used only for publishing extensions to the registry deployed on OS. It's already located under openshift folder: openshift/scripts/publish_extensions.sh

svor avatar Nov 14 '24 10:11 svor

@svor Thanks, you do understand my question correctly and you're right, sorry, I missed that.

kineticsquid avatar Nov 14 '24 17:11 kineticsquid

Please make sure that the contribution has the usual copyright and licence headers.

Other than that, I see nothing controversial here.

waynebeaton avatar Nov 19 '24 15:11 waynebeaton

@svor Thanks for the explanation. Re:

The second part of the commands in devfile.yaml (2.1 - 2.6) is designed to build and deploy OpenVSX to an OpenShift cluster. However, these commands (described here) won’t work properly on the https://workspaces.openshift.com/ instance, as they require OpenShift cluster admin privileges. To execute these commands, you need to have admin access to your own OpenShift cluster.

Is there a way to do this free of charge, or to have admin privileges, one needs a paid plan?

Yes, it should be possible to achieve this without incurring costs by using Red Hat OpenShift Local, which provides a local OpenShift cluster for development and testing purposes.

Additionally, once this PR is merged, we can also incorporate deployment configurations for k8s clusters https://github.com/eclipse-che/che/issues/23260

svor avatar Nov 21 '24 16:11 svor

@kineticsquid hello, are we good with the PR? can it be approved & merged or still some follow up is needed?

ibuziuk avatar Nov 28 '24 15:11 ibuziuk

@amvanbaren Anything else we need on this?

kineticsquid avatar Dec 02 '24 15:12 kineticsquid

Any update, it has been a few weeks?

deboer-tim avatar Dec 11 '24 16:12 deboer-tim

Thanks @amvanbaren!

kineticsquid avatar Dec 21 '24 21:12 kineticsquid