From 099365ded53d9f038dead0846a85009a5f7d97d3 Mon Sep 17 00:00:00 2001 From: Harshad Reddy Nalla Date: Mon, 15 Jan 2024 16:48:50 +0530 Subject: [PATCH 1/4] Fix: update the typo of ubi9 on trusty ai notebook and lint fixing Signed-off-by: Harshad Reddy Nalla --- .github/workflows/notebooks-digest-updater-upstream.yaml | 2 +- jupyter/datascience/anaconda-python-3.8/environment.yml | 3 ++- jupyter/trustyai/ubi8-python-3.8/Dockerfile | 4 ++-- manifests/base/jupyter-pytorch-notebook-imagestream.yaml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/notebooks-digest-updater-upstream.yaml b/.github/workflows/notebooks-digest-updater-upstream.yaml index fff5e7a88..6f941f502 100644 --- a/.github/workflows/notebooks-digest-updater-upstream.yaml +++ b/.github/workflows/notebooks-digest-updater-upstream.yaml @@ -97,7 +97,7 @@ jobs: echo $val sed -i "s|${val}=.*|${val}=${{ steps.hash-n.outputs.HASH_N }}|" manifests/base/commit.env done - git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }} + git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }} update-n-1-version: needs: [initialize, update-n-version] runs-on: ubuntu-latest diff --git a/jupyter/datascience/anaconda-python-3.8/environment.yml b/jupyter/datascience/anaconda-python-3.8/environment.yml index 027db855a..058d3e1c0 100644 --- a/jupyter/datascience/anaconda-python-3.8/environment.yml +++ b/jupyter/datascience/anaconda-python-3.8/environment.yml @@ -1,3 +1,4 @@ +--- name: /opt/app-root channels: - conda-forge @@ -413,4 +414,4 @@ dependencies: - zipp=3.17.0=pyhd8ed1ab_0 - zlib=1.2.13=hd590300_5 - zstd=1.5.5=hfc55251_0 -prefix: /opt/app-root \ No newline at end of file +prefix: /opt/app-root diff --git a/jupyter/trustyai/ubi8-python-3.8/Dockerfile b/jupyter/trustyai/ubi8-python-3.8/Dockerfile index 7b0bad4e7..d69564170 100644 --- a/jupyter/trustyai/ubi8-python-3.8/Dockerfile +++ b/jupyter/trustyai/ubi8-python-3.8/Dockerfile @@ -3,9 +3,9 @@ FROM ${BASE_IMAGE} LABEL name="odh-notebook-jupyter-trustyai-ubi8-python-3.8" \ summary="Jupyter trustyai notebook image for ODH notebooks" \ - description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI9 for ODH notebooks" \ + description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI8 for ODH notebooks" \ io.k8s.display-name="Jupyter trustyai notebook image for ODH notebooks" \ - io.k8s.description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI9 for ODH notebooks" \ + io.k8s.description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI8 for ODH notebooks" \ authoritative-source-url="https://github.com/opendatahub-io/notebooks" \ io.openshift.build.commit.ref="main" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/trustyai/ubi8-python-3.8" \ diff --git a/manifests/base/jupyter-pytorch-notebook-imagestream.yaml b/manifests/base/jupyter-pytorch-notebook-imagestream.yaml index 659ef55dc..4442d2782 100644 --- a/manifests/base/jupyter-pytorch-notebook-imagestream.yaml +++ b/manifests/base/jupyter-pytorch-notebook-imagestream.yaml @@ -47,7 +47,7 @@ spec: opendatahub.io/notebook-python-dependencies: '[{"name":"PyTorch","version":"1.8"},{"name":"Tensorboard","version":"2.6"},{"name":"Boto3","version":"1.17"},{"name":"Kafka-Python","version":"2.0"},{"name":"Matplotlib","version":"3.4"},{"name":"Numpy","version":"1.19"},{"name":"Pandas","version":"1.2"},{"name":"Scikit-learn","version":"0.24"},{"name":"Scipy","version":"1.6"}]' openshift.io/imported-from: quay.io/opendatahub/notebooks opendatahub.io/image-tag-outdated: 'true' - opendatahub.io/notebook-build-commit: $(odh-pytorch-gpu-notebook-image-commit-n-2) + opendatahub.io/notebook-build-commit: $(odh-pytorch-gpu-notebook-image-commit-n-2) from: kind: DockerImage name: $(odh-pytorch-gpu-notebook-image-n-2) From a643e4b660d33941a7e0471b662fc3c1ad9406ca Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Tue, 23 Jan 2024 14:56:18 +0100 Subject: [PATCH 2/4] [Fix] of typo of the code-server package in the relevant manifest --- manifests/base/code-server-notebook-imagestream.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/base/code-server-notebook-imagestream.yaml b/manifests/base/code-server-notebook-imagestream.yaml index b50ad4982..983e35cc6 100644 --- a/manifests/base/code-server-notebook-imagestream.yaml +++ b/manifests/base/code-server-notebook-imagestream.yaml @@ -17,7 +17,7 @@ spec: # N Version of the image - annotations: opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' - opendatahub.io/notebook-python-dependencies: '[{"name":"code-sever","version":"4.16"}]' + opendatahub.io/notebook-python-dependencies: '[{"name":"code-server","version":"4.16"}]' openshift.io/imported-from: quay.io/opendatahub/workbench-images opendatahub.io/workbench-image-recommended: 'true' opendatahub.io/notebook-build-commit: $(odh-codeserver-notebook-image-commit-n) @@ -30,7 +30,7 @@ spec: # N - 1 Version of the image - annotations: opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' - opendatahub.io/notebook-python-dependencies: '[{"name":"code-sever","version":"4.11"}]' + opendatahub.io/notebook-python-dependencies: '[{"name":"code-server","version":"4.11"}]' openshift.io/imported-from: quay.io/opendatahub/workbench-images opendatahub.io/workbench-image-recommended: 'false' opendatahub.io/notebook-build-commit: $(odh-codeserver-notebook-image-commit-n-1) From 89f54c8cb1e370a7817d0c7e803fdabd24649a34 Mon Sep 17 00:00:00 2001 From: Harshad Reddy Nalla Date: Tue, 23 Jan 2024 15:41:26 -0500 Subject: [PATCH 3/4] Use Titlecase for annotation naming Signed-off-by: Harshad Reddy Nalla --- manifests/base/jupyter-tensorflow-notebook-imagestream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/base/jupyter-tensorflow-notebook-imagestream.yaml b/manifests/base/jupyter-tensorflow-notebook-imagestream.yaml index 50d1ff84f..a95a27900 100644 --- a/manifests/base/jupyter-tensorflow-notebook-imagestream.yaml +++ b/manifests/base/jupyter-tensorflow-notebook-imagestream.yaml @@ -18,7 +18,7 @@ spec: # N Version of the image - annotations: opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.8"},{"name":"Python","version":"v3.9"},{"name":"TensorFlow","version":"2.13"}]' - opendatahub.io/notebook-python-dependencies: '[{"name":"TensorFlow","version":"2.13"},{"name":"Tensorboard","version":"2.13"},{"name":"Boto3","version":"1.28"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.3"},{"name":"Scipy","version":"1.11"},{"name":"Elyra","version":"3.15"},{"name":"PyMongo","version":"4.5"},{"name":"Pyodbc","version":"4.0"}, {"name":"Codeflare-SDK","version":"0.12"}, {"name":"sklearn-onnx","version":"1.15"}, {"name":"Psycopg","version":"3.1"}, {"name":"MySQL Connector/Python","version":"8.0"}]' + opendatahub.io/notebook-python-dependencies: '[{"name":"TensorFlow","version":"2.13"},{"name":"Tensorboard","version":"2.13"},{"name":"Boto3","version":"1.28"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.3"},{"name":"Scipy","version":"1.11"},{"name":"Elyra","version":"3.15"},{"name":"PyMongo","version":"4.5"},{"name":"Pyodbc","version":"4.0"}, {"name":"Codeflare-SDK","version":"0.12"}, {"name":"Sklearn-onnx","version":"1.15"}, {"name":"Psycopg","version":"3.1"}, {"name":"MySQL Connector/Python","version":"8.0"}]' openshift.io/imported-from: quay.io/opendatahub/workbench-images opendatahub.io/workbench-image-recommended: 'true' opendatahub.io/notebook-build-commit: $(odh-tensorflow-gpu-notebook-image-commit-n) From 2fb84db71858dec23058cb614ef053ed078a74a6 Mon Sep 17 00:00:00 2001 From: Harshad Reddy Nalla Date: Wed, 24 Jan 2024 08:28:55 -0500 Subject: [PATCH 4/4] Fix: Use code-server reference in all the files Signed-off-by: Harshad Reddy Nalla Co-authored-by: Jan Stourac --- Makefile | 4 ++-- README.md | 2 +- codeserver/c9s-python-3.9/Dockerfile | 12 +++++----- .../nginx/api/kernels/access.cgi | 2 +- .../c9s-python-3.9/nginx/httpconf/http.conf | 2 +- .../nginx/serverconf/proxy.conf.template | 20 ++++++++-------- .../serverconf/proxy.conf.template_nbprefix | 24 +++++++++---------- codeserver/c9s-python-3.9/run-code-server.sh | 2 +- codeserver/ubi9-python-3.9/Dockerfile | 12 +++++----- .../nginx/api/kernels/access.cgi | 2 +- .../ubi9-python-3.9/nginx/httpconf/http.conf | 2 +- .../nginx/serverconf/proxy.conf.template | 20 ++++++++-------- .../serverconf/proxy.conf.template_nbprefix | 24 +++++++++---------- codeserver/ubi9-python-3.9/run-code-server.sh | 4 ++-- ...orporate-database-cients-on-code-server.md | 22 ++++++++--------- docs/workbenches.md | 6 ++--- .../code-server-notebook-imagestream.yaml | 8 +++---- rstudio/c9s-python-3.9/Dockerfile | 2 +- .../nginx/api/kernels/access.cgi | 2 +- 19 files changed, 86 insertions(+), 86 deletions(-) diff --git a/Makefile b/Makefile index a23c0ed73..b5bcb3459 100644 --- a/Makefile +++ b/Makefile @@ -411,7 +411,7 @@ validate-runtime-image: bin/kubectl .PHONY: validate-codeserver-image validate-codeserver-image: bin/kubectl $(eval NOTEBOOK_NAME := $(subst .,-,$(subst cuda-,,$*))) - $(info # Running tests for $(NOTEBOOK_NAME) Code Server image...) + $(info # Running tests for $(NOTEBOOK_NAME) code-server image...) $(KUBECTL_BIN) wait --for=condition=ready pod codeserver-pod --timeout=300s @required_commands=$(REQUIRED_CODE_SERVER_IMAGE_COMMANDS) ; \ if [[ $$image == "" ]] ; then \ @@ -431,7 +431,7 @@ validate-codeserver-image: bin/kubectl .PHONY: validate-rstudio-image validate-rstudio-image: bin/kubectl $(eval NOTEBOOK_NAME := $(subst .,-,$(subst cuda-,,$*))) - $(info # Running tests for $(NOTEBOOK_NAME) Code Server image...) + $(info # Running tests for $(NOTEBOOK_NAME) code-server image...) $(KUBECTL_BIN) wait --for=condition=ready pod rstudio-pod --timeout=300s @required_commands=$(REQUIRED_R_STUDIO_IMAGE_COMMANDS) ; \ if [[ $$image == "" ]] ; then \ diff --git a/README.md b/README.md index fded02854..f0711b7b1 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ graph TB subgraph Other Notebooks %% Nodes c9s-python-3.9("CentOS Stream Base
(c9s-python-3.9)"); - code-server-c9s-python-3.9("Code Server
(code-server-c9s-python-3.9)"); + code-server-c9s-python-3.9("code-server
(code-server-c9s-python-3.9)"); r-studio-c9s-python-3.9("R Studio
(r-studio-c9s-python-3.9)"); %% Edges diff --git a/codeserver/c9s-python-3.9/Dockerfile b/codeserver/c9s-python-3.9/Dockerfile index d2153d44e..8f26ccc2d 100644 --- a/codeserver/c9s-python-3.9/Dockerfile +++ b/codeserver/c9s-python-3.9/Dockerfile @@ -4,10 +4,10 @@ FROM ${BASE_IMAGE} ARG CODESERVER_VERSION=v4.16.1 LABEL name="odh-notebook-code-server-c9s-python-3.9" \ - summary="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \ - description="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \ - io.k8s.display-name="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \ - io.k8s.description="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \ + summary="code-server image with python 3.9 based on CentOS Stream 9" \ + description="code-server image with python 3.9 based on CentOS Stream 9" \ + io.k8s.display-name="code-server image with python 3.9 based on CentOS Stream 9" \ + io.k8s.description="code-server image with python 3.9 based on CentOS Stream 9" \ authoritative-source-url="https://github.com/opendatahub-io/notebooks" \ io.openshift.build.commit.ref="main" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/codeserver/c9s-python-3.9" \ @@ -17,11 +17,11 @@ USER 0 WORKDIR /opt/app-root/bin -# Install Code Server +# Install code-server RUN yum install -y "https://github.com/coder/code-server/releases/download/${CODESERVER_VERSION}/code-server-${CODESERVER_VERSION/v/}-amd64.rpm" && \ yum -y clean all --enablerepo='*' -# Install NGINX to proxy VSCode and pass probes check +# Install NGINX to proxy code-server and pass probes check ENV NGINX_VERSION=1.22 \ NGINX_SHORT_VER=122 \ NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \ diff --git a/codeserver/c9s-python-3.9/nginx/api/kernels/access.cgi b/codeserver/c9s-python-3.9/nginx/api/kernels/access.cgi index 081ab8c2b..539f447e4 100755 --- a/codeserver/c9s-python-3.9/nginx/api/kernels/access.cgi +++ b/codeserver/c9s-python-3.9/nginx/api/kernels/access.cgi @@ -3,7 +3,7 @@ echo "Status: 200" echo "Content-type: application/json" echo # Query the heartbeat endpoint -HEALTHZ=$(curl -s http://127.0.0.1:8888/vscode/healthz) +HEALTHZ=$(curl -s http://127.0.0.1:8888/codeserver/healthz) # Extract last_activity | remove milliseconds LAST_ACTIVITY_EPOCH=$(echo $HEALTHZ | grep -Po 'lastHeartbeat":\K.*?(?=})' | awk '{ print substr( $0, 1, length($0)-3 ) }') # Convert to ISO8601 date format diff --git a/codeserver/c9s-python-3.9/nginx/httpconf/http.conf b/codeserver/c9s-python-3.9/nginx/httpconf/http.conf index 67690d665..82bdbbfba 100644 --- a/codeserver/c9s-python-3.9/nginx/httpconf/http.conf +++ b/codeserver/c9s-python-3.9/nginx/httpconf/http.conf @@ -10,7 +10,7 @@ map $http_upgrade $connection_upgrade { # Exclude heartbeat from logging for culling purposes map $request $loggable { - ~\/vscode\/healthz 0; + ~\/codeserver\/healthz 0; default 1; } diff --git a/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template b/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template index 4b3c9a1af..a593e2af5 100644 --- a/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template +++ b/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template @@ -1,13 +1,13 @@ ############### -# api calls from probes get to VSCode /healthz endpoint +# api calls from probes get to code-server /healthz endpoint ############### location = /api { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } location /api/ { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } ############### @@ -33,18 +33,18 @@ location /api/kernels/ { ############### ############### -# root and prefix get to VSCode endpoint +# root and prefix get to code-server endpoint ############### location = / { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location = /vscode { - return 302 $custom_scheme://$http_host/vscode/; +location = /codeserver { + return 302 $custom_scheme://$http_host/codeserver/; } -location /vscode/ { - # Standard Code-Server/NGINX configuration +location /codeserver/ { + # Standard code-server/NGINX configuration proxy_pass http://127.0.0.1:8787/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -59,6 +59,6 @@ location /vscode/ { proxy_set_header X-NginX-Proxy true; proxy_redirect off; - access_log /var/log/nginx/vscode.access.log json if=$loggable; + access_log /var/log/nginx/codeserver.access.log json if=$loggable; } ############### diff --git a/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix b/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix index dfe0b9ede..687c3ed72 100644 --- a/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix +++ b/codeserver/c9s-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix @@ -1,13 +1,13 @@ ############### -# api calls from probes get to VSCode /healthz endpoint +# api calls from probes get to code-server /healthz endpoint ############### location = ${NB_PREFIX}/api { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } location ${NB_PREFIX}/api/ { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } ############### @@ -38,26 +38,26 @@ location /api/kernels/ { ############### ############### -# root and prefix get to VSCode endpoint +# root and prefix get to code-server endpoint ############### location = ${NB_PREFIX} { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } location ${NB_PREFIX}/ { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location = /vscode { - return 302 $custom_scheme://$http_host/vscode/; +location = /codeserver { + return 302 $custom_scheme://$http_host/codeserver/; } location = / { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location /vscode/ { - rewrite ^/vscode/(.*)$ /$1 break; +location /codeserver/ { + rewrite ^/codeserver/(.*)$ /$1 break; # Standard RStudio/NGINX configuration proxy_pass http://127.0.0.1:8787; proxy_http_version 1.1; @@ -66,6 +66,6 @@ location /vscode/ { proxy_read_timeout 20d; proxy_set_header X-Forwarded-Proto $custom_scheme; - access_log /var/log/nginx/vscode.access.log json if=$loggable; + access_log /var/log/nginx/codeserver.access.log json if=$loggable; } ############### diff --git a/codeserver/c9s-python-3.9/run-code-server.sh b/codeserver/c9s-python-3.9/run-code-server.sh index 6f69f1d76..902ac6a41 100755 --- a/codeserver/c9s-python-3.9/run-code-server.sh +++ b/codeserver/c9s-python-3.9/run-code-server.sh @@ -14,7 +14,7 @@ if [ ! -f "/opt/app-root/src/.bashrc" ]; then fi # Initilize access logs for culling -echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/vscode.access.log +echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/codeserver.access.log # Start server start_process /usr/bin/code-server \ diff --git a/codeserver/ubi9-python-3.9/Dockerfile b/codeserver/ubi9-python-3.9/Dockerfile index f79812b13..44ec4171e 100644 --- a/codeserver/ubi9-python-3.9/Dockerfile +++ b/codeserver/ubi9-python-3.9/Dockerfile @@ -4,10 +4,10 @@ FROM ${BASE_IMAGE} ARG CODESERVER_VERSION=v4.16.1 LABEL name="odh-notebook-code-server-ubi9-python-3.9" \ - summary="Code Server (VS Code) image with python 3.9 based on UBI 9" \ - description="Code Server (VS Code) image with python 3.9 based on UBI9" \ - io.k8s.display-name="Code Server (VS Code) image with python 3.9 based on UBI9" \ - io.k8s.description="Code Server (VS Code) image with python 3.9 based on UBI9" \ + summary="code-server image with python 3.9 based on UBI 9" \ + description="code-server image with python 3.9 based on UBI9" \ + io.k8s.display-name="code-server image with python 3.9 based on UBI9" \ + io.k8s.description="code-server image with python 3.9 based on UBI9" \ authoritative-source-url="https://github.com/opendatahub-io/notebooks" \ io.openshift.build.commit.ref="main" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/codeserver/ubi9-python-3.9" \ @@ -31,7 +31,7 @@ RUN echo "Installing softwares and packages" && \ # Install usefull OS packages RUN dnf install -y jq git-lfs libsndfile -# Install Code Server +# Install code-server RUN yum install -y "https://github.com/coder/code-server/releases/download/${CODESERVER_VERSION}/code-server-${CODESERVER_VERSION/v/}-amd64.rpm" && \ yum -y clean all --enablerepo='*' @@ -39,7 +39,7 @@ RUN yum install -y "https://github.com/coder/code-server/releases/download/${COD RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \ fix-permissions /opt/app-root -P -# Install NGINX to proxy VSCode and pass probes check +# Install NGINX to proxy code-server and pass probes check ENV NGINX_VERSION=1.22 \ NGINX_SHORT_VER=122 \ NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \ diff --git a/codeserver/ubi9-python-3.9/nginx/api/kernels/access.cgi b/codeserver/ubi9-python-3.9/nginx/api/kernels/access.cgi index 081ab8c2b..539f447e4 100755 --- a/codeserver/ubi9-python-3.9/nginx/api/kernels/access.cgi +++ b/codeserver/ubi9-python-3.9/nginx/api/kernels/access.cgi @@ -3,7 +3,7 @@ echo "Status: 200" echo "Content-type: application/json" echo # Query the heartbeat endpoint -HEALTHZ=$(curl -s http://127.0.0.1:8888/vscode/healthz) +HEALTHZ=$(curl -s http://127.0.0.1:8888/codeserver/healthz) # Extract last_activity | remove milliseconds LAST_ACTIVITY_EPOCH=$(echo $HEALTHZ | grep -Po 'lastHeartbeat":\K.*?(?=})' | awk '{ print substr( $0, 1, length($0)-3 ) }') # Convert to ISO8601 date format diff --git a/codeserver/ubi9-python-3.9/nginx/httpconf/http.conf b/codeserver/ubi9-python-3.9/nginx/httpconf/http.conf index 67690d665..82bdbbfba 100644 --- a/codeserver/ubi9-python-3.9/nginx/httpconf/http.conf +++ b/codeserver/ubi9-python-3.9/nginx/httpconf/http.conf @@ -10,7 +10,7 @@ map $http_upgrade $connection_upgrade { # Exclude heartbeat from logging for culling purposes map $request $loggable { - ~\/vscode\/healthz 0; + ~\/codeserver\/healthz 0; default 1; } diff --git a/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template b/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template index 4b3c9a1af..a593e2af5 100644 --- a/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template +++ b/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template @@ -1,13 +1,13 @@ ############### -# api calls from probes get to VSCode /healthz endpoint +# api calls from probes get to code-server /healthz endpoint ############### location = /api { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } location /api/ { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } ############### @@ -33,18 +33,18 @@ location /api/kernels/ { ############### ############### -# root and prefix get to VSCode endpoint +# root and prefix get to code-server endpoint ############### location = / { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location = /vscode { - return 302 $custom_scheme://$http_host/vscode/; +location = /codeserver { + return 302 $custom_scheme://$http_host/codeserver/; } -location /vscode/ { - # Standard Code-Server/NGINX configuration +location /codeserver/ { + # Standard code-server/NGINX configuration proxy_pass http://127.0.0.1:8787/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -59,6 +59,6 @@ location /vscode/ { proxy_set_header X-NginX-Proxy true; proxy_redirect off; - access_log /var/log/nginx/vscode.access.log json if=$loggable; + access_log /var/log/nginx/codeserver.access.log json if=$loggable; } ############### diff --git a/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix b/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix index dfe0b9ede..687c3ed72 100644 --- a/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix +++ b/codeserver/ubi9-python-3.9/nginx/serverconf/proxy.conf.template_nbprefix @@ -1,13 +1,13 @@ ############### -# api calls from probes get to VSCode /healthz endpoint +# api calls from probes get to code-server /healthz endpoint ############### location = ${NB_PREFIX}/api { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } location ${NB_PREFIX}/api/ { - return 302 /vscode/healthz/; + return 302 /codeserver/healthz/; access_log off; } ############### @@ -38,26 +38,26 @@ location /api/kernels/ { ############### ############### -# root and prefix get to VSCode endpoint +# root and prefix get to code-server endpoint ############### location = ${NB_PREFIX} { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } location ${NB_PREFIX}/ { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location = /vscode { - return 302 $custom_scheme://$http_host/vscode/; +location = /codeserver { + return 302 $custom_scheme://$http_host/codeserver/; } location = / { - return 302 $custom_scheme://$http_host/vscode/; + return 302 $custom_scheme://$http_host/codeserver/; } -location /vscode/ { - rewrite ^/vscode/(.*)$ /$1 break; +location /codeserver/ { + rewrite ^/codeserver/(.*)$ /$1 break; # Standard RStudio/NGINX configuration proxy_pass http://127.0.0.1:8787; proxy_http_version 1.1; @@ -66,6 +66,6 @@ location /vscode/ { proxy_read_timeout 20d; proxy_set_header X-Forwarded-Proto $custom_scheme; - access_log /var/log/nginx/vscode.access.log json if=$loggable; + access_log /var/log/nginx/codeserver.access.log json if=$loggable; } ############### diff --git a/codeserver/ubi9-python-3.9/run-code-server.sh b/codeserver/ubi9-python-3.9/run-code-server.sh index dcb219c6e..ad0384da3 100755 --- a/codeserver/ubi9-python-3.9/run-code-server.sh +++ b/codeserver/ubi9-python-3.9/run-code-server.sh @@ -14,10 +14,10 @@ if [ ! -f "/opt/app-root/src/.bashrc" ]; then fi # Initilize access logs for culling -echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/vscode.access.log +echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/codeserver.access.log # Check if code-server exists -if [ ! -f "/opt/app-root/src/.local/share/code-server" ]; then +if [ ! -f "/opt/app-root/src/.local/share/codeserver" ]; then # Check internet connection if curl -Is http://www.google.com | head -n 1 | grep -q "200 OK"; then diff --git a/docs/Incorporate-database-cients-on-code-server.md b/docs/Incorporate-database-cients-on-code-server.md index 4c6a95ab2..429b8dcd0 100644 --- a/docs/Incorporate-database-cients-on-code-server.md +++ b/docs/Incorporate-database-cients-on-code-server.md @@ -1,36 +1,36 @@ -# Incorporate standard database clients on code server (vs code) +# Incorporate standard database clients on code-server ## Introduction -In the field of Database Management Systems effective interaction is crucial for developers. Incorporating standard database clients directly into your VS Code environment can streamline your workflow, offering a seamless interface for managing databases. This tutorial will walk you through the process of incorporating different Database Management System clients into Code Server, whether through built-in extensions within VS Code or by creating your own custom image. +In the field of Database Management Systems effective interaction is crucial for developers. Incorporating standard database clients directly into your code-server environment can streamline your workflow, offering a seamless interface for managing databases. This tutorial will walk you through the process of incorporating different Database Management System clients into code-server, whether through built-in extensions within code-server or by creating your own custom image. ## 1. Through Extensions ### Installation Guide -1. Open the code server workbench and navigate to the Extensions view. +1. Open the code-server workbench and navigate to the Extensions view. 2. Search for the desired extension using the provided recommended links. -3. Click "Install" to add the extension to your VS Code environment. +3. Click "Install" to add the extension to your code-server environment. ### Recommended extensions list -**MongoDB for VS Code** +**MongoDB for code-server** -MongoDB for VS Code empowers you to connect to MongoDB and Atlas directly from your VS Code environment. Explore databases and collections, inspect schemas, and prototype queries and aggregations effortlessly using the integrated playgrounds. +MongoDB for code-server empowers you to connect to MongoDB and Atlas directly from your code-server environment. Explore databases and collections, inspect schemas, and prototype queries and aggregations effortlessly using the integrated playgrounds. [Link to Extension](https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode) -**MySQL Shell for VS Code** +**MySQL Shell for code-server** -This extension provides a robust MySQL Shell for VS Code, enhancing your capability to manage MySQL databases seamlessly within the VS Code environment. +This extension provides a robust MySQL Shell for code-server, enhancing your capability to manage MySQL databases seamlessly within the code-server environment. [Link to Extension](https://marketplace.visualstudio.com/items?itemName=Oracle.mysql-shell-for-vs-code) **SQL Server (MSSQL)** -Connect to SQL Server effortlessly with this extension, enabling you to perform database tasks directly from your VS Code workspace. +Connect to SQL Server effortlessly with this extension, enabling you to perform database tasks directly from your code-server workspace. [Link to Extension](https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql) @@ -48,7 +48,7 @@ SQLTools simplifies database connections, supporting a wide array of commonly us **Database Client** -This versatile extension serves as a database manager for MySQL/MariaDB, PostgreSQL, SQLite, Redis, and ElasticSearch. It provides a unified interface for managing diverse databases within the VS Code environment. +This versatile extension serves as a database manager for MySQL/MariaDB, PostgreSQL, SQLite, Redis, and ElasticSearch. It provides a unified interface for managing diverse databases within the code-server environment. [Link to Extension](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-database-client2) @@ -157,7 +157,7 @@ Create or open a Data Science Project, create a new workbench, and select the cu **Step 7: Verify Database Clients Installation** -Open a new terminal inside the code server and run the following command to ensure successful installation of database clients: +Open a new terminal inside the code-server and run the following command to ensure successful installation of database clients: `$ yum list installed | grep -E 'mssql|mongo|postgresql'` diff --git a/docs/workbenches.md b/docs/workbenches.md index 5e73a8e7e..faaec084a 100644 --- a/docs/workbenches.md +++ b/docs/workbenches.md @@ -12,7 +12,7 @@ Open Data Hub contains the following workbench images with different variations: | Jupyter Tensorflow | ☑ | ☑ | UBI8/9 | ☑ | ☑ | | Jupyter PyTorch | ☑ | ☑ | UBI8/9 | ☑ | ☑ | | Jupyter TrustyAI | ☑ | ☑ | UBI9 | ☒ | ☒ | -| Code Server | ☑ | ☒ | C9S | ☒ | ☒ | +| code-server | ☑ | ☒ | C9S | ☒ | ☒ | | R Studio | ☑ | ☒ | C9S | ☑ | ☒ | These notebooks are incorporated to be used in conjunction with Open Data Hub, specifically utilizing the ODH Notebook Controller as the launching platform. The table above provides insights into the characteristics of each notebook, including their availability in both ODH and OpenShift AI environments, GPU support, and whether they are offered as runtimes ie without the JupyterLab UI. @@ -65,9 +65,9 @@ Use the TrustyAI notebook image to leverage your data science work with model ex [2023b Packages](https://github.com/opendatahub-io/notebooks/blob/2023b/jupyter/trustyai/ubi9-python-3.9/Pipfile) || [2023a Packages](https://github.com/opendatahub-io/notebooks/blob/2023a/jupyter/trustyai/ubi9-python-3.9/Pipfile) - ## Code Server + ## code-server -Code Server (VS Code) provides a browser-based integrated development environment (IDE) where you can write, edit, and debug code using the familiar interface and features of VS Code. It is particularly useful for collaborating with team members, as everyone can access the same development environment from their own devices. +code-server provides a browser-based integrated development environment (IDE) where you can write, edit, and debug code using the familiar interface and features of code-server. It is particularly useful for collaborating with team members, as everyone can access the same development environment from their own devices. diff --git a/manifests/base/code-server-notebook-imagestream.yaml b/manifests/base/code-server-notebook-imagestream.yaml index 983e35cc6..07569a339 100644 --- a/manifests/base/code-server-notebook-imagestream.yaml +++ b/manifests/base/code-server-notebook-imagestream.yaml @@ -6,8 +6,8 @@ metadata: opendatahub.io/notebook-image: "true" annotations: opendatahub.io/notebook-image-url: "https://github.com/opendatahub-io/notebooks/tree/main/codeserver" - opendatahub.io/notebook-image-name: "Code Server" - opendatahub.io/notebook-image-desc: "Code Server workbench image, allows to run Visual Studio Code (VSCode) on a remote server through the browser." + opendatahub.io/notebook-image-name: "Code server" + opendatahub.io/notebook-image-desc: "Code server workbench allows users to code, build, and collaborate on projects directly from web." opendatahub.io/notebook-image-order: "8" name: code-server-notebook spec: @@ -17,7 +17,7 @@ spec: # N Version of the image - annotations: opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' - opendatahub.io/notebook-python-dependencies: '[{"name":"code-server","version":"4.16"}]' + opendatahub.io/notebook-python-dependencies: '[{"name":"Code-server","version":"4.16"}]' openshift.io/imported-from: quay.io/opendatahub/workbench-images opendatahub.io/workbench-image-recommended: 'true' opendatahub.io/notebook-build-commit: $(odh-codeserver-notebook-image-commit-n) @@ -30,7 +30,7 @@ spec: # N - 1 Version of the image - annotations: opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' - opendatahub.io/notebook-python-dependencies: '[{"name":"code-server","version":"4.11"}]' + opendatahub.io/notebook-python-dependencies: '[{"name":"Code-server","version":"4.11"}]' openshift.io/imported-from: quay.io/opendatahub/workbench-images opendatahub.io/workbench-image-recommended: 'false' opendatahub.io/notebook-build-commit: $(odh-codeserver-notebook-image-commit-n-1) diff --git a/rstudio/c9s-python-3.9/Dockerfile b/rstudio/c9s-python-3.9/Dockerfile index 3667ba8e1..a61a22c75 100644 --- a/rstudio/c9s-python-3.9/Dockerfile +++ b/rstudio/c9s-python-3.9/Dockerfile @@ -3,7 +3,7 @@ FROM ${BASE_IMAGE} LABEL name="odh-notebook-rstudio-c9s-python-3.9" \ summary="R Studio image with python 3.9 based on CentOS Stream 9" \ - description="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \ + description="code-server image with python 3.9 based on CentOS Stream 9" \ io.k8s.display-name="R Studio image with python 3.9 based on CentOS Stream 9" \ io.k8s.description="R Studio image with python 3.9 based on CentOS Stream 9" \ authoritative-source-url="https://github.com/opendatahub-io/notebooks" \ diff --git a/rstudio/c9s-python-3.9/nginx/api/kernels/access.cgi b/rstudio/c9s-python-3.9/nginx/api/kernels/access.cgi index 35a70e03e..79f37cda7 100755 --- a/rstudio/c9s-python-3.9/nginx/api/kernels/access.cgi +++ b/rstudio/c9s-python-3.9/nginx/api/kernels/access.cgi @@ -7,7 +7,7 @@ LOG_TAIL=$(tail -n 1 /var/log/nginx/rstudio.access.log) # Extract last_activity field LAST_ACTIVITY=$(echo $LOG_TAIL | grep -Po 'last_activity":"\K.*?(?=")') if [[ $(date -d $LAST_ACTIVITY"+10 minutes" +%s) -lt $(date +%s) ]]; then - # No activity for the past 10mn, we consider VSCode idle and begin to send idle response + # No activity for the past 10mn, we consider code-server idle and begin to send idle response # As logs always write "busy", we first substitute with "idle" in the answer sed s/busy/idle/ <<<"$LOG_TAIL" else