Multiple script updates
- new rally image dockerfile with plugins
- updated toolset image
- svc-stress fixes to show progress and errors
- flavor sizes updates in accordance with product internal checks
- added fio package download
Related-PROD: PROD-36856
Change-Id: I2ef7ea112a902dedffc51d66c3173f3c7f89876c
diff --git a/k8s/docker-mos-rally b/k8s/docker-mos-rally
new file mode 100644
index 0000000..67a0f8f
--- /dev/null
+++ b/k8s/docker-mos-rally
@@ -0,0 +1,14 @@
+FROM xrally/xrally-openstack:2.1.0
+
+MAINTAINER Alex Savatieiev (a.savex@gmail.com)
+
+WORKDIR /rally
+RUN sudo apt-get update && \
+ sudo apt-get install -y wget curl git
+
+RUN git clone https://github.com/Mirantis/rally-plugins.git && \
+ cd rally-plugins/ && \
+ pip3 install .
+
+ENTRYPOINT ["bash"]
+
diff --git a/k8s/docker-mos-toolset-full b/k8s/docker-mos-toolset-full
index b9a2c28..1313803 100644
--- a/k8s/docker-mos-toolset-full
+++ b/k8s/docker-mos-toolset-full
@@ -18,6 +18,12 @@
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get install -y python3-pip python3-venv vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl screen qemu-utils
+RUN curl https://baltocdn.com/helm/signing.asc | apt-key add - && \
+ apt-get install apt-transport-https --yes && \
+ echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
+ apt-get update && \
+ apt-get install -y helm
+
RUN pip3 install --no-cache-dir python-openstackclient python-neutronclient python-heatclient pyghmi python-octaviaclient tempestparser python-ironicclient aodhclient gnocchiclient python-barbicanclient python-glanceclient
RUN git clone https://gerrit.mcp.mirantis.com/mcp/cvp-configuration /opt/res-files && \
@@ -44,7 +50,7 @@
RUN mkdir /opt/packages/ && \
cd /opt/packages && \
- apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 | grep "^\w" | sort -u) || true
+ apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 fio | grep "^\w" | sort -u) || true
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
diff --git a/k8s/kubespec.yaml.sample b/k8s/rally-files/kubespec.yaml.sample
similarity index 100%
rename from k8s/kubespec.yaml.sample
rename to k8s/rally-files/kubespec.yaml.sample
diff --git a/k8s/si-tests-offline.sh b/k8s/si-files/si-tests-offline.sh
similarity index 100%
rename from k8s/si-tests-offline.sh
rename to k8s/si-files/si-tests-offline.sh
diff --git a/k8s/list-docker-images.yaml b/k8s/yamls/list-docker-images.yaml
similarity index 100%
rename from k8s/list-docker-images.yaml
rename to k8s/yamls/list-docker-images.yaml
diff --git a/k8s/qa-daemonset.yaml b/k8s/yamls/qa-daemonset.yaml
similarity index 100%
rename from k8s/qa-daemonset.yaml
rename to k8s/yamls/qa-daemonset.yaml
diff --git a/k8s/qa-rally.yaml b/k8s/yamls/qa-rally.yaml
similarity index 100%
rename from k8s/qa-rally.yaml
rename to k8s/yamls/qa-rally.yaml
diff --git a/k8s/qa-res.yaml b/k8s/yamls/qa-res.yaml
similarity index 100%
rename from k8s/qa-res.yaml
rename to k8s/yamls/qa-res.yaml
diff --git a/k8s/qa-ubuntu.yaml b/k8s/yamls/qa-ubuntu.yaml
similarity index 100%
rename from k8s/qa-ubuntu.yaml
rename to k8s/yamls/qa-ubuntu.yaml
diff --git a/k8s/toolset.yaml b/k8s/yamls/toolset.yaml
similarity index 100%
rename from k8s/toolset.yaml
rename to k8s/yamls/toolset.yaml
diff --git a/scripts/prepare.sh b/scripts/prepare.sh
index 9e3e78f..cc1aa28 100644
--- a/scripts/prepare.sh
+++ b/scripts/prepare.sh
@@ -255,15 +255,15 @@
function _flavors() {
# huge paged flavors
if [ "$huge_pages" = true ]; then
- echo flavor create --id 1 --ram 64 --disk 1 --vcpus 1 ${flavor_t} --property hw:mem_page_size=large >>${cmds}
- echo flavor create --id 2 --ram 256 --disk 2 --vcpus 1 ${flavor_s} --property hw:mem_page_size=large >>${cmds}
- echo flavor create --id 3 --ram 2048 --disk 10 --vcpus 2 ${flavor_m} --property hw:mem_page_size=large >>${cmds}
- echo flavor create --id 4 --ram 2048 --disk 20 --vcpus 4 ${flavor_h} --property hw:mem_page_size=large >>${cmds}
+ echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} --property hw:mem_page_size=large >>${cmds}
+ echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} --property hw:mem_page_size=large >>${cmds}
+ echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} --property hw:mem_page_size=large >>${cmds}
+ echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} --property hw:mem_page_size=large >>${cmds}
else
- echo flavor create --id 1 --ram 64 --disk 1 --vcpus 1 ${flavor_t} >>${cmds}
- echo flavor create --id 2 --ram 256 --disk 2 --vcpus 1 ${flavor_s} >>${cmds}
- echo flavor create --id 3 --ram 2048 --disk 10 --vcpus 2 ${flavor_m} >>${cmds}
- echo flavor create --id 4 --ram 2048 --disk 20 --vcpus 4 ${flavor_h} >>${cmds}
+ echo flavor create --id 1 --ram 256 --disk 5 --vcpus 1 ${flavor_t} >>${cmds}
+ echo flavor create --id 2 --ram 512 --disk 10 --vcpus 2 ${flavor_s} >>${cmds}
+ echo flavor create --id 3 --ram 2048 --disk 20 --vcpus 4 ${flavor_m} >>${cmds}
+ echo flavor create --id 4 --ram 4096 --disk 30 --vcpus 6 ${flavor_h} >>${cmds}
fi
}
diff --git a/scripts/svc-stress/internal.example b/scripts/svc-stress/internal.example
new file mode 100644
index 0000000..fd284f6
--- /dev/null
+++ b/scripts/svc-stress/internal.example
@@ -0,0 +1,17 @@
+http://designate-api.openstack.svc.cluster.local:9001/
+http://octavia-api.openstack.svc.cluster.local:9876
+http://cinder-api.openstack.svc.cluster.local:8776/v3/
+http://barbican-api.openstack.svc.cluster.local:9311/
+http://neutron-server.openstack.svc.cluster.local:9696
+http://ironic-api.openstack.svc.cluster.local:6385
+http://heat-api.openstack.svc.cluster.local:8004/v1/
+http://gnocchi-api.openstack.svc.cluster.local:8041
+http://keystone-api.openstack.svc.cluster.local:5000/v3
+http://masakari-api.openstack.svc.cluster.local:15868/v1
+http://placement-api.openstack.svc.cluster.local:8778/
+https://rook-ceph-rgw-rgw-store.rook-ceph.svc:8443/swift/info
+http://aodh-api.openstack.svc.cluster.local:8042
+http://heat-cfn.openstack.svc.cluster.local:8000/v1
+http://glance-api.openstack.svc.cluster.local:9292
+http://nova-api.openstack.svc.cluster.local:8774/v2.1/flavors
+http://cinder-api.openstack.svc.cluster.local:8776/v2/
diff --git a/scripts/svc-stress/public.example b/scripts/svc-stress/public.example
new file mode 100644
index 0000000..b5a5626
--- /dev/null
+++ b/scripts/svc-stress/public.example
@@ -0,0 +1,17 @@
+https://cinder.mvp-dev.sdscloud.com/v3
+https://aodh.mvp-dev.sdscloud.com
+https://glance.mvp-dev.sdscloud.com
+https://gnocchi.mvp-dev.sdscloud.com
+https://barbican.mvp-dev.sdscloud.com/
+https://keystone.mvp-dev.sdscloud.com/v3
+https://designate.mvp-dev.sdscloud.com/
+https://placement.mvp-dev.sdscloud.com/
+https://cinder.mvp-dev.sdscloud.com/v2
+https://octavia.mvp-dev.sdscloud.com
+https://nova.mvp-dev.sdscloud.com/v2.1/flavors
+https://neutron.mvp-dev.sdscloud.com
+https://heat.mvp-dev.sdscloud.com/v1/
+https://cloudformation.mvp-dev.sdscloud.com/v1
+https://rgw-store.mvp-dev.sdscloud.com/swift/info
+https://masakari.mvp-dev.sdscloud.com/v1
+https://ironic.mvp-dev.sdscloud.com
diff --git a/scripts/svc-stress/public.list b/scripts/svc-stress/public.list
deleted file mode 100644
index 8759ef3..0000000
--- a/scripts/svc-stress/public.list
+++ /dev/null
@@ -1,11 +0,0 @@
-https://nova.nc4.iad0.netskope.com/v2.1/flavors
-https://designate.nc4.iad0.netskope.com/
-https://octavia.nc4.iad0.netskope.com
-https://placement.nc4.iad0.netskope.com/
-https://cloudformation.nc4.iad0.netskope.com/v1
-https://keystone.nc4.iad0.netskope.com/v3
-https://neutron.nc4.iad0.netskope.com
-https://cinder.nc4.iad0.netskope.com/v3/
-https://rgw-store.nc4.iad0.netskope.com/swift/info
-https://glance.nc4.iad0.netskope.com
-https://barbican.nc4.iad0.netskope.com/
diff --git a/scripts/svc-stress/svc-stress.sh b/scripts/svc-stress/svc-stress.sh
index 9365265..8ae9f38 100644
--- a/scripts/svc-stress/svc-stress.sh
+++ b/scripts/svc-stress/svc-stress.sh
@@ -7,21 +7,21 @@
export project_id=$(openstack project list -c ID -c Name -f value | grep ${OS_PROJECT_NAME} | cut -d' ' -f1)
echo "# Exported project_id: ${project_id}"
fi
-poke_uri=$(echo ${1/project_id/$project_id})
+#poke_uri=$(echo ${1/project_id/$project_id})
function ppoke {
-rr=$(curl --insecure -sH "X-Auth-Token: ${token}" $1)
+rr=$(curl -sSH "X-Auth-Token: ${token}" $1 2>&1)
if [[ $? != 0 ]]; then
- echo "[$(date +'%H:%M:%S')] Error: $rr"
+ printf "[$(date +'%H:%M:%S')] -> $1\nError: $rr\n\n"
else
- echo "[$(date +'%H:%M:%S')] -> '$1', $(echo $rr | wc -c) bytes"
+ printf "[$(date +'%H:%M:%S')] -> '$1', $(echo $rr | wc -c) bytes\n"
fi
}
-cc=50;
+cc=${2};
while [[ $cc -gt 0 ]]; do
cat $1 | while read svc; do
- ppoke $svc | grep "Error";
+ ppoke $svc;
done
(( cc -= 1 ));
echo "$cc to go";