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

feat: Support running VS Code in ubi9-based containers #317

Closed
wants to merge 18 commits into from

Conversation

RomanNikitenko
Copy link
Contributor

@RomanNikitenko RomanNikitenko commented Dec 7, 2023

Some adaptation is required for the downstream, so please do NOT merge the current PR - I'm going to provide the corresponding changes to the downstream while the current PR is under review.

What does this PR do?

The current solution works for ubi8 and ubi9-based containers, see How to test this PR section.

What issues does this PR fix?

eclipse-che/che#21778

How to test this PR?

I tested it for the following images:

Image Workspace starts Link to start a workspace
quay.io/devfile/universal-developer-image:ubi8-latest + click here
registry.access.redhat.com/ubi8 + click here
registry.access.redhat.com/ubi8/ubi:8.8-1032.1692772289 + click here
registry.access.redhat.com/ubi8/openjdk-11:latest + click here
registry.access.redhat.com/ubi8/nodejs-16:1-139 + click here
registry.access.redhat.com/ubi8/nodejs-18:1-32 + click here
registry.access.redhat.com/ubi9 + click here
registry.access.redhat.com/ubi9/ubi:9.3-1476 + click here
registry.access.redhat.com/ubi9/nodejs-18:1-84 + click here
registry.access.redhat.com/ubi9/python-39:1-161 + click here
registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145 + click here
registry.access.redhat.com/ubi9/openjdk-17:1.17-1 + click here

Copy link

github-actions bot commented Dec 7, 2023

Click here to review and test in web IDE: Contribute

Copy link

github-actions bot commented Dec 7, 2023

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

4 similar comments
Copy link

github-actions bot commented Dec 7, 2023

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-317-amd64

@RomanNikitenko
Copy link
Contributor Author

@l0rd
I've adapted the corresponding jobs => PR Checkgithub action now passes successfully and the image contains all required changes.

So now it's possible to test starting VS Code for both: ubi8 and ubi9 containers using that image.

@l0rd
Copy link
Contributor

l0rd commented Dec 13, 2023

When I try with this image (quay.io/mloriedo/cloud-dev-images:ubi8) I get:

/checode/entrypoint-volume.sh: line 36: openssl: command not found
OpenSSL major version is .
Full entrypoint-logs.txt
cat entrypoint-logs.txt 
total 4
drwxrwsrwx. 6 root       1001110000  138 Dec 13 17:22 .
dr-xr-xr-x. 1 root       root        157 Dec 13 17:22 ..
drwxr-sr-x. 2 1001110000 1001110000   26 Dec 13 17:22 bin
drwxr-sr-x. 4 1001110000 1001110000   30 Dec 13 17:22 checode-linux-libc
drwxr-sr-x. 8 1001110000 1001110000  151 Dec 13 17:22 checode-linux-musl
-rw-rw-rw-. 1 1001110000 1001110000    0 Dec 13 17:22 entrypoint-logs.txt
-rwxr-xr-x. 1 1001110000 1001110000 1799 Dec 13 17:22 entrypoint-volume.sh
drwxr-sr-x. 3 1001110000 1001110000   18 Dec 13 17:22 remote
time="2023-12-13T17:22:28Z" level=info msg="Default 'info' log level is applied"
/checode/entrypoint-volume.sh: line 36: openssl: command not found
OpenSSL major version is .
Error: Unsupported OpenSSL major version .
time="2023-12-13T17:22:28Z" level=info msg="Exec containers configuration:"
time="2023-12-13T17:22:28Z" level=info msg="==> Debug level info"
time="2023-12-13T17:22:28Z" level=info msg="==> Application url 0.0.0.0:3333"
time="2023-12-13T17:22:28Z" level=info msg="==> Absolute path to folder with static resources "
time="2023-12-13T17:22:28Z" level=info msg="==> Use bearer token: false"
time="2023-12-13T17:22:28Z" level=info msg="==> Pod selector: controller.devfile.io/devworkspace_id=workspacef54f20d66d2f4653"
time="2023-12-13T17:22:28Z" level=info msg="==> Idle timeout: 3h0m0s"
time="2023-12-13T17:22:28Z" level=info msg="==> Run timeout: 24h0m0s"
time="2023-12-13T17:22:28Z" level=info msg="==> Stop retry period: 10s"
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /connect                  --> main.main.func2 (3 handlers)
[GIN-debug] GET    /attach/:id               --> main.main.func3 (3 handlers)
[GIN-debug] POST   /exec/config              --> main.main.func4 (3 handlers)
[GIN-debug] POST   /exec/init                --> main.main.func5 (3 handlers)
[GIN-debug] POST   /activity/tick            --> main.main.func6 (3 handlers)
[GIN-debug] GET    /healthz                  --> main.main.func7 (3 handlers)
⇩ Registered RPCRoutes:

