README.md 897 Bytes
Newer Older
Christian Salzmann-Jaeckel's avatar
Christian Salzmann-Jaeckel committed
1 2
# scipopt-demo

Christian Salzmann-Jaeckel's avatar
Christian Salzmann-Jaeckel committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
scipoptsuite Kubernetes Deployment

## generate Token

generate base64-encoded secret …
```
export TOKEN="6efc47365e5566c9c6365eabd380dac8"
ENCODED_TOKEN=$(echo -n $TOKEN | base64)
echo $ENCODED_TOKEN
```
… and insert this into the *secret* spec (replace the value of data.token with $ENCODED_TOKEN)
```
apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: scipopt-demo
  name: scipopt-jupyter-token
  namespace: scipopt-demo
type: Opaque
data:
  token: "NmVmYzQ3MzY1ZTU1NjZjOWM2MzY1ZWFiZDM4MGRhYzg="
```

## start deployment

```
kubectl apply -f deployment.yaml
```

## access notebook

1. get k8s node name
```
kubectl get nodes
```
2. construct url
collect
* the TOKEN generated above
* the NODE_NAME found in step 1
```
44 45
echo "URL: http://${NODE_NAME}:32080/?token=${TOKEN}"
URL: http://rise-node-110:32080/?token=6efc47365e5566c9c6365eabd380dac8
Christian Salzmann-Jaeckel's avatar
Christian Salzmann-Jaeckel committed
46 47
```
3. browse url