Add installation steps for Ceph one-node cluster
Add steps to install Ceph one-node cluster over virtlet
installation to be able to test Ceph related virtlet features.
Change-Id: Ic9e531a69fcb52d7360fcf089312fa1913350e0b
Reviewed-on: https://review.gerrithub.io/362388
Reviewed-by: Tatyanka Leontovich <tleontovich@mirantis.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-calico/virtlet_ceph.yaml b/tcp_tests/templates/virtual-mcp11-k8s-calico/virtlet_ceph.yaml
new file mode 100644
index 0000000..3f2468e
--- /dev/null
+++ b/tcp_tests/templates/virtual-mcp11-k8s-calico/virtlet_ceph.yaml
@@ -0,0 +1,31 @@
+{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CTL02 with context %}
+
+# Clone virtlet project from git to the ctl02 node to get ceph scripts
+- description: Cloning virtlet project on ctl02
+ cmd: |
+ if [[ ! -d virtlet ]]; then
+ git clone -b master https://github.com/Mirantis/virtlet.git;
+ else
+ echo "Virtlet project already present on node";
+ fi
+ node_name: {{ HOSTNAME_CTL02 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
+# Make run_ceph.sh runnable
+- description: Set monitor ip for ceph
+ cmd: |
+ NODE_IP=$(ifconfig | grep -A 1 ens3 | tail -n +2 | awk '{print $2}' | sed 's/addr://g')
+ sed -i "0,/MON_IP=.*/s//MON_IP=${NODE_IP}/" virtlet/tests/e2e/run_ceph.sh
+ node_name: {{ HOSTNAME_CTL02 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
+# Run Ceph in docker
+- description: Start Ceph container
+ cmd: |
+ SCR_DIR=$(realpath virtlet/tests/e2e)
+ virtlet/tests/e2e/run_ceph.sh ${SCR_DIR}
+ node_name: {{ HOSTNAME_CTL02 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
\ No newline at end of file