-
Notifications
You must be signed in to change notification settings - Fork 80
Deploy Noobaa on OpenShift (minishift on macos)
Eran Tamir edited this page Jan 31, 2019
·
9 revisions
- Installations:
- Make sure you have VirtualBox version 5.2 and up, but not 6 (couldn't get it to work with version 6) - https://www.virtualbox.org/wiki/Download_Old_Builds_5_2
- Install docker - https://hub.docker.com/editions/community/docker-ce-desktop-mac
- Setup xhyve drivers according to this. tldr:
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
-
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
-
start minishift:
minishift start --insecure-registry [local ip]:5000.
#e.g: minishift start --insecure-registry 172.20.80.59:5000
- 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
- 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
- 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
- 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