Skip to content

Commit 76418b8

Browse files
committed
General workflow updates + scripts.
2 parents 8f64827 + 6870ccd commit 76418b8

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

.github/workflows/docker-jupyter-singleuser-gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Git Sumbodule Update
4141
run: |
4242
git submodule update --init --recursive
43-
git pull --recurse-submodules origin master
43+
git pull --recurse-submodules origin main
4444
git submodule update --remote --recursive
4545
4646
- name: Log in to Docker Hub

.github/workflows/docker-jupyter-singleuser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Git Sumbodule Update
5454
run: |
5555
git submodule update --init --recursive
56-
git pull --recurse-submodules origin master
56+
git pull --recurse-submodules origin main
5757
git submodule update --remote --recursive
5858
5959
- name: Log in to Docker Hub

.github/workflows/submodule_sync.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: submodules-sync
33
on:
44

55
push:
6-
branches: [master]
6+
branches: [main]
77
pull_request:
8-
branches: [master]
8+
branches: [main]
99

1010
release:
1111
types: [published]
@@ -35,7 +35,7 @@ jobs:
3535
- name: Git Sumbodule Update
3636
run: |
3737
git config pull.rebase false
38-
git pull --recurse-submodules origin master
38+
git pull --recurse-submodules origin main
3939
git submodule update --remote --recursive
4040
4141
- name: Commit update

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
This repo has been reinstated. The custom jupyter-hub image is specified in the [CogStack-Nifi](https://github.com/CogStack/CogStack-NiFi/tree/master/services/jupyter-hub) project.
3+
This repo has been reinstated. The custom jupyter-hub image is specified in the [CogStack-Nifi](https://github.com/CogStack/CogStack-NiFi/tree/main/services/jupyter-hub) project.
44

55

66
This repository contains a custom Jupyter Hub Docker image with example notebooks to play with. \
@@ -37,7 +37,7 @@ Full list found in [requirements.txt](./requirements.txt).
3737

3838
## Security
3939

40-
Certificates used are located in the `./security/` folder, taken from the [Cogstack-NiFi](https://github.com/CogStack-NiFi) security folder, [root-ca.key](https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/master/security/root-ca.key) and [root-ca.pem](https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/master/security/root-capem), read the [security section](https://cogstack-nifi.readthedocs.io/en/latest/security.html) for more info on how to generate them from the main NiFi repository.
40+
Certificates used are located in the `./security/` folder, taken from the [Cogstack-NiFi](https://github.com/CogStack-NiFi) security folder, [root-ca.key](https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-ca.key) and [root-ca.pem](https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-capem), read the [security section](https://cogstack-nifi.readthedocs.io/en/latest/security.html) for more info on how to generate them from the main NiFi repository.
4141

4242
## Setting up your own hub
4343

config/jupyterhub_config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator):
3030
# using the DOCKER_SPAWN_CMD environment variable.
3131
spawn_cmd = os.environ.get("DOCKER_SPAWN_CMD", "start-singleuser.sh")
3232

33-
c.DockerSpawner.extra_create_kwargs.update({"command": spawn_cmd})
34-
# c.DockerSpawner.extra_create_kwargs.update({ "volume_driver": "local" })
35-
3633
# Connect containers to this Docker network
3734
# IMPORTANT, THIS MUST MATCH THE NETWORK DECLARED in "services.yml", by default: "cogstack-net"
3835
network_name = os.environ.get("DOCKER_NETWORK_NAME", "cogstack-net")
@@ -178,9 +175,7 @@ def pre_spawn_hook(spawner: DockerSpawner):
178175
c.PAMAuthenticator.admin_groups = {"wheel"}
179176
c.Authenticator.allowed_users = whitelist = set()
180177

181-
182178
#c.Authenticator.manage_groups = True
183-
184179
#c.Authenticator.allow_all = True
185180

186181
curr_dir = os.path.dirname(__file__)
@@ -206,6 +201,10 @@ def per_user_limit(role):
206201

207202
# Spawn single-user servers as Docker containers
208203
c.JupyterHub.spawner_class = DockerSpawner
204+
205+
# set DockerSpawner args
206+
c.DockerSpawner.extra_create_kwargs.update({"command": spawn_cmd})
207+
# c.DockerSpawner.extra_create_kwargs.update({ "volume_driver": "local" })
209208
c.DockerSpawner.extra_create_kwargs = {"user": "root"}
210209

211210
with open(userlist_path) as f:
@@ -264,6 +263,7 @@ def per_user_limit(role):
264263
"GRANT_SUDO": "1",
265264
"UID": "0", # workaround https://github.com/jupyter/docker-stacks/pull/420,
266265
}
266+
267267
c.DockerSpawner.environment.update(ENV_PROXIES)
268268

269269
# Alternative, use: "nativeauthenticator.NativeAuthenticator"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22

3-
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/master/deploy/general.env > ./env/general.env
4-
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/master/security/root-ca.key > ./security/root-ca.key
5-
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/master/security/root-ca.pem > ./security/root-ca.pem
3+
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/deploy/general.env > ./env/general.env
4+
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-ca.key > ./security/root-ca.key
5+
curl https://raw.githubusercontent.com/CogStack/CogStack-NiFi/refs/heads/main/security/root-ca.pem > ./security/root-ca.pem

0 commit comments

Comments
 (0)