diff --git a/.circleci/config.yml b/.circleci/config.yml index ae9cdeca5..98e7fe8bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -229,12 +229,6 @@ jobs: hubploy deploy --timeout 30m eecs hub ${CIRCLE_BRANCH} no_output_timeout: 30m - - run: - name: Deploy gradebook - command: | - hubploy deploy --timeout 30m gradebook hub ${CIRCLE_BRANCH} - no_output_timeout: 30m - - run: name: Deploy highschool hub command: | @@ -277,12 +271,6 @@ jobs: hubploy deploy --timeout 30m r hub ${CIRCLE_BRANCH} no_output_timeout: 30m - - run: - name: Deploy shiny - command: | - hubploy deploy --timeout 30m shiny hub ${CIRCLE_BRANCH} - no_output_timeout: 30m - - run: name: Deploy workshop command: | @@ -394,15 +382,6 @@ workflows: ignore: - staging - prod - - hubploy/build-image: - deployment: shiny - name: shiny image build - # Filters can only be per-job? wtf - filters: - branches: - ignore: - - staging - - prod deploy: jobs: @@ -504,15 +483,6 @@ workflows: branches: only: - staging - - hubploy/build-image: - deployment: shiny - name: shiny image build - push: true - # Filters can only be per-job? wtf - filters: - branches: - only: - - staging # Build images only during the staging deploy. All merges # to prod need to go via staging, so prod should *never* # use images not built for staging. By enforcing this at the @@ -530,7 +500,6 @@ workflows: - julia hub image build # - logodev image build - publichealth image build - - shiny image build filters: branches: diff --git a/deployments/gradebook/hubploy.yaml b/deployments/gradebook/hubploy.yaml index 4891ccd7d..0ba28d8cd 100644 --- a/deployments/gradebook/hubploy.yaml +++ b/deployments/gradebook/hubploy.yaml @@ -1,12 +1,6 @@ images: images: - - name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/shiny-image - path: ../shiny/image - registry: - provider: gcloud - gcloud: - project: ucb-datahub-2018 - service_key: gcr-key.json + - image_name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/shiny-image:PLACEHOLDER cluster: provider: gcloud diff --git a/deployments/shiny/hubploy.yaml b/deployments/shiny/hubploy.yaml index 9b00330b6..0ba28d8cd 100644 --- a/deployments/shiny/hubploy.yaml +++ b/deployments/shiny/hubploy.yaml @@ -1,12 +1,6 @@ images: images: - - name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/shiny-image - path: image - registry: - provider: gcloud - gcloud: - project: ucb-datahub-2018 - service_key: gcr-key.json + - image_name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/shiny-image:PLACEHOLDER cluster: provider: gcloud diff --git a/deployments/shiny/image/Dockerfile b/deployments/shiny/image/Dockerfile deleted file mode 100644 index 9d26e61eb..000000000 --- a/deployments/shiny/image/Dockerfile +++ /dev/null @@ -1,97 +0,0 @@ -FROM rocker/geospatial:4.4.1 - -ENV NB_USER rstudio -ENV NB_UID 1000 -ENV CONDA_DIR /srv/conda - -# Set ENV for all programs... -ENV PATH ${CONDA_DIR}/bin:$PATH - -# Pick up rocker's default TZ -ENV TZ=Etc/UTC - -# And set ENV for R! It doesn't read from the environment... -RUN echo "TZ=${TZ}" >> /usr/local/lib/R/etc/Renviron.site -RUN echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron.site - -# Add PATH to /etc/profile so it gets picked up by the terminal -RUN echo "PATH=${PATH}" >> /etc/profile -RUN echo "export PATH" >> /etc/profile - -ENV HOME /home/${NB_USER} - -WORKDIR ${HOME} - -# Install packages needed by notebook-as-pdf -# nodejs for installing notebook / jupyterhub from source -# libarchive-dev for https://github.com/berkeley-dsep-infra/datahub/issues/1997 -# texlive-xetex pulls in texlive-latex-extra > texlive-latex-recommended -# We use Ubuntu's TeX because rocker's doesn't have most packages by default, -# and we don't want them to be downloaded on demand by students. -RUN apt-get update > /dev/null && \ - apt-get install --yes \ - less \ - libx11-xcb1 \ - libxtst6 \ - libxrandr2 \ - libasound2 \ - libpangocairo-1.0-0 \ - libatk1.0-0 \ - libatk-bridge2.0-0 \ - libgtk-3-0 \ - libnss3 \ - libxss1 \ - fonts-symbola \ - gdebi-core \ - tini \ - pandoc \ - texlive-xetex \ - texlive-latex-extra \ - texlive-fonts-recommended \ - # provides FandolSong-Regular.otf for issue #2714 - texlive-lang-chinese \ - texlive-plain-generic \ - nodejs npm > /dev/null && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -ENV SHINY_SERVER_URL https://download3.rstudio.org/ubuntu-18.04/x86_64/shiny-server-1.5.22.1017-amd64.deb -RUN curl --silent --location --fail ${SHINY_SERVER_URL} > /tmp/shiny-server.deb && \ - apt install --no-install-recommends --yes /tmp/shiny-server.deb && \ - rm /tmp/shiny-server.deb - -# google-chrome is for pagedown; chromium doesn't work nicely with it (snap?) -RUN wget --quiet -O /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ - apt-get update > /dev/null && \ - apt -y install /tmp/google-chrome-stable_current_amd64.deb > /dev/null && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -COPY install-mambaforge.bash /tmp/install-mambaforge.bash -RUN /tmp/install-mambaforge.bash - -USER ${NB_USER} - -COPY environment.yml /tmp/environment.yml -RUN mamba env update -p ${CONDA_DIR} -f /tmp/environment.yml && \ - mamba clean -afy - -# Install IRKernel -RUN R --quiet -e "install.packages('IRkernel', quiet = TRUE)" && \ - R --quiet -e "IRkernel::installspec(prefix='${CONDA_DIR}')" - -COPY class-libs.R /tmp/class-libs.R - -COPY r-packages/2024-spring-gradebook.r /tmp/r-packages/ -RUN r /tmp/r-packages/2024-spring-gradebook.r - -COPY r-packages/2023-spring-stat-20.r /tmp/r-packages/ -RUN r /tmp/r-packages/2023-spring-stat-20.r - -COPY r-packages/2023-fall-stat-135.r /tmp/r-packages/ -RUN r /tmp/r-packages/2023-fall-stat-135.r - -# Configure locking behavior -COPY file-locks /etc/rstudio/file-locks - -ENTRYPOINT ["tini", "--"] diff --git a/deployments/shiny/image/class-libs.R b/deployments/shiny/image/class-libs.R deleted file mode 100644 index 1c9343537..000000000 --- a/deployments/shiny/image/class-libs.R +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env Rscript - -class_libs_install_version <- function(class_name, class_libs) { - print(paste("Installing packages for", class_name)) - for (i in seq(1, length(class_libs), 2)) { - installed_packages <- rownames(installed.packages()) - package_name = class_libs[i] - version = class_libs[i+1] - # Only install packages if they haven't already been installed! - # devtools doesn't do that by default - if (!package_name %in% installed_packages) { - print(paste("Installing", package_name, version)) - devtools::install_version(package_name, version, quiet=TRUE) - } else { - # FIXME: This ignores version incompatibilities :'( - print(paste("Not installing", package_name, " as it is already installed")) - } - } - print(paste("Done installing packages for", class_name)) -} diff --git a/deployments/shiny/image/environment.yml b/deployments/shiny/image/environment.yml deleted file mode 100644 index 88a784784..000000000 --- a/deployments/shiny/image/environment.yml +++ /dev/null @@ -1,22 +0,0 @@ -dependencies: -- appmode==0.9.0 -- ipywidgets==8.1.2 -- jupyter-archive==3.4.0 -- jupyter-resource-usage==1.0.1 -- jupyter-server-proxy==4.2.0 -- jupyter-rsession-proxy==2.2.0 -- jupyter-syncthing-proxy==1.0.3 -- jupyterhub==4.1.6 -- jupyterlab==4.0.11 -- nbgitpuller==1.2.1 -- notebook==7.0.7 -# bug w/notebook and traitlets: https://github.com/jupyter/notebook/issues/7048 -- traitlets==5.9.0 -- syncthing==1.27.3 -- pip: - - git-credential-helpers==0.2 - - jupyter-shiny-proxy==1.1 - - otter-grader==2.2.7 - # Measure popularity of different packages in our hubs - # https://discourse.jupyter.org/t/request-for-implementation-instrument-libraries-actively-used-by-users-on-a-jupyterhub/7994?u=yuvipanda - #- git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling diff --git a/deployments/shiny/image/file-locks b/deployments/shiny/image/file-locks deleted file mode 100644 index 7b1a3fcf4..000000000 --- a/deployments/shiny/image/file-locks +++ /dev/null @@ -1,13 +0,0 @@ -# https://docs.rstudio.com/ide/server-pro/load_balancing/configuration.html#file-locking - -# rocker sets this to advisory, but this might be causing NFS issues. -# lets set it to the default (default: linkbased) -lock-type=linkbased - -# we'll also reduce the frequency by 1/3 -refresh-rate=60 -timeout-interval=90 - -# log attempts -# enable-logging=1 -# log-file=/tmp/rstudio-locking.log diff --git a/deployments/shiny/image/infra-requirements.txt b/deployments/shiny/image/infra-requirements.txt deleted file mode 100644 index 0fb0bd930..000000000 --- a/deployments/shiny/image/infra-requirements.txt +++ /dev/null @@ -1,29 +0,0 @@ -# WARNING: Original source at scripts/infra-packages/requirements.txt -# PLEASE DO NOT EDIT ELSEWHERE -# After editing scripts/infra-packages/requirements.txt, please run -# scripts/infra-packages/sync.bash. - -# This file pins versions of notebook related python packages we want -# across all hubs. This makes sure we don't need to upgrade them -# everwhere one by one. - -# FIXME: Freeze this to get exact versions of all dependencies -notebook==7.0.7 -jupyterlab==4.0.11 -nbgitpuller==1.2.1 -jupyter-resource-usage==1.0.1 -# Matches version in images/hub/Dockerfile -jupyterhub==4.1.6 -appmode==0.8.0 -ipywidgets==8.0.7 -jupyter-tree-download==1.0.1 -git-credential-helpers==0.2 -# Measure popularity of different packages in our hubs -# https://discourse.jupyter.org/t/request-for-implementation-instrument-libraries-actively-used-by-users-on-a-jupyterhub/7994?u=yuvipanda -git+https://github.com/shaneknapp/python-popularity-contest.git@add-error-handling -# RISE is useful for presentations - see https://github.com/berkeley-dsep-infra/datahub/issues/2527 -RISE==5.7.1 -# syncthing for dropbox-like functionality -jupyter-syncthing-proxy==1.0.3 -# jupyter archival tool for easy user downloads -jupyter-archive==3.4.0 diff --git a/deployments/shiny/image/install-mambaforge.bash b/deployments/shiny/image/install-mambaforge.bash deleted file mode 100755 index 38c5cefcd..000000000 --- a/deployments/shiny/image/install-mambaforge.bash +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# This downloads and installs a pinned version of mambaforge -set -ex - -cd $(dirname $0) -MAMBAFORGE_VERSION='23.1.0-1' - -URL="https://github.com/conda-forge/miniforge/releases/download/${MAMBAFORGE_VERSION}/Mambaforge-${MAMBAFORGE_VERSION}-Linux-x86_64.sh" -INSTALLER_PATH=/tmp/mambaforge-installer.sh - -wget --quiet $URL -O ${INSTALLER_PATH} -chmod +x ${INSTALLER_PATH} - -bash ${INSTALLER_PATH} -b -p ${CONDA_DIR} -export PATH="${CONDA_DIR}/bin:$PATH" - -# Do not attempt to auto update conda or dependencies -conda config --system --set auto_update_conda false -conda config --system --set show_channel_urls true - -# empty conda history file, -# which seems to result in some effective pinning of packages in the initial env, -# which we don't intend. -# this file must not be *removed*, however -echo '' > ${CONDA_DIR}/conda-meta/history - -# Clean things out! -conda clean --all -f -y - -# Remove the big installer so we don't increase docker image size too much -rm ${INSTALLER_PATH} - -# Remove the pip cache created as part of installing mambaforge -rm -rf /root/.cache - -chown -R $NB_USER:$NB_USER ${CONDA_DIR} - -conda list -n root diff --git a/deployments/shiny/image/r-packages/2023-fall-stat-135.r b/deployments/shiny/image/r-packages/2023-fall-stat-135.r deleted file mode 100644 index ccfd659c2..000000000 --- a/deployments/shiny/image/r-packages/2023-fall-stat-135.r +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env Rscript - -# https://github.com/berkeley-dsep-infra/datahub/issues/4907 - -source("/tmp/class-libs.R") - -class_name = "Stat 135 Fall 2023" -class_libs = c( - "mosaicData", "0.20.3", - "learnr", "0.11.1" -) -class_libs_install_version(class_name, class_libs) diff --git a/deployments/shiny/image/r-packages/2023-spring-stat-20.r b/deployments/shiny/image/r-packages/2023-spring-stat-20.r deleted file mode 100644 index b48bab49c..000000000 --- a/deployments/shiny/image/r-packages/2023-spring-stat-20.r +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env Rscript - -source("/tmp/class-libs.R") - -# This might be used more broadly than just Stat 20. -class_name = "2023 Spring Stat 20" - -class_libs = c( - "DT", "0.26", - "shinyFiles", "0.9.3", - "shinyTime", "1.0.3" -) - -class_libs_install_version(class_name, class_libs) - -print(paste("Done installing packages for",class_name)) diff --git a/deployments/shiny/image/r-packages/2024-spring-gradebook.r b/deployments/shiny/image/r-packages/2024-spring-gradebook.r deleted file mode 100644 index 6984f872e..000000000 --- a/deployments/shiny/image/r-packages/2024-spring-gradebook.r +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env Rscript - -source("/tmp/class-libs.R") - -# This might be used more broadly than just Stat 20. -class_name = "2024 Spring Gradebook" - -class_libs = c( - "DT", "0.32", - "Hmisc", "5.1-1", - "purrr", "1.0.2", - "shinyFiles", "0.9.3", - "shinyTime", "1.0.3", - "shinyWidgets", "0.8.1", - "shinydashboard", "0.7.2" -) - -class_libs_install_version(class_name, class_libs) - -print(paste("Done installing packages for",class_name))