summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorCristina Pauna <cristina.pauna@enea.com>2017-02-16 12:22:21 +0200
committerCristina Pauna <cristina.pauna@enea.com>2017-02-27 17:04:04 +0200
commitadbcb25389612d86d446d5f34787b1b2519c3b83 (patch)
tree2835532d04d2fde90819e2e8752e872be5dc1b60 /docker
parentcbcf4f5b8805cc6a052fdf190e1cade2d75c02e0 (diff)
Add aarch64 custom config
In order to run functest on an aarch64 POD, some custom configuration is needed. Up until now that custom configuration was put on the arm jenkins slave. With this commit it is integrated in functest project. 1. In order to identify if the POD is aarch64 or x86 function get_arch() from https://gerrit.opnfv.org/gerrit/#/c/29099 is used 2. Changes to config_functest.yaml are made via a new patch file config_aarch64_patch.yaml which is applied for all scenarios. Function patch_config_file() is modified to be more generic. It now receives a file as parameter and merges any type of patch file 3. The aarch64 cirros images are downloaded into the data directory. Functest can be run from both an aarch64 or a x86 jenkins slave in order to test an aarch64 POD. So the images are downloded in both dockerfiles 4. Other custom config needs to be added to /etc/rally/rally.conf in the docker. The custom config is set in rally_aarch64_patch.conf and inserted in the needed file before the rally environment is set up JIRA: ARMBAND-60 Change-Id: I8e460cdf02d297c259cbbd9c05e7983367fd2bb9 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile4
-rw-r--r--docker/Dockerfile.aarch642
-rwxr-xr-xdocker/add_images.sh17
3 files changed, 20 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 1187fb95f..de47e157a 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -123,9 +123,7 @@ RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN ${REPOS_DIR}/rally/install_rally.sh --yes
-ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img ${FUNCTEST_BASE_DIR}/data/
-ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz ${FUNCTEST_BASE_DIR}/data/
-ADD http://205.177.226.237:9999/onosfw/firewall_block_image.img ${FUNCTEST_BASE_DIR}/data/
+RUN /bin/bash ${REPOS_DIR}/functest/docker/add_images.sh
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN curl -L https://get.rvm.io | bash -s stable
diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64
index bf8e361f0..a469801f3 100644
--- a/docker/Dockerfile.aarch64
+++ b/docker/Dockerfile.aarch64
@@ -117,6 +117,8 @@ RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \
RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR}
RUN ${REPOS_DIR}/rally/install_rally.sh --yes
+RUN /bin/bash ${REPOS_DIR}/functest/docker/add_images.sh
+
RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN curl -L https://get.rvm.io | bash -s stable
diff --git a/docker/add_images.sh b/docker/add_images.sh
new file mode 100755
index 000000000..a43e0ba45
--- /dev/null
+++ b/docker/add_images.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# This script downloads the images that are used for testing
+# and places them in the functest docker image
+
+CIRROS_REPO_URL=http://download.cirros-cloud.net
+CIRROS_AARCH64_TAG=daily/20161201
+CIRROS_X86_64_TAG=0.3.5
+
+wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-disk.img
+wget ${CIRROS_REPO_URL}/${CIRROS_X86_64_TAG}/cirros-${CIRROS_X86_64_TAG}-x86_64-lxc.tar.gz -P ${FUNCTEST_BASE_DIR}/data/
+wget http://205.177.226.237:9999/onosfw/firewall_block_image.img -P ${FUNCTEST_BASE_DIR}/data/
+
+# Add the 3-part image for aarch64, since functest can be run from an x86 machine to test an aarch64 POD
+wget ${CIRROS_REPO_URL}/daily/${CIRROS_AARCH64_TAG}/cirros-$(basename ${CIRROS_AARCH64_TAG})-aarch64-disk.img -P ${FUNCTEST_BASE_DIR}/data/
+wget ${CIRROS_REPO_URL}/daily/${CIRROS_AARCH64_TAG}/cirros-$(basename ${CIRROS_AARCH64_TAG})-aarch64-initramfs -P ${FUNCTEST_BASE_DIR}/data/
+wget ${CIRROS_REPO_URL}/daily/${CIRROS_AARCH64_TAG}/cirros-$(basename ${CIRROS_AARCH64_TAG})-aarch64-kernel -P ${FUNCTEST_BASE_DIR}/data/