Skip to content

Instantly share code, notes, and snippets.

@mmgaggle
Last active July 13, 2018 15:49
Show Gist options
  • Save mmgaggle/b30612122bae076ac3f3fe396f2c033a to your computer and use it in GitHub Desktop.
Save mmgaggle/b30612122bae076ac3f3fe396f2c033a to your computer and use it in GitHub Desktop.

Install and Configure xhyve

brew update
brew install --HEAD xhyve
brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Install and start minishift

brew cask install minishift
minishift start

Run Ceph Nano in OpenShift

oc --as system:admin adm policy add-scc-to-user anyuid system:serviceaccount:myproject:default
oc create -f ceph-rgw-keys.yml
oc create -f ceph-nano.yml
oc expose pod ceph-nano-0 --type=NodePort

Create Jupyter Playbook

oc new-app https://github.com/radanalyticsio/base-notebook \
  -e JUPYTER_NOTEBOOK_PASSWORD=developer \
  -e RGW_API_ENDPOINT=$(minishift openshift service ceph-nano-0 --url)

oc env --from=secret/ceph-rgw-keys dc/ceph-notebook
oc expose svc/ceph-notebook
oc status

Create Jupyter Playbook (WIP ~ trying to build openshift-spark w/ hadoop 2.8.4)

oc new-app mmgaggle/ceph-notebook \
  -e JUPYTER_NOTEBOOK_PASSWORD=developer \
  -e RGW_API_ENDPOINT=$(minishift openshift service ceph-nano-0 --url)
  -e JUPYTER_NOTEBOOK_X_INCLUDE=http://mmgaggle-bd.s3.amazonaws.com/ceph-notebook.ipynb

oc env --from=secret/ceph-rgw-keys dc/ceph-notebook
oc expose svc/ceph-notebook
oc status

Setup Oshinko

oc create -f https://radanalytics.io/resources.yaml
oc new-app --template=oshinko-webui
# minishift ceph-nano!
---
apiVersion: v1
kind: Service
metadata:
name: ceph-nano-services
labels:
app: ceph
daemon: nano
spec:
ports:
- name: cn-s3
port: 80
protocol: TCP
targetPort: 8000
type: LoadBalancer
selector:
app: ceph
daemon: demo
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: ceph
daemon: nano
name: ceph-nano
spec:
replicas: 1
serviceName: ceph-nano
selector:
matchLabels:
app: ceph
template:
metadata:
name: ceph-nano
labels:
app: ceph
daemon: nano
spec:
containers:
- image: ceph/daemon
imagePullPolicy: Always
name: ceph-nano
ports:
- containerPort: 8000
name: cn-s3
protocol: TCP
resources:
limits:
cpu: "1"
memory: 512M
requests:
cpu: "1"
memory: 512M
env:
- name: NETWORK_AUTO_DETECT
value: "4"
- name: RGW_CIVETWEB_PORT
value: "8000"
- name: SREE_PORT
value: "5001"
- name: CEPH_DEMO_UID
value: "nano"
- name: CEPH_DAEMON
value: "demo"
- name: DEBUG
value: "verbose"
- name: CEPH_DEMO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: ceph-rgw-keys
key: rgw_user_user_key
- name: CEPH_DEMO_SECRET_KEY
valueFrom:
secretKeyRef:
name: ceph-rgw-keys
key: rgw_user_secret_key
apiVersion: v1
kind: Secret
metadata:
name: ceph-rgw-keys
type: Opaque
data:
rgw_user_user_key: Zm9v
rgw_user_secret_key: YmFy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment