opendatahub-io / notebooks

Notebook images for ODH
Apache License 2.0
15 stars 51 forks source link

feat(RHOAIENG-8298): Replace `spawn-fcgi` with `supervisord` in code-server and r-studio server #587

Closed atheo89 closed 2 weeks ago

atheo89 commented 2 weeks ago

Related to: https://issues.redhat.com/browse/RHOAIENG-8298

Description

How Has This Been Tested?

  1. Import the code-server and Rstudio server to ODH/RHOAI as custom notebooks Or do the same as Jiri did on this comment
  2. Spin up each of them
  3. Ensure that they work properly

Images:

code-server:

RStudio-server:

Merge criteria:

jiridanek commented 2 weeks ago
$ podman run -p 8787:8787 --rm -it ghcr.io/atheo89/notebooks/workbench-images:codeserver-ubi9-python-3.9-replace-spawn-fcgi_2ca3a1f7eaa3782efa9cb1412973e62bb74e3061

http://localhost:8787 shows the code-server, seems to work fine, and logs say

2024-06-25 11:45:29,077 INFO supervisord started with pid 4
Debug: Extension 'ms-python.python-2024.2.1' copied to runtime directory.
Debug: Extension 'ms-toolsai.jupyter-2023.9.100' copied to runtime directory.
Debug: Extension 'ms-toolsai.jupyter-keymap-1.1.2-universal' copied to runtime directory.
Debug: Extension 'ms-toolsai.jupyter-renderers-1.0.18-universal' copied to runtime directory.
Debug: Extension 'ms-toolsai.vscode-jupyter-cell-tags-0.1.8-universal' copied to runtime directory.
Debug: Extension 'ms-toolsai.vscode-jupyter-slideshow-0.1.5-universal' copied to runtime directory.
Running command: /usr/bin/code-server --bind-addr 0.0.0.0:8787 --disable-telemetry --auth none --disable-update-check /opt/app-root/src
2024-06-25 11:45:30,080 INFO spawned: 'fcgiwrap' with pid 44
[2024-06-25T11:45:30.620Z] info  code-server 4.22.0 e5d145fdf32e82be2a0f8de9a3b05f65b13052b6
[2024-06-25T11:45:30.621Z] info  Using user-data-dir /opt/app-root/src/.local/share/code-server
[2024-06-25T11:45:30.633Z] info  Using config file /opt/app-root/src/.config/code-server/config.yaml
[2024-06-25T11:45:30.633Z] info  HTTP server listening on http://0.0.0.0:8787/
[2024-06-25T11:45:30.633Z] info    - Authentication is disabled
[2024-06-25T11:45:30.633Z] info    - Not serving HTTPS
[2024-06-25T11:45:30.633Z] info  Session server listening on /opt/app-root/src/.local/share/code-server/code-server-ipc.sock
[11:45:31] 

[11:45:31] Extension host agent started.
2024-06-25 11:45:31,082 INFO success: fcgiwrap entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[11:45:31] Started initializing default profile extensions in extensions installation folder. file:///opt/app-root/src/.local/share/code-server/extensions
[11:45:31] Completed initializing default profile extensions in extensions installation folder. file:///opt/app-root/src/.local/share/code-server/extensions
File not found: /usr/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/lib/code-server/lib/vscode/out/vsda.js
[11:45:52] [10.0.2.100][78a5a2fb][ManagementConnection] New connection established.
[11:45:52] [10.0.2.100][8b86ac30][ExtensionHostConnection] New connection established.
[11:45:53] [10.0.2.100][8b86ac30][ExtensionHostConnection] <94> Launched Extension Host Process.
[11:45:56] [10.0.2.100][78a5a2fb][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[11:45:56] [10.0.2.100][8b86ac30][ExtensionHostConnection] <94> Extension Host Process exited with code: 0, signal: null.
File not found: /usr/lib/code-server/lib/vscode/out/vsda_bg.wasm
File not found: /usr/lib/code-server/lib/vscode/out/vsda.js
[11:45:57] [10.0.2.100][2da47f50][ManagementConnection] New connection established.
[11:45:57] [10.0.2.100][16704729][ExtensionHostConnection] New connection established.
[11:45:57] [10.0.2.100][16704729][ExtensionHostConnection] <135> Launched Extension Host Process.

So this seems to be fine.

@atheo89 do you plan to implement (in a subsequent PR) the other change suggested on RHOAIENG-8298? That is, running nginx under supervisord as well?

atheo89 commented 2 weeks ago

@atheo89 do you plan to implement (in a subsequent PR) the other change suggested on RHOAIENG-8298? That is, running nginx under supervisord as well?

Yeah, since this change will be an extreme make over. For now we will just replace the fcgi

jiridanek commented 2 weeks ago

The PRs on https://issues.redhat.com/browse/RHOAIENG-8298 are linked wrong, you are missing https://github.com/red-hat-data-services/notebooks/pull/278 link there.

Anyways, having the rhel rstudio in the downstream fork only is really silly. We can put it here, there's nothing to fear, only fear itself! And fear is the mind killer. And https://mike-bland.com/the-rainbow-of-death; this person always has such cheerful aphorisms.

atheo89 commented 2 weeks ago

The PRs on https://issues.redhat.com/browse/RHOAIENG-8298 are linked wrong, you are missing https://github.com/red-hat-data-services/notebooks/pull/278 link there.

Hmmm I don't get it? What link is wrong?

jiridanek commented 2 weeks ago

The PRs on https://issues.redhat.com/browse/RHOAIENG-8298 are linked wrong, you are missing red-hat-data-services#278 link there.

Hmmm I don't get it? What link is wrong?

image

the second one ;P

atheo89 commented 2 weeks ago

the second one ;P

Oops, thanks!

adelton commented 2 weeks ago

LGTM.

Hmm, immediatelly after this, there is

openshift-ci (bot) assigned adelton

I have no idea what being assigned on a PR mean. Is there any documentation around that? Can we stop the bot from doing this?

jiridanek commented 2 weeks ago

Immediately after that, there is

The pull request process is described here

This seems to be how prow works. No idea why it puts reviewers as GitHub Assignees and not Reviewers, but that's how it rolls.

adelton commented 2 weeks ago

This seems to be how prow works. No idea why it puts reviewers as GitHub Assignees and not Reviewers, but that's how it rolls.

Thanks for the pointer to prow. I've now filed https://github.com/kubernetes-sigs/prow/issues/199 to get some insight.

harshad16 commented 2 weeks ago

/lgtm /approve

thanks for the work

openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adelton, harshad16, jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/opendatahub-io/notebooks/blob/main/OWNERS)~~ [harshad16] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jiridanek commented 2 weeks ago

/test codeserver-notebook-e2e-tests

jiridanek commented 2 weeks ago

/retitle feat(RHOAIENG-8298): Replace spawn-fcgi with supervisord in code-server and r-studio server