Json-rpc MachineExec Routes:
✓ create
✓ check
✓ resize
✓ listContainers
time="2023-12-13T17:22:28Z" level=info msg="Activity tracker is run and workspace will be stopped in 3h0m0s if there is no activity"
time="2023-12-13T17:22:28Z" level=info msg="Run idle manager is running. The workspace will be stopped in 24h0m0s"
[GIN-debug] Listening and serving HTTP on 0.0.0.0:3333

Note that using this same image works with current checode. And that my expectation would be that it works on the UBI9 version of that too.

@RomanNikitenko
Copy link
Contributor Author

@l0rd
there is no openssl command in the container:

image

I'm not sure why it's absent, but anyway - thank you very much for reporting this problem - I'm going to look for a better way detecting openssl version for such images...

@l0rd
Copy link
Contributor

l0rd commented Dec 13, 2023

I'm not sure why it's absent, but anyway

This is the default UBI8 image 🤷 , yes I guess you will have to find another check.

@RomanNikitenko
Copy link
Contributor Author

RomanNikitenko commented Dec 13, 2023

@l0rd
I tested it for ubi9 based image and for quay.io/devfile/universal-developer-image:ubi8-latest

it worked well:

image

also it worked for ubi8/nodejs that we use as a base image to prepare Che-Code assembly:

image

it's still draft PR, so, as I mentioned above - thanks for testing and reporting it!

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-317-amd64

Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

1 similar comment
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-317-amd64

@RomanNikitenko RomanNikitenko force-pushed the ubi_9_support branch 5 times, most recently from 4b590c5 to df5662d Compare December 27, 2023 09:46
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
@che-incubator che-incubator deleted a comment from github-actions bot Dec 27, 2023
build/dockerfiles/linux-libc-ubi8.Dockerfile Outdated Show resolved Hide resolved
.github/workflows/image-publish.yml Outdated Show resolved Hide resolved
.github/workflows/rebase-insiders.yml Outdated Show resolved Hide resolved
@azatsarynnyy
Copy link
Member

@azatsarynnyy I think we should add Required label for the following jobs after merging the current PR:

image

Do you have permissions to do it?

@RomanNikitenko yes, we can update the repo settings - I have the required permissions.
BTW, do you think that having the assemble check the only one that is required should be enough, as it already depends on other build checks?

RomanNikitenko and others added 18 commits January 15, 2024 13:48
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
…and is not available

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
Copy link

Pull Request Dev image published:
👉 quay.io/che-incubator-pull-requests/che-code-dev:pr-317-dev-amd64

Copy link

Pull Request Che-Code image published:
👉 quay.io/che-incubator-pull-requests/che-code:pr-317-amd64

@RomanNikitenko
Copy link
Contributor Author

@ibuziuk
I guess we should test all devfiles from the https://registry.devfile.io/viewer before merging the current PR.
I expect that a workspace should start for all ubi8 and ubi9-based devfiles.

@ibuziuk
Copy link
Contributor

ibuziuk commented Jan 16, 2024

@musienko-maxim could you please follow up with Roman on the verification? Basically, all the devfiles from https://registry.devfile.io/viewer / https://registry.devfile.io/index should work

@musienko-maxim
Copy link

All devsamples have been tested on DogFooding instance. This was commented on here: https://issues.redhat.com/browse/CRW-5634. Short conclusion:
We have a problem for 2 devfiles: WildFly Bootable Jar and Vert.x Java both devfiles use containers that are not ubi8/ubi9-based images. I think this PR is not affected on UBI based samples.

@RomanNikitenko
Copy link
Contributor Author

I'm closing the current PR in favour of #324.
The difference is:

  • the current PR downloads Node.js from the https://nodejs.org
  • PR-324 relies on Node.js that provided by registry.access.redhat.com/ubi9/nodejs-18 + provides libbrotli related files to user's container

It was decided to use PR-324 approach, as it simplifies downstream project support

@RomanNikitenko RomanNikitenko deleted the ubi_9_support branch January 24, 2024 12: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.

5 participants