From fcaf06abdd27a3a6ef18de14ce3d1dab2c75a8c9 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Thu, 12 Oct 2017 09:06:58 +0000 Subject: CSIT-841 Optimize creating of vnf-agent docker image Part I - Optimize building of prod_vpp_agent docker image by using dev_vpp_agent docker image pulled from dockerhub/ligato instead of building on slave. - Add detailed logs from every POD deployed in namespace. - Hardening condition for considering PODs Running. Change-Id: I9f771d6365d38fef2ec2e00ab642853e6a44ad03 Signed-off-by: Peter Mikus --- resources/tools/scripts/topo_container_copy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'resources/tools/scripts') diff --git a/resources/tools/scripts/topo_container_copy.py b/resources/tools/scripts/topo_container_copy.py index d243182236..088b7a4386 100644 --- a/resources/tools/scripts/topo_container_copy.py +++ b/resources/tools/scripts/topo_container_copy.py @@ -122,11 +122,16 @@ def main(): ssh.scp(local_path=image, remote_path=directory) # Load image to Docker. - cmd = "for f in {directory}/*.tar.gz; do zcat $f | "\ - "sudo docker load; done".format(directory=directory) + cmd = "for f in {directory}/*.tar.gz; do "\ + "sudo docker load -i $f; done".format(directory=directory) stdout = ssh_no_error(ssh, cmd) print("###TI {}".format(stdout)) + # Remove images from Docker. + cmd = "docker rmi $(sudo docker images -f 'dangling=true' -q)" + stdout = ssh_no_error(ssh, cmd, sudo=True) + print("###TI {}".format(stdout)) + if __name__ == "__main__": sys.exit(main()) -- cgit 1.2.3-korg