From 31abe8bc59d5ce2eed2269f12703ce575d2560db Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Wed, 15 Feb 2017 11:50:55 +0800 Subject: Add Open-O docker tag 1. support designate open-o image tag in conf/openo-vm.yml 2. add ubuntu image 12.04 Change-Id: If96a482eb12bc37799885bc290581257fe0c6817 Signed-off-by: Harry Huang --- conf/download.conf | 3 +- conf/openo-vm.yml | 1 + open-o/openo_docker.sh | 80 +++++++++++++++++++++++++------------------------- open-o/openo_vm.sh | 3 +- process_conf.py | 1 + 5 files changed, 46 insertions(+), 42 deletions(-) diff --git a/conf/download.conf b/conf/download.conf index 1012601..4c2d70d 100644 --- a/conf/download.conf +++ b/conf/download.conf @@ -2,4 +2,5 @@ OPENO_VM_ISO_URL=http://205.177.226.237:9999/CentOS-7-x86_64-Minimal-1511.iso JUJU_IMG_NAME=(xenial_x86_64 trusty_x86_x64) JUJU_IMG_URL=(http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \ - http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img) + http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \ + http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img) diff --git a/conf/openo-vm.yml b/conf/openo-vm.yml index 0ce2152..25badad 100644 --- a/conf/openo-vm.yml +++ b/conf/openo-vm.yml @@ -8,6 +8,7 @@ ############################################################################## --- openo: + tag: 1.0.0 cpu: 4 memory: 64 disk: 100 diff --git a/open-o/openo_docker.sh b/open-o/openo_docker.sh index aa79a9d..a8b6e01 100755 --- a/open-o/openo_docker.sh +++ b/open-o/openo_docker.sh @@ -9,163 +9,163 @@ ############################################################################## function docker_pull() { - until docker pull openoint/sdno-driver-ct-te + until docker pull openoint/sdno-driver-ct-te:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-auth + until docker pull openoint/common-services-auth:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-drivermanager + until docker pull openoint/common-services-drivermanager:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-extsys + until docker pull openoint/common-services-extsys:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-msb + until docker pull openoint/common-services-msb:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-protocolstack + until docker pull openoint/common-services-protocolstack:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-services-wso2ext + until docker pull openoint/common-services-wso2ext:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-tosca-catalog + until docker pull openoint/common-tosca-catalog:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-tosca-inventory + until docker pull openoint/common-tosca-inventory:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-tosca-modeldesigner + until docker pull openoint/common-tosca-modeldesigner:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/gso-service-gateway + until docker pull openoint/gso-service-gateway:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/gso-service-manager + until docker pull openoint/gso-service-manager:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-dac + until docker pull openoint/nfvo-dac:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-driver-sdnc-zte + until docker pull openoint/nfvo-driver-sdnc-zte:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-driver-vim + until docker pull openoint/nfvo-driver-vim:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-driver-vnfm-huawei + until docker pull openoint/nfvo-driver-vnfm-huawei:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-driver-vnfm-juju + until docker pull openoint/nfvo-driver-vnfm-juju:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-driver-vnfm-zte + until docker pull openoint/nfvo-driver-vnfm-zte:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-lcm + until docker pull openoint/nfvo-lcm:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-resmanagement + until docker pull openoint/nfvo-resmanagement:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/nfvo-umc + until docker pull openoint/nfvo-umc:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-driver-huawei-l3vpn + until docker pull openoint/sdno-driver-huawei-l3vpn:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-driver-huawei-openstack + until docker pull openoint/sdno-driver-huawei-openstack:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-driver-huawei-overlay + until docker pull openoint/sdno-driver-huawei-overlay:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-driver-huawei-servicechain + until docker pull openoint/sdno-driver-huawei-servicechain:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-driver-zte-sptn + until docker pull openoint/sdno-driver-zte-sptn:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-brs + until docker pull openoint/sdno-service-brs:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-ipsec + until docker pull openoint/sdno-service-ipsec:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-l2vpn + until docker pull openoint/sdno-service-l2vpn:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-l3vpn + until docker pull openoint/sdno-service-l3vpn:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-mss + until docker pull openoint/sdno-service-mss:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-nslcm + until docker pull openoint/sdno-service-nslcm:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-overlayvpn + until docker pull openoint/sdno-service-overlayvpn:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-servicechain + until docker pull openoint/sdno-service-servicechain:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-vpc + until docker pull openoint/sdno-service-vpc:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-service-vxlan + until docker pull openoint/sdno-service-vxlan:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/common-tosca-aria + until docker pull openoint/common-tosca-aria:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-monitoring + until docker pull openoint/sdno-monitoring:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/sdno-vsitemgr + until docker pull openoint/sdno-vsitemgr:REPLACE_OPENO_TAG do echo "Try again" done - until docker pull openoint/gso-gui-portal + until docker pull openoint/gso-gui-portal:REPLACE_OPENO_TAG do echo "Try again" done diff --git a/open-o/openo_vm.sh b/open-o/openo_vm.sh index 0d7d289..dc227e2 100755 --- a/open-o/openo_vm.sh +++ b/open-o/openo_vm.sh @@ -25,7 +25,8 @@ function openo_download_iso() function openo_docker_prepare() { cp $OPENO_DIR/openo_docker.sh ${OPENO_VM_DIR}/ - sed -i -e "s#OPENO_EXTERNAL_CIDR#$OPENO_EXTERNAL_CIDR#g" \ + sed -i -e "s#REPLACE_OPENO_TAG#$OPENO_TAG#g" \ + -e "s#OPENO_EXTERNAL_CIDR#$OPENO_EXTERNAL_CIDR#g" \ -e "s/OPENO_EXTERNAL_GW/$OPENO_EXTERNAL_GW/g" \ -e "s/COMMON_SERVICES_AUTH_IP/$COMMON_SERVICES_AUTH_IP/g" \ -e "s/COMMON_SERVICES_DRIVERMANAGER_IP/$COMMON_SERVICES_DRIVERMANAGER_IP/g" \ diff --git a/process_conf.py b/process_conf.py index 7693396..a28f809 100644 --- a/process_conf.py +++ b/process_conf.py @@ -18,6 +18,7 @@ def generate_vm_conf(vm_config, scripts_dir): """generate opera/work/scripts_dir/openo-vm.conf""" print vm_config["openo"]["cpu"] with open(scripts_dir + "/openo-vm.conf", "w") as fd: + fd.write("OPENO_TAG=" + str(vm_config["openo"]["tag"]) + "\n") fd.write("OPENO_VIRT_CPUS=" + str(vm_config["openo"]["cpu"]) + "\n") fd.write("OPENO_VIRT_MEM=" + str(vm_config["openo"]["memory"]) + "\n") fd.write("OPENO_VIRT_DISK=" + str(vm_config["openo"]["disk"]) + "\n") -- cgit 1.2.3-korg