Add Rook operator and Ceph cluster bring up script
[icn.git] / deploy / kud-plugin-addons / rook / yaml / install.sh
1 #!/bin/bash
2
3 # Make sure kubernetes server is up with network dns
4 # kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/62e44c867a2846fefb68bd5f178daf4da3095ccb/Documentation/kube-flannel.yml
5
6 # Remove taint if have
7 # kubectl taint nodes master node-role.kubernetes.io/master:NoSchedule-
8
9 # Remove remaining config files of last deplpyment
10 echo ""|sudo -S rm -rf /var/lib/rook/*
11
12 # Create common CRD objects
13 kubectl create -f rook-common.yaml
14
15 # Create rbac, since rook operator is not permitted to create rbac rules, these
16 # rules have to be created outside of operator
17 kubectl apply -f ./csi/rbac/rbd/
18 kubectl apply -f ./csi/rbac/cephfs/
19
20 # Start rook ceph operator with csi support
21 kubectl create -f rook-operator-with-csi.yaml
22
23 # Bring up cluster with default configuration, current Ceph version is:
24 # ceph/ceph:v14.2.1-20190430, and create osd with default /dev/sdb on each node
25 kubectl create -f rook-ceph-cluster.yaml
26
27 # Start toolbox containers with CLI support, to enter the bash env, use command:
28 # kubectl -n rook-ceph exec -it $(kubectl -n rook-ceph get pod -l "app=rook-ceph-tools" -o jsonpath='{.items[0].metadata.name}') bash
29 kubectl create -f rook-toolbox.yaml
30