CSCfi/pebbles

View on GitHub
devel_dataset.yaml

Summary

Maintainability
Test Coverage
---
data:
  #############################################################################
  ### Default system setup
  # admin
  - !User
    id: u-1
    ext_id: admin@example.org
    password: admin
    is_admin: True

  # worker
  - !User
    id: u-2
    ext_id: worker@pebbles
    password: worker
    is_admin: True

  # default workspace
  - !Workspace
    id: ws-0
    name: System.default
    cluster: local_kubernetes

  # associate admin with default workspace
  - !WorkspaceMembership
    workspace_id: ws-0
    user_id: u-1
    is_owner: True
    is_manager: True

  #############################################################################
  ### ApplicationTemplates

  # example Jupyter template + application in public workspace
  - !ApplicationTemplate
    id: et-jupyter-1
    name: Example
    description: Jupyter in local k8s
    application_type: jupyter
    is_enabled: True
    attribute_limits:
      - name: maximum_lifetime
        min: 0
        max: 43200
      - name: memory_gib
        min: 0
        max: 3600
    base_config:
      args: jupyter {{jupyter_interface}} --NotebookApp.token='' --NotebookApp.base_url='/notebooks/{{session_id}}' --NotebookApp.allow_origin='*'
      environment_vars: ''
      image: docker-registry.rahti.csc.fi/notebooks-public-images/k8s-datascience-notebook:latest
      labels:
        - analytics
        - python
        - jupyter
      maximum_lifetime: 3600
      memory_gib: 0.25
      port: 8888
      volume_mount_path: /home/jovyan

  # second template, Jupyter machine learning
  - !ApplicationTemplate
    id: et-jupyter-2
    name: Example ML
    description: Jupyter ML in local k8s using notebook-images autodownload feature
    application_type: jupyter
    is_enabled: True
    attribute_limits:
      - name: maximum_lifetime
        min: 0
        max: 43200
      - name: memory_gib
        min: 0
        max: 8
    base_config:
      args: jupyter {{jupyter_interface}} --NotebookApp.token='' --NotebookApp.base_url='/notebooks/{{session_id}}' --NotebookApp.allow_origin='*'
      environment_vars: ''
      image: docker-registry.rahti.csc.fi/notebooks-public-images/k8s-machine-learning-notebook:latest
      labels:
        - machine learning
        - python
        - jupyter
      maximum_lifetime: 3600
      memory_gib: 0.25
      port: 8888
      show_password: true
      volume_mount_path: /home/jovyan

  # Template for local RStudio
  - !ApplicationTemplate
    id: et-rstudio-1
    name: RStudio
    description: RStudio in local k8s
    application_type: rstudio
    is_enabled: True
    attribute_limits:
      - name: maximum_lifetime
        min: 0
        max: 43200
      - name: memory_gib
        min: 0
        max: 8
    base_config:
      environment_vars: 'DISABLE_AUTH=true'
      image: docker.io/rocker/rstudio:latest
      labels:
        - data analytics
      maximum_lifetime: 3600
      memory_gib: 0.25
      port: 8787
      volume_mount_path: /home/rstudio
      proxy_rewrite: nginx

  #############################################################################
  ### Applications

  - !Application
    id: e-1
    name: Jupyter minimal notebook
    description: Standard minimal Jupyter notebook
    template_id: et-jupyter-1
    workspace_id: ws-0
    labels:
      - data analytics
      - python
      - jupyter
    maximum_lifetime: 3600
    is_enabled: True
    application_type: jupyter
    attribute_limits:
      - name: maximum_lifetime
        min: 0
        max: 43200
      - name: memory_gib
        min: 0
        max: 8
    base_config:
      args: jupyter {{jupyter_interface}} --NotebookApp.token='' --NotebookApp.base_url='/notebooks/{{session_id}}' --NotebookApp.allow_origin='*'
      environment_vars: ''
      image: docker.io/jupyter/minimal-notebook:latest
      labels:
        - analytics
        - python
        - jupyter
      maximum_lifetime: 3600
      memory_gib: 0.25
      port: 8888
      volume_mount_path: /home/jovyan
    config:
      jupyter_interface: lab
      download_method: http-get
      download_url: https://www.csc.fi/

  - !Application
    id: e-2
    name: RStudio
    description: RStudio
    template_id: et-rstudio-1
    workspace_id: ws-0
    labels:
      - data analytics
    maximum_lifetime: 3600
    is_enabled: True
    application_type: rstudio
    attribute_limits:
      - name: maximum_lifetime
        min: 0
        max: 43200
      - name: memory_gib
        min: 0
        max: 8
    base_config:
      environment_vars: 'DISABLE_AUTH=true'
      image: docker.io/rocker/rstudio:latest
      labels:
        - data analytics
      maximum_lifetime: 3600
      memory_gib: 0.25
      port: 8787
      volume_mount_path: /home/rstudio
      proxy_rewrite: nginx
    config:
      download_method: none


  #############################################################################
  ### Normal user with no extra workspace memberships
  - !User
    id: u-user-1
    ext_id: user-1@example.org
    password: user-1

  - !WorkspaceMembership
    workspace_id: ws-0
    user_id: u-user-1

  #############################################################################
  ### User owner-1 with one Workspace and one manager user

  - !User
    id: u-owner-1
    ext_id: owner-1@example.org
    password: owner-1
    workspace_quota: 2

  - !WorkspaceMembership
    workspace_id: ws-0
    user_id: u-owner-1

  - !Workspace
    id: ws-1
    name: Workspace 1
    cluster: local_kubernetes

  - !WorkspaceMembership
    workspace_id: ws-1
    user_id: u-owner-1
    is_owner: True
    is_manager: True

  - !User
    id: u-manager-1
    ext_id: manager-1@example.org
    password: manager-1

  - !WorkspaceMembership
    workspace_id: ws-1
    user_id: u-manager-1
    is_owner: False
    is_manager: True


  #############################################################################
  ### User owner-2 with no Workspaces, just quota

  - !User
    id: u-owner-2
    ext_id: owner-2@example.org
    password: owner-2
    workspace_quota: 2

  - !WorkspaceMembership
    workspace_id: ws-0
    user_id: u-owner-2