Skip to content

Instantly share code, notes, and snippets.

@larryebaum
Last active October 19, 2021 00:53
Show Gist options
  • Save larryebaum/0c758c5669032a0527d338b0fc299e80 to your computer and use it in GitHub Desktop.
Save larryebaum/0c758c5669032a0527d338b0fc299e80 to your computer and use it in GitHub Desktop.

Jupyter Lab Notebooks

Setups

Install Jupyter Lab to your laptop/workstation. Brew is a OSX package manager and makes it super easy if you follow these steps. Jupyter Lab documentation describes the installation steps for non-Brew users.

Many of the Jupyter Lab notebooks contain graphic images as headers. You can easily add/change these graphics to suit your needs using the base Google document Demo Headers. To change a header, create a new slide in the deck, arrange the image as you'd like, and use a screen grab tool (or on OSX, press CMD-CTRL-OPT-4) to select the image boundaries and 'copy'. Then highlight the intended cell in your Jupyter notebook and 'paste'.

Library of Vault Demo Use Cases

Use Case Description / Repo Link Author
UCV01 Versioned Secrets James Nyika
UCV02 Username / Password James Nyika
UCV03 PKI Certificates James Nyika
UCV04 App Role Authentication James Nyika
UCV05 Database Dynamic Credentials: MariaDB James Nyika
UCV06 Database Dynamic Credentials: PostgreSQL Larry Eichenbaum
UCV07 AWS Dynamic Credentials James Nyika
UCV08 Signed SSH Certificates Larry Eichenbaum
UCV09 ENT: Data Replication Larry Eichenbaum
UCV10 Encryption as a Service James Nyika
UCV11 ENT: DB Static Role & Credential Rotation Larry Eichenbaum
UCV12 ENT: Namespaces Larry Eichenbaum
UCV13 ENT: Transform Secrets Engine James Nyika
UC014 ENT: Cluster Setup Larry Eichenbaum
UC10 ENT: Control Groups ?
@omkensey
Copy link

omkensey commented Jan 8, 2021

For Docker under Linux (see docs), I did the following:

  • Created a before-notebook.d startup hook directory on the local host
  • Cloned the notebook repo
  • Ran Jupyter in Docker as follows:
    • Note that this starts the container with stdout streaming to the terminal. Remove -it and add -d to run the container backgrounded.
$ docker run -it --user 500 --group-add users -p 8888:8888 \
-v $(pwd)/before-notebook.d:/usr/local/bin/before-notebook.d \
-v $(pwd)/hc_demos-jupyter:/home/jovyan/work jupyter/minimal-notebook
  • Copied the vault binary into the container after startup:
    • This should probably be done instead as a mount into /usr/local/bin or something else in the container's PATH in the docker run command, e.g. -v $HOME/bin/vault:/usr/local/bin/vault, as well as other binaries a given notebook may need.
docker cp ~/bin/vault e1f53273d0c2:/opt/conda/bin

The container base image is Ubuntu. With the right magic it should be possible to apt install most things like curl or jq on container creation. Note that some notebooks assume Vault is already running and accessible so it may be necessary to add a cell to run Vault inside the container, or you can start Vault using a startup hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment