diff --git a/CODEOWNERS b/CODEOWNERS index 046bbd506..d7176ccc1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -7,8 +7,6 @@ /be-scala-play/ @oalyman /be-typescript-express/ @sino92 /docker-plain/ @michaelsauter -/ds-jupyter-lab/ @gerardcl @hugowschneider -/ds-rshiny/ @gerardcl /ds-streamlit/ @sklingel /e2e-cypress/ @cschweikert @garcanam @roicarrera /e2e-spock-geb/ @metmajer @garcanam @roicarrera diff --git a/docs/modules/quickstarters/nav.adoc b/docs/modules/quickstarters/nav.adoc index 93979b226..8e865ec4c 100644 --- a/docs/modules/quickstarters/nav.adoc +++ b/docs/modules/quickstarters/nav.adoc @@ -9,8 +9,6 @@ ** xref:quickstarters:be-scala-play.adoc[BE Scala/Play] ** xref:quickstarters:fe-angular.adoc[FE Angular] ** xref:quickstarters:fe-ionic.adoc[FE Ionic] -** xref:quickstarters:ds-jupyter-lab.adoc[Data Science Jupyter Lab] -** xref:quickstarters:ds-rshiny.adoc[Data Science RShiny app] ** xref:quickstarters:ds-streamlit.adoc[Data Science Streamlit app] ** xref:quickstarters:e2e-cypress.adoc[Cypress E2E testing] ** xref:quickstarters:e2e-etl-python.adoc[ETL Python E2E testing] diff --git a/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc b/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc deleted file mode 100644 index b9ed8c901..000000000 --- a/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc +++ /dev/null @@ -1,81 +0,0 @@ -= Data Science Jupyter Lab - -== Purpose of this quickstarter - -Provision a shared Jupyter Lab within OpenShift for rapid prototyping of data science applications using OpenShift OAuth. - -== What files / architecture is generated? - ----- -. -├── Jenkinsfile -├── .pre-commit-config.yaml -├── docker -│ ├── Dockerfile -│ ├── jupyter_lab_config.json -│ ├── requirements.txt -│ └── run.sh -├── metadata.yml - Component metadata -└── release-manager.yml - Configuration file for the Release Manager ----- - -== Frameworks used - -* https://docs.python.org/3.11[Python 3.11] -* https://jupyterlab.readthedocs.io/en/stable/[JupyterLab] - -== Usage - how do you start after you provisioned this quickstarter - -The quickstarter sets up two pods in OpenShift. The `ds-jupyter-lab` instance is routed through the https://github.com/openshift/oauth-proxy/[OpenShift OAuth proxy] instance. - -The directory `/opt/app-root/src/work` is created where code can be organized using installed git. + -Please consider mounting a persistent volume claim for this path. + -New python requirements are specified using the `requirements.txt`. + - -=== Setting up independent environments/kernels === - -One can setup specific and independent IPython kernels based on specific Python virtual environments: - -* Open a new terminal session in your Jupyter Lab, then: - ----- -cd -python -m venv -. /bin/activate -pip install ipykernel pip --upgrade -python -m ipykernel install --user --name= -jupyter kernelspec list # this is for validating installation ----- - -Now on a notebook you can select that new kernel by clicking on the name you see on the top right where you see the dot status. - -=== Metadata - -The following are typical xref:quickstarters:metadata.adoc[metadata] values that can be used for components based on this quickstarter: -Note that the xref:jenkins-shared-library:labelling.adoc[OpenShift resources will be labeled] based on this metadata. - -```yaml -name: jupyterlab -description: "JupyterLab is a web-based interactive development environment for Jupyter notebooks, code, and data." -supplier: https://jupyter.org/ -version: 3.0.14 -type: ods-service -``` - -== How this quickstarter is built through jenkins - -The build pipeline is defined in the `Jenkinsfile` in the project root. The main stages of the pipeline are: - -. Start OpenShift build -. Deploy image to OpenShift - -include::partials$secret-scanning-with-gitleaks.adoc - -== Builder agent used - -https://github.com/opendevstack/ods-core/tree/master/jenkins/agent-base[jenkins-agent-base] - -== Known limitations - -Consider if sufficient computing resources can be provided by the OpenShift cluster. + -You might require installing NodeJS if requiring specific JupyterLab extensions (nodejs >=12.0.0). diff --git a/docs/modules/quickstarters/pages/ds-rshiny.adoc b/docs/modules/quickstarters/pages/ds-rshiny.adoc deleted file mode 100644 index 0c4ae503d..000000000 --- a/docs/modules/quickstarters/pages/ds-rshiny.adoc +++ /dev/null @@ -1,59 +0,0 @@ -= Data Science R Shiny Application - -== Purpose of this quickstarter - -Provisions a R Shiny application within OpenShift using OpenShift OAuth. - -== What files / architecture is generated? - ----- -. -├── Jenkinsfile - This file contains Jenkins build configuration settings -├── .pre-commit-config.yaml -├── docker - This folder contains Docker configuration settings and main R Shiny app -│ ├── Dockerfile -│ └── app.R -├── metadata.yml - Component metadata -└── release-manager.yml - Configuration file for the Release Manager ----- - -== Frameworks used - -* https://www.tutorialspoint.com/r/index.htm[R] -* https://shiny.rstudio.com/tutorial[Shiny] - -== Usage - how do you start after you provisioned this quickstarter - -The quickstarter sets up two pods in OpenShift. The `ds-rshiny` application is routed through the https://github.com/openshift/oauth-proxy/[OpenShift OAuth proxy] instance. - -=== Metadata - -The following are typical xref:quickstarters:metadata.adoc[metadata] values that can be used for components based on this quickstarter: -Note that the xref:jenkins-shared-library:labelling.adoc[OpenShift resources will be labeled] based on this metadata. - -```yaml -name: shiny -description: "Shiny is an R package that makes it easy to build interactive web apps straight from R." -supplier: https://www.rstudio.com/ -version: 1.6.0 -type: ods-service -runtime: r -runtimeVersion: 4.1.1 -``` - -== How this quickstarter is built through jenkins - -The build pipeline is defined in the `Jenkinsfile` in the project root. The main stages of the pipeline are: - -. Start OpenShift build -. Deploy image to OpenShift - -include::partials$secret-scanning-with-gitleaks.adoc - -== Builder agent used - -https://github.com/opendevstack/ods-core/tree/master/jenkins/agent-base[jenkins-agent-base] - -== Known limitations - -N/A diff --git a/ds-jupyter-lab/Jenkinsfile b/ds-jupyter-lab/Jenkinsfile deleted file mode 100644 index edb7fc0f7..000000000 --- a/ds-jupyter-lab/Jenkinsfile +++ /dev/null @@ -1,32 +0,0 @@ -def odsNamespace = '' -def odsGitRef = '' -def odsImageTag = '' -def sharedLibraryRef = '' -def agentImageTag = '' - -node { - odsNamespace = env.ODS_NAMESPACE ?: 'ods' - odsGitRef = env.ODS_GIT_REF ?: 'master' - odsImageTag = env.ODS_IMAGE_TAG ?: 'latest' - sharedLibraryRef = env.SHARED_LIBRARY_REF ?: odsImageTag - agentImageTag = env.AGENT_IMAGE_TAG ?: odsImageTag -} - -library("ods-jenkins-shared-library@${sharedLibraryRef}") - -odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-base:${agentImageTag}", -) { context -> - - odsQuickstarterStageCopyFiles(context) - - stage('Setup OpenShift resources') { - sh """sh common/scripts/create-component-with-oauth.sh \ - --project ${context.projectId} \ - --component ${context.componentId} \ - --non-interactive""" - } - - odsQuickstarterStageRenderJenkinsfile(context) - -} diff --git a/ds-jupyter-lab/Jenkinsfile.template b/ds-jupyter-lab/Jenkinsfile.template deleted file mode 100644 index 3e4d9cbc7..000000000 --- a/ds-jupyter-lab/Jenkinsfile.template +++ /dev/null @@ -1,25 +0,0 @@ -// See https://www.opendevstack.org/ods-documentation/ for usage and customization. - -@Library('ods-jenkins-shared-library@@shared_library_ref@') _ - -odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-base:@agent_image_tag@', - branchToEnvironmentMapping: [ - 'master': 'dev', - // 'release/': 'test' - ] -) { context -> - - odsComponentStageBuildOpenShiftImage( - context, [ - resourceName: "${context.componentId}", - dockerDir: "docker_jupyterlab", - buildArgs: [ - nexusHostWithBasicAuth: context.nexusHostWithBasicAuth, - nexusHostWithoutScheme: context.nexusHostWithoutScheme - ]]) - odsComponentStageBuildOpenShiftImage( - context, [resourceName: "${context.componentId}-oauth", dockerDir: "docker_oauth"]) - - def deploymentInfo = odsComponentStageRolloutOpenShiftDeployment(context) -} diff --git a/ds-jupyter-lab/README.md b/ds-jupyter-lab/README.md deleted file mode 100644 index 42b19b504..000000000 --- a/ds-jupyter-lab/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Jupyter Lab (ds-jupyter-lab) - -Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-quickstarters/latest/index.html) - -Please update documentation in the [antora page directory](https://github.com/opendevstack/ods-quickstarters/tree/master/docs/modules/ROOT/pages) - -Tested thru [automated tests](../tests/ds-jupyter-lab) diff --git a/ds-jupyter-lab/files/.pre-commit-config.yaml b/ds-jupyter-lab/files/.pre-commit-config.yaml deleted file mode 100644 index f1f8f73f5..000000000 --- a/ds-jupyter-lab/files/.pre-commit-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -repos: - - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.4 - hooks: - - id: gitleaks diff --git a/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile b/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile deleted file mode 100644 index 328455c56..000000000 --- a/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -FROM registry.access.redhat.com/ubi9/python-311 - -ARG nexusHostWithBasicAuth -ARG nexusHostWithoutScheme - -WORKDIR /opt/app-root/src - -ENV PYTHONPATH=$PYTHONPATH:/opt/app-root/src \ - NPM_CONFIG_PREFIX=/opt/app-root \ - NODE_OPTIONS=--max-old-space-size=4096 - -COPY requirements.txt /opt/app-root/src - -USER 1001 -# From load pip install for caching docker build layers -RUN if [ ! -z ${nexusHostWithBasicAuth} ]; \ - then pip install -i ${nexusHostWithBasicAuth}/repository/pypi-all/simple --trusted-host ${nexusHostWithoutScheme} --upgrade pip && pip install -i ${nexusHostWithBasicAuth}/repository/pypi-all/simple --trusted-host ${nexusHostWithoutScheme} -r requirements.txt; \ - else pip install --upgrade pip && pip install -r requirements.txt; \ - fi && \ - pip check - -USER root - -COPY run.sh /opt/app-root/run.sh -COPY jupyter_lab_config.json /opt/app-root/src/.jupyter/jupyter_lab_config.json - -RUN chown -R 1001 /opt/app-root/src && \ - chgrp -R 0 /opt/app-root/src && \ - chmod -R g=u /opt/app-root/src && \ - chmod +x /opt/app-root/run.sh && \ - chmod g+w /etc/passwd && \ - chmod -R g+w /opt/app-root/share && \ - chmod -R g+w /opt/app-root/src - -USER 1001 - -EXPOSE 8080 - -ENTRYPOINT [ "/opt/app-root/run.sh" ] - -CMD [ "jupyter", "lab" ] diff --git a/ds-jupyter-lab/files/docker_jupyterlab/jupyter_lab_config.json b/ds-jupyter-lab/files/docker_jupyterlab/jupyter_lab_config.json deleted file mode 100644 index 412ca714f..000000000 --- a/ds-jupyter-lab/files/docker_jupyterlab/jupyter_lab_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ServerApp": { - "token": "", - "ip": "0.0.0.0", - "root_dir": "/opt/app-root/src/work", - "port": 8080, - "open_browser": false - } -} diff --git a/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt b/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt deleted file mode 100644 index 02e871b91..000000000 --- a/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -jupyter==1.0.0 -ipywidgets==8.0.6 -jupyterlab==4.0.11 diff --git a/ds-jupyter-lab/files/docker_jupyterlab/run.sh b/ds-jupyter-lab/files/docker_jupyterlab/run.sh deleted file mode 100644 index c45f60e6c..000000000 --- a/ds-jupyter-lab/files/docker_jupyterlab/run.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -e - -if ! whoami &> /dev/null; then - if [ -w /etc/passwd ]; then - echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd - fi -fi - -# create work directory -mkdir -p /opt/app-root/src/work - -# set the home directories to a folder with read/write access -export XDG_DATA_HOME=/opt/app-root/src -export HOME=/opt/app-root/src - -# link jupyter configs -export JUPYTER_CONFIG_DIR=/opt/app-root/src/.jupyter -export JUPYTER_PATH=/opt/app-root/src/work/.jupyter -export JUPYTER_RUNTIME_DIR=/opt/app-root/src/work/.jupyter/runtime - -exec $@ diff --git a/ds-jupyter-lab/files/docker_oauth/Dockerfile b/ds-jupyter-lab/files/docker_oauth/Dockerfile deleted file mode 100644 index fb57f9567..000000000 --- a/ds-jupyter-lab/files/docker_oauth/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM registry.redhat.io/openshift4/ose-oauth-proxy:latest diff --git a/ds-jupyter-lab/files/metadata.yml b/ds-jupyter-lab/files/metadata.yml deleted file mode 100644 index 3178bf83b..000000000 --- a/ds-jupyter-lab/files/metadata.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: Jupyter Lab -description: "The Jupyter Lab is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. Technologies: JupyterLab 3, Python 3.9" -supplier: https://jupyter.org -version: 4.x -type: ods-service diff --git a/ds-jupyter-lab/files/release-manager.yml b/ds-jupyter-lab/files/release-manager.yml deleted file mode 100644 index 23d65c7ef..000000000 --- a/ds-jupyter-lab/files/release-manager.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -dependencies: [] diff --git a/ds-jupyter-lab/testdata/golden/jenkins-build-stages.json b/ds-jupyter-lab/testdata/golden/jenkins-build-stages.json deleted file mode 100644 index 441b776ea..000000000 --- a/ds-jupyter-lab/testdata/golden/jenkins-build-stages.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "stage": "odsPipeline start", - "status": "SUCCESS" - }, - { - "stage": "Build OpenShift Image", - "status": "SUCCESS" - }, - { - "stage": "Deploy to OpenShift", - "status": "SUCCESS" - }, - { - "stage": "odsPipeline finished", - "status": "SUCCESS" - } -] diff --git a/ds-jupyter-lab/testdata/golden/jenkins-provision-stages.json b/ds-jupyter-lab/testdata/golden/jenkins-provision-stages.json deleted file mode 100644 index 04cb8c2c6..000000000 --- a/ds-jupyter-lab/testdata/golden/jenkins-provision-stages.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "stage": "Checkout quickstarter", - "status": "SUCCESS" - }, - { - "stage": "Initialize output directory", - "status": "SUCCESS" - }, - { - "stage": "Copy files from quickstarter", - "status": "SUCCESS" - }, - { - "stage": "Setup OpenShift resources", - "status": "SUCCESS" - }, - { - "stage": "Create Jenkinsfile", - "status": "SUCCESS" - }, - { - "stage": "Push to remote", - "status": "SUCCESS" - } -] diff --git a/ds-jupyter-lab/testdata/steps.yml b/ds-jupyter-lab/testdata/steps.yml deleted file mode 100644 index 533a93731..000000000 --- a/ds-jupyter-lab/testdata/steps.yml +++ /dev/null @@ -1,22 +0,0 @@ -componentID: jupyter -steps: -- type: provision - provisionParams: - verify: - jenkinsStages: golden/jenkins-provision-stages.json -- type: build - buildParams: - verify: - jenkinsStages: golden/jenkins-build-stages.json - openShiftResources: - imageTags: - - name: "{{.ComponentID}}" - tag: latest - imageStreams: - - "{{.ComponentID}}" - deploymentConfigs: - - "{{.ComponentID}}" - - "{{.ComponentID}}-auth-proxy" - services: - - "{{.ComponentID}}" - - "{{.ComponentID}}-auth-proxy" diff --git a/ds-rshiny/Jenkinsfile b/ds-rshiny/Jenkinsfile deleted file mode 100644 index 1a9449545..000000000 --- a/ds-rshiny/Jenkinsfile +++ /dev/null @@ -1,31 +0,0 @@ -def odsNamespace = '' -def odsGitRef = '' -def odsImageTag = '' -def sharedLibraryRef = '' -def agentImageTag = '' - -node { - odsNamespace = env.ODS_NAMESPACE ?: 'ods' - odsGitRef = env.ODS_GIT_REF ?: 'master' - odsImageTag = env.ODS_IMAGE_TAG ?: 'latest' - sharedLibraryRef = env.SHARED_LIBRARY_REF ?: odsImageTag - agentImageTag = env.AGENT_IMAGE_TAG ?: odsImageTag -} - -library("ods-jenkins-shared-library@${sharedLibraryRef}") - -odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-base:${agentImageTag}", -) { context -> - - odsQuickstarterStageCopyFiles(context) - - stage('Setup OpenShift resources') { - sh """sh common/scripts/create-component-with-oauth.sh \ - --project ${context.projectId} \ - --component ${context.componentId} \ - --non-interactive""" - } - - odsQuickstarterStageRenderJenkinsfile(context) -} diff --git a/ds-rshiny/Jenkinsfile.template b/ds-rshiny/Jenkinsfile.template deleted file mode 100644 index 9c6a26627..000000000 --- a/ds-rshiny/Jenkinsfile.template +++ /dev/null @@ -1,20 +0,0 @@ -// See https://www.opendevstack.org/ods-documentation/ for usage and customization. - -@Library('ods-jenkins-shared-library@@shared_library_ref@') _ - -odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-base:@agent_image_tag@', - openshiftBuildTimeout: 30, - branchToEnvironmentMapping: [ - 'master': 'dev', - // 'release/': 'test' - ] -) { context -> - - odsComponentStageBuildOpenShiftImage( - context, [resourceName: "${context.componentId}", dockerDir: "docker_rshiny"]) - odsComponentStageBuildOpenShiftImage( - context, [resourceName: "${context.componentId}-oauth", dockerDir: "docker_oauth"]) - - def deploymentInfo = odsComponentStageRolloutOpenShiftDeployment(context) -} diff --git a/ds-rshiny/README.md b/ds-rshiny/README.md deleted file mode 100644 index 4449321e4..000000000 --- a/ds-rshiny/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# R-Shiny Notebook (ds-rshiny) - -Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-quickstarters/latest/index.html) - -Please update documentation in the [antora page directory](https://github.com/opendevstack/ods-quickstarters/tree/master/docs/modules/ROOT/pages) - -Tested thru [automated tests](../tests/ds-rshiny) diff --git a/ds-rshiny/files/.pre-commit-config.yaml b/ds-rshiny/files/.pre-commit-config.yaml deleted file mode 100644 index f1f8f73f5..000000000 --- a/ds-rshiny/files/.pre-commit-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -repos: - - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.4 - hooks: - - id: gitleaks diff --git a/ds-rshiny/files/README.md b/ds-rshiny/files/README.md deleted file mode 100644 index b76548276..000000000 --- a/ds-rshiny/files/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Rshiny Application - -Documentation is located in our [official documentation](https://www.opendevstack.org/ods-documentation/ods-quickstarters/latest/index.html) - -Please update documentation in the [antora page directory](https://github.com/opendevstack/ods-quickstarters/tree/master/docs/modules/ROOT/pages) diff --git a/ds-rshiny/files/docker_oauth/Dockerfile b/ds-rshiny/files/docker_oauth/Dockerfile deleted file mode 100644 index fb57f9567..000000000 --- a/ds-rshiny/files/docker_oauth/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM registry.redhat.io/openshift4/ose-oauth-proxy:latest diff --git a/ds-rshiny/files/docker_rshiny/Dockerfile b/ds-rshiny/files/docker_rshiny/Dockerfile deleted file mode 100644 index 083ca5440..000000000 --- a/ds-rshiny/files/docker_rshiny/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -FROM ubuntu:20.04 - -ENV DEBIAN_FRONTEND noninteractive -ENV INITRD No -ENV LANGUAGE en -ENV LC_ALL en_US.UTF-8 -ENV LANG en_US.UTF-8 - -# Dockerize container and setup required OS dependencies -RUN echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/02apt-speedup && \ - echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' > /etc/apt/apt.conf.d/00no-cache && \ - /usr/bin/dpkg-divert --local --rename --add /usr/bin/ischroot && \ - rm -f /usr/bin/ischroot && \ - ln -s /bin/true /usr/bin/ischroot && \ - /usr/bin/dpkg-divert --local --rename --add /sbin/initctl && \ - rm -f /sbin/initctl && \ - ln -s /bin/true /sbin/initctl && \ - # Setup locales - apt-get update && \ - apt-get install -yqq locales apt-transport-https ca-certificates gnupg && \ - /usr/sbin/locale-gen en_US.UTF-8 && \ - /usr/sbin/update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 && \ - # Add CRAN apt repo / focal (Ubuntu 20.04) R/4.0 - if [ -n "$HTTP_PROXY" ]; then \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options http-proxy=$HTTP_PROXY --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9; \ - else \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9; \ - fi && \ - echo 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' > /etc/apt/sources.list.d/cran.list && \ - # Install dependencies - apt-get update && \ - apt-get install -yqq \ - gdebi-core \ - libcairo2-dev \ - libcurl4-gnutls-dev \ - libxt-dev \ - pandoc \ - pandoc-citeproc \ - libssl-dev && \ - apt-get install -yqq \ - r-base \ - r-base-core \ - r-recommended \ - r-base-dev && \ - # Cleanup apt - apt-get autoremove --purge && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/archives - -# Install Shiny -RUN R -e 'install.packages(c("shiny", "rmarkdown"), repos="https://cloud.r-project.org/")' - -# Install app dependencies and fail if any missing -RUN R -e 'packages = c("shinythemes", "ggplot2", "reshape2"); \ - install.packages(packages, repos="https://cloud.r-project.org/"); \ - package.check <- lapply(packages, FUN = function(p) { if(!require(p, character.only = TRUE)) { stop("package not found!") } })' - -# Setup app -RUN mkdir /app -WORKDIR /app -ADD app.R /app -EXPOSE 8080 - -# Run app -CMD ["R", "--quiet", "--no-save", "--no-restore", "-e", "setwd('/app'); shiny::runApp(appDir='.', port=8080, host='0.0.0.0', quiet=F, display.mode='normal')"] diff --git a/ds-rshiny/files/docker_rshiny/app.R b/ds-rshiny/files/docker_rshiny/app.R deleted file mode 100644 index 268c8c897..000000000 --- a/ds-rshiny/files/docker_rshiny/app.R +++ /dev/null @@ -1,48 +0,0 @@ -library(shiny) -library(shinythemes) -library(ggplot2) -library(reshape2) - -# ================================================= UI PART ======================================================= -ui <- fluidPage( - - # Application title - titlePanel("Hello Shiny!"), - - # Sidebar with a slider input for number of observations - sidebarLayout( - sidebarPanel( - sliderInput("obs", - "Number of observations:", - min = 1, - max = 1000, - value = 500) - ), - - # Show a plot of the generated distribution - mainPanel( - plotOutput("distPlot") - ) - ) -) - -# ====================================== SERVER PART ======================================================= -server <- function(input, output) { - - # Expression that generates a plot of the distribution. The expression - # is wrapped in a call to renderPlot to indicate that: - # - # 1) It is "reactive" and therefore should be automatically - # re-executed when inputs change - # 2) Its output type is a plot - # - output$distPlot <- renderPlot({ - - # generate an rnorm distribution and plot it - dist <- rnorm(input$obs) - hist(dist) - }) - -} - -shinyApp(ui, server) diff --git a/ds-rshiny/files/metadata.yml b/ds-rshiny/files/metadata.yml deleted file mode 100644 index 985942246..000000000 --- a/ds-rshiny/files/metadata.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: R Shiny -description: "Shiny is an R package that makes it easy to build interactive web apps straight from R. Technologies: R Shiny unpinned" -supplier: https://shiny.rstudio.com -version: 4.x -type: ods-service diff --git a/ds-rshiny/files/release-manager.yml b/ds-rshiny/files/release-manager.yml deleted file mode 100644 index 23d65c7ef..000000000 --- a/ds-rshiny/files/release-manager.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -dependencies: [] diff --git a/ds-rshiny/testdata/golden/jenkins-build-stages.json b/ds-rshiny/testdata/golden/jenkins-build-stages.json deleted file mode 100644 index 441b776ea..000000000 --- a/ds-rshiny/testdata/golden/jenkins-build-stages.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "stage": "odsPipeline start", - "status": "SUCCESS" - }, - { - "stage": "Build OpenShift Image", - "status": "SUCCESS" - }, - { - "stage": "Deploy to OpenShift", - "status": "SUCCESS" - }, - { - "stage": "odsPipeline finished", - "status": "SUCCESS" - } -] diff --git a/ds-rshiny/testdata/golden/jenkins-provision-stages.json b/ds-rshiny/testdata/golden/jenkins-provision-stages.json deleted file mode 100644 index 04cb8c2c6..000000000 --- a/ds-rshiny/testdata/golden/jenkins-provision-stages.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "stage": "Checkout quickstarter", - "status": "SUCCESS" - }, - { - "stage": "Initialize output directory", - "status": "SUCCESS" - }, - { - "stage": "Copy files from quickstarter", - "status": "SUCCESS" - }, - { - "stage": "Setup OpenShift resources", - "status": "SUCCESS" - }, - { - "stage": "Create Jenkinsfile", - "status": "SUCCESS" - }, - { - "stage": "Push to remote", - "status": "SUCCESS" - } -] diff --git a/ds-rshiny/testdata/steps.yml b/ds-rshiny/testdata/steps.yml deleted file mode 100644 index a46c5ff13..000000000 --- a/ds-rshiny/testdata/steps.yml +++ /dev/null @@ -1,22 +0,0 @@ -componentID: rshiny -steps: -- type: provision - provisionParams: - verify: - jenkinsStages: golden/jenkins-provision-stages.json -- type: build - buildParams: - verify: - jenkinsStages: golden/jenkins-build-stages.json - openShiftResources: - imageTags: - - name: "{{.ComponentID}}" - tag: latest - imageStreams: - - "{{.ComponentID}}" - deploymentConfigs: - - "{{.ComponentID}}" - - "{{.ComponentID}}-auth-proxy" - services: - - "{{.ComponentID}}" - - "{{.ComponentID}}-auth-proxy"