Add Rook operator and Ceph cluster bring up script
[icn.git] / deploy / kud-plugin-addons / rook / yaml / collect_rook_yaml.sh
1 #!/bin/bash
2
3 # usage: collect_rook_yaml.sh [target]
4
5 set -ex
6
7 if [ $# -ne 1 ] ; then
8     echo "Please input the target folder!"
9     exit 0
10 fi
11
12 VER="0.1"
13 MKDIR_P="mkdir -p"
14 target=$1
15 temp=rook_yaml
16
17 # copy to target
18 $MKDIR_P $temp
19 cp rook-common.yaml $temp/
20 cp rook-operator-with-csi.yaml $temp/
21 cp rook-ceph-cluster.yaml $temp/
22 cp rook-toolbox.yaml $temp/
23 cp -rf ./csi/ $temp/
24 cp -rf ./test/ $temp/
25 cp install.sh $temp/
26
27 if [ ! -d $target/yaml ]; then
28     $MKDIR_P $target/yaml;
29 fi;
30
31 tar czvf $target/yaml/rook_yaml-$VER.tar.gz $temp/
32
33 # clear
34 rm -rf $temp