diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-02-23 09:49:58 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-02-23 09:49:58 +0100 |
commit | fc5bccf4d29cd4bf705e3938fc189be686083f41 (patch) | |
tree | d00dde3243ca941bd0b4db941fb7301e5337a582 | |
parent | 2f32efb093c1f016b006019dc7c7f300072f7620 (diff) |
Stop downloading Cloudify container
It selects the Docker image archive as proposed by Cloudify.
Change-Id: I88b5333625a8d2cab140291552c1c8ca5bac3a36
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/ci/download_images.sh | 1 | ||||
-rw-r--r-- | functest/core/cloudify.py | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/functest/ci/download_images.sh b/functest/ci/download_images.sh index 366699d7d..8ffa9677e 100644 --- a/functest/ci/download_images.sh +++ b/functest/ci/download_images.sh @@ -13,6 +13,7 @@ https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloud http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-aarch64-disk.img https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-arm64-uefi1.img http://cloud.centos.org/altarch/7/images/aarch64/CentOS-7-aarch64-GenericCloud.qcow2.xz +http://repository.cloudifysource.org/cloudify/19.01.24/community-release/cloudify-docker-manager-community-19.01.24.tar https://sourceforge.net/projects/ool-opnfv/files/vyos-1.1.7.img http://testresults.opnfv.org/functest/shaker-image.qcow2 http://testresults.opnfv.org/functest/shaker-image-arm64.qcow2 diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py index 73620241a..c5613cab5 100644 --- a/functest/core/cloudify.py +++ b/functest/core/cloudify.py @@ -12,11 +12,13 @@ from __future__ import division import logging +import os import time import traceback from cloudify_rest_client import CloudifyClient from cloudify_rest_client.executions import Execution +import scp from functest.core import singlevm @@ -36,7 +38,9 @@ class Cloudify(singlevm.SingleVm2): create_server_timeout = 600 ports = [80, 443, 5671, 53333] - cloudify_container = "cloudifyplatform/community:19.01.24" + cloudify_archive = ('/home/opnfv/functest/images/' + 'cloudify-docker-manager-community-19.01.24.tar') + cloudify_container = "docker-cfy-manager:latest" def __init__(self, **kwargs): """Initialize Cloudify testcase object.""" @@ -56,14 +60,19 @@ class Cloudify(singlevm.SingleVm2): """ Deploy Cloudify Manager. """ + scpc = scp.SCPClient(self.ssh.get_transport()) + scpc.put(self.cloudify_archive, + remote_path=os.path.basename(self.cloudify_archive)) (_, stdout, stderr) = self.ssh.exec_command( "sudo wget https://get.docker.com/ -O script.sh && " "sudo chmod +x script.sh && " "sudo ./script.sh && " + "sudo docker load -i ~/{} && " "sudo docker run --name cfy_manager_local -d " "--restart unless-stopped -v /sys/fs/cgroup:/sys/fs/cgroup:ro " "--tmpfs /run --tmpfs /run/lock --security-opt seccomp:unconfined " "--cap-add SYS_ADMIN --network=host {}".format( + os.path.basename(self.cloudify_archive), self.cloudify_container)) self.__logger.debug("output:\n%s", stdout.read()) self.__logger.debug("error:\n%s", stderr.read()) |