Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Display current token needed to log in
sudo docker exec ju jupyter notebook list
#!/bin/bash
CSC1="10.90.209.155"
CSC2="10.90.209.196"
CSC3="10.90.209.199"
# Errors can result from improper web server vhost configuration, check the section websocket
sudo docker run -d --network=isolated_nw \
-v /ds/jupyter/notebooks:/home/jovyan/work \
--add-host="$CSC1" \
sudo docker build --build-arg NEW_NB_UID=1001 -t="datarecipe/jupyter:4.4.0" /ds/git-projects/jupyter
# This is based on the Jupyter datascience-notebook dockerfile
# https://github.com/jupyter/docker-stacks/blob/fd7a494cc59f1ca16d39375634b7f77c3beebe3c/datascience-notebook/Dockerfile
# The Julia dependencies and installation were removed
# A build argument to change the UID was added
# Pip was upgraded
# The Cassandra Python driver was installed
# Rename to "Dockerfile" before using
FROM jupyter/scipy-notebook
# Create a docker network bridge on each Cassandra node
# Subnets are explicity defined below, but that is not necessary
# CSC1
sudo docker network create --subnet=172.10.1.0/24 --driver bridge isolated_nw
# CSC2
sudo docker network create --subnet=172.10.2.0/24 --driver bridge isolated_nw
# CSC3
sudo docker network create --subnet=172.10.3.0/24 --driver bridge isolated_nw
# Within each Cassandra node, start a Bash session
sudo docker exec -it csc bash
# Update and install Vim
apt-get update
apt-get install -qy vim
# Create a directory to store the Cassandra SSL certificates
mkdir /etc/cassandra/sslcert
#!/bin/bash
# Based on http://docs.datastax.com/en/archived/cassandra/3.x/cassandra/configuration/secureSSLCertWithCA.html
# Script can be execute on each Cassandra node or on a single Cassandra node
# If executed on a single node, transfer TrustStore and Node KeyStore files to each node
# Define Cassandra node IPs
CSC1="10.90.209.155"
CSC2="10.90.209.196"
CSC3="10.90.209.199"
#!/bin/bash
UNAME="datarecipe"
GNAME="datarecipe"
sudo mkdir -p /ds/
sudo chown -R $UNAME:$GNAME /ds/
mkdir -p /ds/cassandra/
mkdir -p /ds/cassandra/conf/
mkdir -p /ds/cassandra/csc/
#!/bin/bash
CSC1="10.90.209.155"
CSC2="10.90.209.196"
CSC3="10.90.209.199"
CSC_HOST=$CSC3
CSC_SEEDS="$CSC1,$CSC2"
sudo docker run -d --network=isolated_nw \
#!/bin/bash
CSC1="10.90.209.155"
CSC2="10.90.209.196"
CSC3="10.90.209.199"
CSC_HOST=$CSC2
CSC_SEEDS="$CSC1,$CSC3"
sudo docker run -d --network=isolated_nw \