Deploy locally#

Prerequisites#

Install minikube#

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64
sudo usermod -aG docker $USER && newgrp docker
minikube start

Install Helm#

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Install BinderHub#

git clone https://github.com/depositar/binder.depositar.io-deploy.git
cd binder.depositar.io-deploy

Modify the helm/staging.yaml:

helm/staging.yaml#
binderhub:
  registry:
    url: # fill this if you are not using Docker Hub
    username: <username> # fill the username of the registry
    password: <password> # fill the password of the registry
  # ...
  config:
    BinderHub:
      # ...
      image_prefix: <docker-id OR organization-name>/<prefix>- # fill the prefix of the image

Install the BinderHub helm chart:

helm dependency update ./helm
helm upgrade --cleanup-on-fail \
    --install binderhub ./helm \
    --namespace=binderhub \
    --create-namespace \
    -f ./helm/staging.yaml

Check pod status:

minikube kubectl -- get pods -n binderhub
Console output#
NAME                              READY   STATUS    RESTARTS   AGE
binder-84497754cb-v726f           1/1     Running   0          108s
binderhub-image-cleaner-549wx     1/1     Running   0          108s
hub-5f6546fd74-lp874              1/1     Running   0          108s
proxy-5768c6c87c-gb9qg            1/1     Running   0          108s
user-scheduler-6b9d666f8f-88t25   1/1     Running   0          108s
user-scheduler-6b9d666f8f-t6lmf   1/1     Running   0          108s

Update the hub_url in the helm/staging.yaml with the IP address of the proxy-public service reported by:

minikube service proxy-public --url -n binderhub

Restart the cluster:

helm upgrade --cleanup-on-fail \
    --install binderhub ./helm \
    --namespace=binderhub \
    --create-namespace \
    -f ./helm/staging.yaml

Then visit the IP address of the binder service reported by:

minikube service binder --url -n binderhub

Tear down the deployment#

helm uninstall binderhub -n binderhub
minikube delete