-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
200 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
hello-data-deployment/docker-compose/default_data_domain/default-data-domain-jupyterhub.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# | ||
# Copyright © 2024, Kanton Bern | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# * Neither the name of the <organization> nor the | ||
# names of its contributors may be used to endorse or promote products | ||
# derived from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
|
||
version: "3.7" | ||
|
||
services: | ||
jupyterhub-default-data-domain: | ||
build: | ||
context: ./base/jupyterhub | ||
dockerfile: Dockerfile.jupyterhub | ||
args: | ||
JUPYTERHUB_VERSION: latest | ||
restart: always | ||
image: hellodata-jupyterhub-notebook-default-data-domain | ||
container_name: jupyterhub-default-data-domain | ||
networks: | ||
- hello-data-network | ||
volumes: | ||
# The JupyterHub configuration file | ||
- "./base/jupyterhub/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro" | ||
# Bind Docker socket on the host, so we can connect to the daemon from | ||
# within the container | ||
- "/var/run/docker.sock:/var/run/docker.sock:rw" | ||
# Bind Docker volume on host for JupyterHub database and cookie secrets | ||
#- "jupyterhub-data:/data" | ||
- "shared_scripts:/srv/jupyterhub/shared_scripts:ro" | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
# This username will be a JupyterHub admin | ||
JUPYTERHUB_ADMIN: admin | ||
# All containers will join this network | ||
DOCKER_NETWORK_NAME: hello-data-network | ||
# JupyterHub will spawn this Notebook image for users | ||
DOCKER_NOTEBOOK_IMAGE: hello-data-base-notebook:latest | ||
# Notebook directory inside user image | ||
DOCKER_NOTEBOOK_DIR: /home/jovyan/work | ||
JUPYTERHUB_LOG_LEVEL: DEBUG | ||
OAUTH2_CLIENT_ID: frontend-client | ||
OAUTH2_CLIENT_SECRET: not-required | ||
OAUTH2_ISSUER_URL: http://host.docker.internal:38080/realms/hellodata | ||
OAUTH2_AUTHORIZE_URL: http://host.docker.internal:38080/realms/hellodata/protocol/openid-connect/auth | ||
OAUTH2_TOKEN_URL: http://host.docker.internal:38080/realms/hellodata/protocol/openid-connect/token | ||
OAUTH2_USERDATA_URL: http://host.docker.internal:38080/realms/hellodata/protocol/openid-connect/userinfo | ||
OAUTH2_CALLBACK_URL: http://localhost:8000/hub/oauth_callback | ||
OAUTH2_SCOPE: openid | ||
OAUTH2_LOGIN_SERVICE: keycloak | ||
OAUTH2_USERNAME_KEY: preferred_username | ||
OAUTH2_USERDATA_PARAMS: state:state | ||
OAUTH2_ALLOW_ALL: true | ||
HUB_IP: jupyterhub-default-data-domain | ||
JUPYTERHUB_CRYPT_KEY: GTxQ9tNJ3v5TA3ZrmFs4ZtW0yF3a2nLn+f6Pd8c+Z5E= | ||
|
||
jupyterhub-proxy-default-data-domain: | ||
image: jupyterhub/configurable-http-proxy:latest | ||
container_name: jupyterhub-proxy-default-data-domain | ||
environment: | ||
- CONFIGPROXY_AUTH_TOKEN=s3cr3t | ||
- HUB_IP=jupyterhub-default-data-domain | ||
ports: | ||
- "8001:8001" | ||
depends_on: | ||
- jupyterhub-default-data-domain | ||
networks: | ||
- hello-data-network | ||
|
||
# just to build an image | ||
jupyterhub-notebook-default-data-domain: | ||
build: | ||
context: ./base/jupyterhub | ||
dockerfile: Dockerfile.base_notebook | ||
environment: | ||
- JUPYTER_ENABLE_LAB=yes | ||
networks: | ||
- hello-data-network | ||
depends_on: | ||
- jupyterhub-default-data-domain | ||
command: echo "This service is only for building our custom image which will be spawned by jupyterhub" | ||
|
||
hello-data-jupyterhub-gateway-default-data-domain: | ||
image: bedag/hello-data-jupyterhub-gateway | ||
env_file: .env | ||
environment: | ||
- JUPYTERHUB_SERVICE_NAME=host.docker.internal:8000 | ||
- SPRING_R2DBC_URL=r2dbc:postgresql://host.docker.internal:35432/hd_metainfo | ||
- SPRING_R2DBC_USERNAME=postgres | ||
- SPRING_R2DBC_PASSWORD=postgres | ||
- HELLO_DATA_CONTEXTS_0=Data Domain | Default_Data_Domain | Default Data Domain | ||
ports: | ||
- "8088:8088" | ||
- "8083:8082" | ||
depends_on: | ||
- postgres | ||
- keycloak | ||
- jupyterhub-default-data-domain | ||
restart: always | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
networks: | ||
- hello-data-network | ||
|
||
hello-data-sidecar-jupyterhub-default-data-domain: | ||
image: bedag/hello-data-sidecar-jupyterhub | ||
env_file: .env | ||
environment: | ||
- HELLODATA_JUPYTERHUB_DWH_URL=jdbc:postgresql://host.docker.internal | ||
- SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:35432/hd_metainfo | ||
- NATS_SPRING_SERVER=nats://nats:4222 | ||
- HELLO_DATA_INSTANCE_URL=http://localhost:8088/ | ||
- HELLO_DATA_INSTANCE_NAME=Jupyterhub Default Data Domain | ||
- HELLO_DATA_CONTEXTS_0=Data Domain | Default_Data_Domain | Default Data Domain | ||
- HELLO_DATA_SIDECAR_PUBLISH_INTERVAL_SECONDS=30 | ||
depends_on: | ||
- postgres | ||
- keycloak | ||
- jupyterhub-default-data-domain | ||
restart: always | ||
ports: | ||
- "8091:8089" | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" |
Oops, something went wrong.