Separate pods for Ubuntu Rally due to dependency mess

  Related-PROD: PROD-36128

Change-Id: I5020af4ba036cab9a59403610a4a2ce40678abc9
diff --git a/k8s/init-ubuntu.sh b/k8s/init-ubuntu.sh
new file mode 100644
index 0000000..4198749
--- /dev/null
+++ b/k8s/init-ubuntu.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+cd /artifacts
+# Installing prerequisites
+apt -y update
+apt -y install python3-pip vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl
+pip3 install python-openstackclient python-neutronclient pyghmi
+
+mkdir /artifacts/cmp-check && cd /artifacts/cmp-check
+cp /artifacts/res-files/scripts/prepare.sh ./
+cp /artifacts/res-files/scripts/cmp-check.sh ./
+cp /artifacts/res-files/cleanup.sh ./
diff --git a/k8s/qa-pod.yaml b/k8s/qa-rally.yaml
similarity index 80%
copy from k8s/qa-pod.yaml
copy to k8s/qa-rally.yaml
index c4e6201..9510763 100644
--- a/k8s/qa-pod.yaml
+++ b/k8s/qa-rally.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Pod
 metadata:
-  name: qa-pod
+  name: rally
   namespace: qa-space
 spec:
   containers:
@@ -64,21 +64,15 @@
           key: OS_DEFAULT_DOMAIN
           name: keystone-keystone-admin
     imagePullPolicy: IfNotPresent
-# enable this image if rally is not enough, 
-# but rally will be needed to be installed manually
-    name: ubuntu
-    image: ubuntu:20.04
-# xrally container has a lot of packages missing. 
-# It is better to install rally on ubuntu, than install missing packages on rally image
-#    name: rally-perf
-#    image: xrally/xrally-openstack:2.1.0
+    name: rally
+    image: xrally/xrally-openstack:2.1.0
     volumeMounts:
     - mountPath: /artifacts
-      name: qa-pv
+      name: qa-pv-r
   dnsPolicy: ClusterFirst
   volumes:
   - emptyDir: {}
     name: pod-tmp
-  - name: qa-pv
+  - name: qa-pv-r
     persistentVolumeClaim:
-      claimName: qa-pvc
+      claimName: qa-pvc-r
diff --git a/k8s/qa-res.yaml b/k8s/qa-res.yaml
index 398192c..776c62f 100644
--- a/k8s/qa-res.yaml
+++ b/k8s/qa-res.yaml
@@ -6,12 +6,12 @@
 apiVersion: v1
 kind: PersistentVolume
 metadata:
-  name: qa-pv
+  name: qa-pv-a
   namespace: qa-space
   labels:
     type: local
 spec:
-  storageClassName: volumes-hdd
+  storageClassName: storage_class
   capacity:
     storage: 50Gi
   accessModes:
@@ -23,10 +23,40 @@
 apiVersion: v1
 kind: PersistentVolumeClaim
 metadata:
-  name: qa-pvc
+  name: qa-pvc-a
   namespace: qa-space
 spec:
-  storageClassName: volumes-hdd
+  storageClassName: storage_class
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 50Gi
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: qa-pv-r
+  namespace: qa-space
+  labels:
+    type: local
+spec:
+  storageClassName: storage_class
+  capacity:
+    storage: 50Gi
+  accessModes:
+    - ReadWriteOnce
+  persistentVolumeReclaimPolicy: Retain
+  hostPath:
+    path: "/tmp/artifacts"
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: qa-pvc-r
+  namespace: qa-space
+spec:
+  storageClassName: storage_class
   accessModes:
     - ReadWriteOnce
   resources:
diff --git a/k8s/qa-pod.yaml b/k8s/qa-ubuntu.yaml
similarity index 82%
rename from k8s/qa-pod.yaml
rename to k8s/qa-ubuntu.yaml
index c4e6201..b2224d5 100644
--- a/k8s/qa-pod.yaml
+++ b/k8s/qa-ubuntu.yaml
@@ -1,7 +1,7 @@
 apiVersion: v1
 kind: Pod
 metadata:
-  name: qa-pod
+  name: ubuntu
   namespace: qa-space
 spec:
   containers:
@@ -64,21 +64,15 @@
           key: OS_DEFAULT_DOMAIN
           name: keystone-keystone-admin
     imagePullPolicy: IfNotPresent
-# enable this image if rally is not enough, 
-# but rally will be needed to be installed manually
     name: ubuntu
     image: ubuntu:20.04
-# xrally container has a lot of packages missing. 
-# It is better to install rally on ubuntu, than install missing packages on rally image
-#    name: rally-perf
-#    image: xrally/xrally-openstack:2.1.0
     volumeMounts:
     - mountPath: /artifacts
-      name: qa-pv
+      name: qa-pv-a
   dnsPolicy: ClusterFirst
   volumes:
   - emptyDir: {}
     name: pod-tmp
-  - name: qa-pv
+  - name: qa-pv-a
     persistentVolumeClaim:
-      claimName: qa-pvc
+      claimName: qa-pvc-a
diff --git a/k8s/gen_kubespec.sh b/k8s/rally-files/gen_kubespec.sh
similarity index 100%
rename from k8s/gen_kubespec.sh
rename to k8s/rally-files/gen_kubespec.sh
diff --git a/k8s/_init_pod.sh b/k8s/rally-files/init-rally.sh
similarity index 74%
rename from k8s/_init_pod.sh
rename to k8s/rally-files/init-rally.sh
index 50c4da2..797cf0b 100644
--- a/k8s/_init_pod.sh
+++ b/k8s/rally-files/init-rally.sh
@@ -1,9 +1,9 @@
 #!/bin/bash
 cd /artifacts
 # Installing prerequisites
-apt -y update
-apt -y install python3-pip vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2
-pip3 install rally-openstack python-neutronclient pyghmi
+#apt -y update
+#apt -y install python3-pip vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl
+#pip3 install rally-openstack python-neutronclient pyghmi
 
 # Prepare Rally
 rally db create
diff --git a/k8s/k8s-mos-scn-i1.yaml b/k8s/rally-files/k8s-mos-scn-i1.yaml
similarity index 100%
rename from k8s/k8s-mos-scn-i1.yaml
rename to k8s/rally-files/k8s-mos-scn-i1.yaml
diff --git a/k8s/k8s-mos-scn-i100c5.yaml b/k8s/rally-files/k8s-mos-scn-i100c5.yaml
similarity index 100%
rename from k8s/k8s-mos-scn-i100c5.yaml
rename to k8s/rally-files/k8s-mos-scn-i100c5.yaml
diff --git a/k8s/openstack-mos-scn-i1.json b/k8s/rally-files/openstack-mos-scn-i1.json
similarity index 100%
rename from k8s/openstack-mos-scn-i1.json
rename to k8s/rally-files/openstack-mos-scn-i1.json
diff --git a/k8s/openstack-mos-scn-i100.json b/k8s/rally-files/openstack-mos-scn-i100.json
similarity index 100%
rename from k8s/openstack-mos-scn-i100.json
rename to k8s/rally-files/openstack-mos-scn-i100.json