Skip to content

feat: move remote desktop to nginx #250

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
merged 16 commits into from
May 18, 2021
Merged

feat: move remote desktop to nginx #250

merged 16 commits into from
May 18, 2021

Conversation

blairdrummond
Copy link
Contributor

@blairdrummond blairdrummond commented May 4, 2021

Description

The PR moves remote-desktop off the jupyter-proxy it was previously on, and onto an nginx-based proxy, significantly reducing lag (previous implementation was pretty intolerable). It is not in perfect state yet, but ready for review and iteration. Some notable things:

  • The .desktop files are not being synced to the desktop. I think this is carry-over from issues around how $HOME gets over-written by the PVC mount. We need to make some configuration stuff happen at runtime.
  • I have not implemented the /tools or /proxy endpoints that jupyter or the old remote-desktop used to run services. This might be considered a regression, or a security feature (@brendangadd ?), especially since apps can still be tested within a local browser.
  • The image is using an older version of noVNC because the original was internationalized within @Ito-Matsuda 's fork. We should migrate that upstream and move to the newer noVNC. (And we should uninstall jupyter-proxy-desktop entirely).

Relevant: #194 , #190, #208, #251

Tests / Quality Checks

Automated Testing/build and deployment

  • Does the image pass CI successfully (build, pass vulnerability scan, and pass automated test suite)?
  • If new features are added (new image, new binary, etc), have new automated tests been added to cover these?
  • If new features are added that require in-cluster testing (e.g. a new feature that needs to interact with kubernetes), have you added the auto-deploy tag to the PR before pushing in order to build and push the image to ACR so you can test it in cluster as a custom image?

JupyterLab extensions

  • Are all extensions "enabled" (jupyter labextension list from inside the notebook)?

VS Code tests

  • Does VS Code open?
  • Can you install extensions?

Code review

  • Have you added the auto-deploy tag to your PR before your most recent push to this repo? This causes CI to build the image and push to our ACR, letting reviewers access the built image without having to create it themselves
  • Have you chosen a reviewer, attached them as a reviewer to this PR, and messaged them with the SHA-pinned image name for the final image to test (e.g. k8scc01covidacr.azurecr.io/machine-learning-notebook-cpu:746d058e2f37e004da5ca483d121bfb9e0545f2b)?

@blairdrummond blairdrummond requested a review from Jose-Matsuda May 4, 2021 22:03
@blairdrummond blairdrummond changed the title feat: move remote desktop to nginx Draft: feat: move remote desktop to nginx May 4, 2021
@blairdrummond blairdrummond changed the title Draft: feat: move remote desktop to nginx feat: move remote desktop to nginx May 5, 2021
Copy link
Contributor

@Jose-Matsuda Jose-Matsuda left a comment

Choose a reason for hiding this comment

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

LGTM. As for the upstreaming of translations to noVNC I can get that done easily. I originally had Nancy translate the text a while ago but I'm sending it to Wendy as well just to check.

@brendangadd
Copy link
Contributor

brendangadd commented May 5, 2021

From sprint planning:

  • Put reffed issue in a project column, and attach this with closing key word
  • Keep immediate scope the same (for this issue/PR)
  • For gaps w.r.t. existing deployment, make one issue each
  • Check in with @chritter on use of "ports"
  • Decommission old desktop repo when all gaps are addressed (future item)

@blairdrummond

@JessicaBarh
Copy link
Contributor

I ran into this build error as well in #248 for remote-desktop. This change seemed to solve the error. It's resolved in my PR so we might need to coordinate which gets merged in first

@blairdrummond
Copy link
Contributor Author

Closes #251

@blairdrummond
Copy link
Contributor Author

@JessicaBarh Let's merge yours first, then I'll rebase ontop of that. Please lmk when yours is merged in

@blairdrummond blairdrummond requested a review from ca-scribner May 7, 2021 17:06
@blairdrummond blairdrummond added the auto-deploy Trigger manual CI steps for this PR label May 7, 2021
@blairdrummond blairdrummond requested a review from ca-scribner May 14, 2021 23:01
Blair Drummond and others added 7 commits May 17, 2021 12:23
* Move injection of NB_PREFIX in containers from TrackedContainer object to container() fixture and pull default NB_PREFIX value from environment (similar to IMAGE_NAME).
* Add debug printing to test_server_alive to more clearly show which tests pass/fail
* Add dev/imagename endpoint in Makefile to make it easier to run local versions of notebooks.  Also handles NB_PREFIX explicitly and prompts users with the correct local link to log into their server
* Add NB_PREFIX to the test endpoint of Makefile to allow for testing with/without NB_PREFIX
Add clickable link to dev output
Suggested edits to test suite to use NB_PREFIX
Copy link
Contributor

@ca-scribner ca-scribner left a comment

Choose a reason for hiding this comment

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

lgtm

conftest.py Outdated
@@ -18,7 +18,7 @@
def http_client():
"""Requests session with retries and backoff."""
s = requests.Session()
retries = Retry(total=6, backoff_factor=1)
retries = Retry(total=6, backoff_factor=5)
Copy link
Contributor

Choose a reason for hiding this comment

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

Achieves the same cumulative time, but the wait between the first several backoffs is shorter so things that don't need the extra time will be a little quicker.

Suggested change
retries = Retry(total=6, backoff_factor=5)
retries = Retry(total=9, backoff_factor=1)

@ca-scribner ca-scribner merged commit b026072 into master May 18, 2021
@blairdrummond blairdrummond deleted the vnc-nginx branch May 18, 2021 18:17
JaeggerJose pushed a commit to wycc/cgu-kubeflow-containers that referenced this pull request Dec 30, 2024
Also:
* Add `dev` endpoint to Makefile and NB_PREFIX to tests
* Increase connection retries in test suite to give vnc time to start
* Add clickable link to `make/dev` output

Co-authored-by: Andrew Scribner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-deploy Trigger manual CI steps for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants