Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Check vars |
| 3 | if [ -z ${MY_CLIENTNAME+x} ]; then |
| 4 | echo "# Source ${MY_PROJFOLDER}/env.sh prior to running this script" |
| 5 | exit 1 |
| 6 | fi |
| 7 | # Prepare qa namespace and resources |
| 8 | echo "# Sourcing mosrc" |
| 9 | . ${MY_PROJFOLDER}/envs/mosrc |
| 10 | # check that kubeconfig present |
| 11 | if [ -z ${KUBECONFIG} ]; then |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | # ns and storages |
| 16 | echo "# Creating resources" |
| 17 | kubectl apply -f ${MY_PROJFOLDER}/yamls/qa-res.yaml |
| 18 | # keystone |
| 19 | if [ -z $(kubectl -n qa-space get secret keystone-keystone-admin --no-headers | cut -d' ' -f1) ]; then |
| 20 | echo "# Copy keystone vars" |
| 21 | kubectl get secret keystone-keystone-admin -n openstack -o yaml | sed 's/namespace: openstack/namespace: qa-space/g' | kubectl apply -n qa-space -f - |
| 22 | fi |
| 23 | # start toolset |
| 24 | echo "# Starting toolset pod" |
| 25 | kubectl apply -f ${MY_PROJFOLDER}/yamls/qa-toolset.yaml |
| 26 | echo "# Starting rally pod" |
| 27 | kubectl apply -f ${MY_PROJFOLDER}/yamls/qa-rally.yaml |
| 28 | |