Deploy Noobaa on OpenShift (minishift on macos) - noobaa/noobaa-core GitHub Wiki

  1. Installations:
brew install docker-machine-driver-xhyve #if docker already installed I think this is unnecessary 
sudo chown root:wheel /usr/local/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
brew cask install minishift
brew install openshift-cli
  1. You need a registry to put your image. You can deploy a local registry running in a container (assuming you've build a Noobaa image locally named nbimage):

    • docker run -d -p 5000:5000 --restart=always --name registry registry:2
    • tag your image: docker tag nbimage localhost:5000/nbimage
    • push image to the registry: docker push localhost:5000/nbimage
  2. start minishift:

minishift start --insecure-registry [local ip]:5000. 
#e.g: minishift start --insecure-registry 172.20.80.59:5000
  1. need to set container_manage_cgroup flag on the OpenShift node itself:
minishift ssh # will ssh to the minishift node
sudo setsebool -P container_manage_cgroup 1
exit
  1. login as admin to OpenShift cli and set scc for all authenticated users to run privileged containers (we need to find a good way to do it without privileged)
oc login -u system:admin
oc adm policy add-scc-to-group privileged system:authenticated
  1. deploy Noobaa stateful set. first edit the yaml file and change the image to point to your registry:
oc create -f ./src/deploy/NVA_build/noobaa_statefulset.yaml
  1. Verify with
oc exec -it noobaa-0 /bin/bash

Good Luck!!

TODO: still need to solve:

  • create /var/lib/mongo/cluster/shard1
  • set permissions :chown -R mongod:mongod /var/lib/mongo/
  • fix generate_entropy in nb_native