diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 117b0812b0736e7fb7a6c1ca40524bc7dcaa1528..3925a4c5125f9f2c8ac0b1f2d1be23a96148872b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,8 @@ services: build: + except: + - main stage: build needs: [] before_script: @@ -29,6 +31,8 @@ build: .deploy: + except: + - main stage: deploy needs: - "build" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 8c4d0abfe8e91a7ebaae830ec50ea42ac958c6b7..0000000000000000000000000000000000000000 --- a/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:4.2.3--1.5.21.1006 -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:1.5.21.1006 -# FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:4.2.3 -FROM registry-gitlab.pasteur.fr/hub/rshiny-k8s:latest - -# install additional dependencies, comment the block if you don't have one -RUN apt-get update \ - && apt-get install -y \ - wget \ - && rm -rf /var/lib/apt/lists/* - -# Copy your dependencies, destination filename must be "packages_to_install.csv" -COPY ./my_packages_to_install.csv /opt/scripts/packages_to_install.csv - -# Install R packages -RUN Rscript /opt/scripts/install_r_packages.R - -# grant shiny to created bookmark state directory in this directory -RUN chown shiny:shiny /var/lib/shiny-server - -# Copy you shiny app -COPY ./example_proj /srv/shiny-server diff --git a/example_proj/app.R b/example_proj/app.R deleted file mode 100644 index f2adac6463d32fef4666b19497a4a686fddd9a01..0000000000000000000000000000000000000000 --- a/example_proj/app.R +++ /dev/null @@ -1,83 +0,0 @@ -# Name : app.R -# Folder : ~/rshiny-k8s/example_proj -# Date : 05/04/23 -# Aim : Simple example of app developped in RShiny. -# Authors : From Shiny Examples - Modify by Elodie C. et Bryan B. - -# Load packages ------------------------------------------------------------------- -library(shiny) -library(shinythemes) -library(ggplot2) - -### Try to fix error "unable to open connection to X11" -options(bitmapType='cairo') - -# Show installed and loaded packages -sessionInfo() - -# UI part ------------------------------------------------------------------------- -# Define UI for app that draws a histogram ---- -ui <- fluidPage( - - # App title ---- - titlePanel("Hello Shiny in docker image!"), - - # Sidebar layout with input and output definitions ---- - sidebarLayout( - - # Sidebar panel for inputs ---- - sidebarPanel( - - # Input: Slider for the number of bins ---- - sliderInput(inputId = "bins", - label = "Number of bins:", - min = 1, - max = 50, - value = 30) - - ), - - # Main panel for displaying outputs ---- - mainPanel( - - # Output: Histogram ---- - plotOutput(outputId = "distPlot"), - # Output: SessionInfo fecth from server - htmlOutput("mySessionInfo") - - ) - ) -) -# Server part ------------------------------------------------------------------------- -# Define server logic required to draw a histogram ---- -server <- function(input, output) { - - # Histogram of the Old Faithful Geyser Data ---- - # with requested number of bins - # This expression that generates a histogram is wrapped in a call - # to renderPlot to indicate that: - # - # 1. It is "reactive" and therefore should be automatically - # re-executed when inputs (input$bins) change - # 2. Its output type is a plot - output$distPlot <- renderPlot({ - - x <- faithful$waiting - bins <- seq(min(x), max(x), length.out = input$bins + 1) - - hist(x, breaks = bins, col = "#75AADB", border = "white", - xlab = "Waiting time to next eruption (in mins)", - main = "Histogram of waiting times") - - }) - output$mySessionInfo <- renderPrint({ - - capture.output(sessionInfo()) - capture.output(capabilities()) - - }) - -} - -# Run Shiny app ---------------------------------------------------------------------- -shinyApp(ui = ui, server = server) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml deleted file mode 100644 index 84602730dcc34e4c706fe660f731f1baeb0250f2..0000000000000000000000000000000000000000 --- a/k8s/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rshiny-deployment - labels: - app: rshiny-app -spec: - selector: - matchLabels: - app: rshiny-app - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - template: - metadata: - labels: - app: rshiny-app - spec: - containers: - - name: rshiny-pod - image: registry-gitlab.pasteur.fr/hub/rshiny-k8s-example/main/example:latest - securityContext: - runAsGroup: 999 - runAsUser: 999 - ports: - - name: http - containerPort: 3838 - protocol: TCP - resources: - requests: - memory: "256Mi" - cpu: "500m" - limits: - memory: "512Mi" - cpu: "500m" - imagePullSecrets: - - name: registry-gitlab ---- \ No newline at end of file diff --git a/k8s/hpa.yaml b/k8s/hpa.yaml deleted file mode 100644 index 543bf3b6edfc31eee60d91e502fc998340b2fe70..0000000000000000000000000000000000000000 --- a/k8s/hpa.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: rkubshiny-hpa - labels: - app: rshiny-hpa -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: rshiny-deployment - minReplicas: 1 - maxReplicas: 4 - metrics: - - type: Resource - resource: - name: cpu - targetAverageUtilization: 80 - - type: Resource - resource: - name: memory - targetAverageUtilization: 80 \ No newline at end of file diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml deleted file mode 100644 index ba547d16bbf794f5db0c81774fc223e2f75dddd2..0000000000000000000000000000000000000000 --- a/k8s/ingress.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - nginx.ingress.kubernetes.io/affinity: cookie - nginx.ingress.kubernetes.io/proxy-body-size: 256m - name: rshiny-ingress -spec: - ingressClassName: internal - rules: - - host: rshiny-example.dev.pasteur.cloud - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: rshiny-srv - port: - number: 8080 ---- \ No newline at end of file diff --git a/k8s/service.yaml b/k8s/service.yaml deleted file mode 100644 index 5cf03d95444c1eb0f51eb913c468e3c2db2365bc..0000000000000000000000000000000000000000 --- a/k8s/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: rshiny-srv -spec: - type: ClusterIP - ports: - - name: http - port: 8080 - targetPort: 3838 - selector: - app: rshiny-app ---- \ No newline at end of file diff --git a/my_packages_to_install.csv b/my_packages_to_install.csv deleted file mode 100644 index de7515ba99afba7e16aaed43bf5621e0e2fc0e00..0000000000000000000000000000000000000000 --- a/my_packages_to_install.csv +++ /dev/null @@ -1,5 +0,0 @@ -Package_name;Comments -shinythemes;cran package -ggplot2;cran package -limma;bioconductor package -tidyverse/tibble; github package \ No newline at end of file