Add SRIOV and QAT device plugin deploy components
[icn.git] / deploy / kud-plugin-addons / device-plugins / qat / yaml / collect_qat_yaml.sh
1 #!/bin/bash
2
3 # usage: collect_qat_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=qat_yaml
16
17 # copy to target
18 $MKDIR_P $temp
19 cp qat_plugin_default_configmap.yaml $temp/
20 cp qat_plugin_privileges.yaml $temp/
21 echo "#!/bin/bash" >> $temp/install.sh
22 echo "cat qat_plugin_default_configmap.yaml | kubectl apply -f -" >> $temp/install.sh
23 echo "cat qat_plugin_privileges.yaml | kubectl apply -f -" >> $temp/install.sh
24
25 if [ ! -d $target/yaml ]; then
26     $MKDIR_P $target/yaml;
27 fi;
28
29 tar czvf $target/yaml/qat_yaml-$VER.tar.gz $temp/
30
31 # clear
32 rm -rf $temp