Skip to content

Instantly share code, notes, and snippets.

Yuvi Panda yuvipanda

Block or report user

Report or block yuvipanda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View values.yaml
jupyterhub:
prePuller:
continuous:
enabled: false
scheduling:
userScheduler:
enabled: false
hub:
networkPolicy:
enabled: true
@yuvipanda
yuvipanda / start-vm.py
Created Sep 24, 2019
Start a VM with Pangeo image & let you access it
View start-vm.py
#!/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'
View sample_spark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Dockerfile
FROM yuvipanda/pangeo-base-notebook-onbuild:2019.04.15-4
View gist:1b58c4ed47148c5e9c53ea492161fec1
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
@yuvipanda
yuvipanda / ldapsearchauth.py
Created Jan 7, 2019
A JupyterHub authenticator that outsources to ldapsearch
View ldapsearchauth.py
"""
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
@yuvipanda
yuvipanda / hello.c
Last active Nov 14, 2018
helloworld.c
View hello.c
#include <stdio.h>
int main() {
printf("Hello world!");
return 0;
}
@yuvipanda
yuvipanda / Today's Logs
Created Nov 7, 2018
debugging logs for hub
View Today's Logs
This file has been truncated, but you can view the full file.
Loading /etc/jupyterhub/config/values.yaml
Loading /etc/jupyterhub/secret/values.yaml
[I 2018-11-07 03:12:27.089 JupyterHub app:1673] Using Authenticator: oauthenticator.google.GoogleOAuthenticator-0.8.0
[I 2018-11-07 03:12:27.089 JupyterHub app:1673] Using Spawner: builtins.CustomKubeSpawner
[I 2018-11-07 03:12:27.104 JupyterHub app:1016] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
[W 2018-11-07 03:12:27.452 JupyterHub app:1131] JupyterHub.hub_connect_port is deprecated as of 0.9. Use JupyterHub.hub_connect_url to fully specify the URL for connecting to the Hub.
[I 2018-11-07 03:12:27.616 JupyterHub app:1201] Not using whitelist. Any authenticated user will be allowed.
[I 2018-11-07 03:12:29.980 JupyterHub reflector:199] watching for pods with label selector='component=singleuser-server' in namespace prod
[I 2018-11-07 03:12:32.953 JupyterHub reflector:199] watching for events with field selector='involvedObject.kind=Pod' in namespace prod
View test.rst

Looking at Logs

Logs are extremely useful in piecing together what went wrong when things go wrong. They contain a forensic record of what individual pieces of software were doing before things went bad, and can help us understand the problem so we can fix it.

TLJH collects logs from JupyterHub, Configurable HTTP Proxy & from each individual

View connected.yaml
apiVersion: v1
kind: Pod
metadata:
name: {% name(user.name, user.image, user.selector_profile) %}
spec:
automountServiceAccountToken: false
volumes:
- name: homedir
persistentVolumeClaim:
name: {% name(user.name) %}
You can’t perform that action at this time.