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
FROM python:3.7-buster | |
RUN pip install --no-cache certbot kubernetes | |
COPY autocert.py /usr/local/bin/autocert.py |
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
description: "Build an image via hubploy" | |
parameters: | |
deployment: | |
type: string | |
push: | |
type: boolean | |
default: false | |
docker: | |
- image: python:3.7-slim-buster |
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
import os | |
import boto3 | |
import yaml | |
jupyter_image = os.environ['JUPYTER_IMAGE'] | |
session = boto3.Session() | |
credentials = session.get_credentials() | |
aws_creds = {'key': credentials.access_key, 'secret': credentials.secret_key} | |
dask_worker_spec = f'''kind: Pod |
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
from oauthenticator.generic import GenericOAuthenticator | |
class CustomAuthenticator(GenericOAuthenticator): | |
async def authenticate(self, handler, data=None): | |
resp = await super().authenticate(handler, data) | |
# resp is a dict mentioned here: https://github.com/jupyterhub/oauthenticator/blob/master/oauthenticator/generic.py#L163 | |
# modify it as you wish, set username key | |
modified_resp = resp.copy() | |
modified_resp['username'] = resp['auth_state']['oauth_resp']['attrib']['email'] | |
return modified_resp |
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
jupyterhub: | |
prePuller: | |
continuous: | |
enabled: false | |
scheduling: | |
userScheduler: | |
enabled: false | |
hub: | |
networkPolicy: | |
enabled: true |
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
#!/usr/bin/env python | |
import re | |
import subprocess | |
import time | |
import argparse | |
import json | |
IMAGE = 'pangeo/base-notebook:2019.09.21' | |
ZONE = 'us-central1-b' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
FROM yuvipanda/pangeo-base-notebook-onbuild:2019.04.15-4 |
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
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Starting Google Accounts daemon. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Creating a new user account for yuvipanda. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Created user account yuvipanda. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Creating a new user account for choldgraf. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Created user account choldgraf. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Creating a new user account for minrk. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Created user account minrk. | |
Nov 22 11:16:25 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Creating a new user account for gke-df315ed616f010764e03. | |
Nov 22 11:16:26 gke-prod-a-core-e77a049e-591f google-accounts[475]: INFO Created user account gke-df315ed616f010764e03. | |
Nov 22 11:16 |
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
""" | |
An authenticator that outsorces auth to ldapsearch! | |
Because LDAP is hard and old and terrible and you should not use it. | |
""" | |
import os | |
from jupyterhub.auth import Authenticator | |
import pexpect.exceptions | |
import pexpect.popen_spawn | |
from traitlets import Unicode |