summaryrefslogtreecommitdiffstats
path: root/open-o
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-03-13 18:10:12 +0800
committerYingjun Li <yingjun.li@huawei.com>2017-03-16 05:58:41 +0000
commit6d809ad2460235ff8bc800a6e630c258df785cae (patch)
tree6289c0ffeea3076512d07b06cdd3eb01a7bd2025 /open-o
parent3ad87b8a162fad9ad55807233db7a27fcc493756 (diff)
independent network for opera
1. launch open-o dockers directly on jump host instead of a vm 2. launch only one juju vm has both client and metadata function 3. add clearwater csar packages into opera repo 4. automatically deploy clearwater when key application in conf/application.yml has value clearwater 5. support keystone v3 Change-Id: Ic59f66d2cededf661aa7f6de2a40836ea40d8887 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com> (cherry picked from commit cd0feb45a414980fdd7249c9cc4fc28a1213c769)
Diffstat (limited to 'open-o')
-rwxr-xr-xopen-o/openo_docker.sh189
-rwxr-xr-xopen-o/openo_vm.sh201
2 files changed, 99 insertions, 291 deletions
diff --git a/open-o/openo_docker.sh b/open-o/openo_docker.sh
index 2bee04b..8a4a382 100755
--- a/open-o/openo_docker.sh
+++ b/open-o/openo_docker.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -ex
##############################################################################
# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
@@ -9,67 +9,67 @@
##############################################################################
function docker_pull()
{
- until docker pull openoint/sdno-driver-ct-te:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-ct-te:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-auth:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-auth:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-drivermanager:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-drivermanager:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-extsys:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-extsys:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-msb:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-msb:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-protocolstack:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-protocolstack:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-services-wso2ext:REPLACE_OPENO_TAG
+ until docker pull openoint/common-services-wso2ext:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-tosca-catalog:REPLACE_OPENO_TAG
+ until docker pull openoint/common-tosca-catalog:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-tosca-inventory:REPLACE_OPENO_TAG
+ until docker pull openoint/common-tosca-inventory:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-tosca-modeldesigner:REPLACE_OPENO_TAG
+ until docker pull openoint/common-tosca-modeldesigner:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/gso-service-gateway:REPLACE_OPENO_TAG
+ until docker pull openoint/gso-service-gateway:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/gso-service-manager:REPLACE_OPENO_TAG
+ until docker pull openoint/gso-service-manager:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-dac:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-dac:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-driver-sdnc-zte:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-driver-sdnc-zte:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-driver-vim:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-driver-vim:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-driver-vnfm-huawei:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-driver-vnfm-huawei:$OPENO_VERSION
do
echo "Try again"
done
@@ -77,95 +77,95 @@ function docker_pull()
do
echo "Try again"
done
- until docker pull openoint/nfvo-driver-vnfm-zte:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-driver-vnfm-zte:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-lcm:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-lcm:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-resmanagement:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-resmanagement:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/nfvo-umc:REPLACE_OPENO_TAG
+ until docker pull openoint/nfvo-umc:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-driver-huawei-l3vpn:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-huawei-l3vpn:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-driver-huawei-openstack:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-huawei-openstack:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-driver-huawei-overlay:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-huawei-overlay:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-driver-huawei-servicechain:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-huawei-servicechain:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-driver-zte-sptn:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-driver-zte-sptn:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-brs:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-brs:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-ipsec:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-ipsec:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-l2vpn:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-l2vpn:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-l3vpn:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-l3vpn:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-mss:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-mss:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-nslcm:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-nslcm:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-overlayvpn:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-overlayvpn:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-servicechain:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-servicechain:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-vpc:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-vpc:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-service-vxlan:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-service-vxlan:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/common-tosca-aria:REPLACE_OPENO_TAG
+ until docker pull openoint/common-tosca-aria:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-monitoring:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-monitoring:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/sdno-vsitemgr:REPLACE_OPENO_TAG
+ until docker pull openoint/sdno-vsitemgr:$OPENO_VERSION
do
echo "Try again"
done
- until docker pull openoint/gso-gui-portal:REPLACE_OPENO_TAG
+ until docker pull openoint/gso-gui-portal:$OPENO_VERSION
do
echo "Try again"
done
@@ -173,57 +173,66 @@ function docker_pull()
function docker_run()
{
- docker run -d -e MODEL_DESIGNER_IP=COMMON_TOSCA_MODELDESIGNER_IP --network lab_net --ip COMMON_SERVICES_MSB_IP --name common-services-msb openoint/common-services-msb:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --add-host controller:127.0.0.1 --network lab_net --ip COMMON_SERVICES_AUTH_IP --name common-services-auth openoint/common-services-auth:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_SERVICES_DRIVERMANAGER_IP --name common-services-drivermanager openoint/common-services-drivermanager:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_SERVICES_EXTSYS_IP --name common-services-extsys openoint/common-services-extsys:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_SERVICES_PROTOCOLSTACK_IP --name common-services-protocolstack openoint/common-services-protocolstack:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_SERVICES_WSO2EXT_IP --name common-services-wso2ext openoint/common-services-wso2ext:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_TOSCA_CATALOG_IP --name common-tosca-catalog openoint/common-tosca-catalog:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_TOSCA_INVENTORY_IP --name common-tosca-inventory openoint/common-tosca-inventory:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_TOSCA_MODELDESIGNER_IP --name common-tosca-modeldesigner openoint/common-tosca-modeldesigner:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip GSO_SERVICE_GATEWAY_IP --name gso-service-gateway openoint/gso-service-gateway:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 -e MYSQL_ADDR=COMMON_TOSCA_INVENTORY_IP:3306 --network lab_net --ip GSO_SERVICE_MANAGER_IP --name gso-service-manager openoint/gso-service-manager:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DAC_IP --name nfvo-dac openoint/nfvo-dac:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DRIVER_SDNC_ZTE_IP --name nfvo-driver-sdnc-zte openoint/nfvo-driver-sdnc-zte:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DRIVER_VIM_IP --name nfvo-driver-vim openoint/nfvo-driver-vim:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DRIVER_VNFM_HUAWEI_IP --name nfvo-driver-vnfm-huawei openoint/nfvo-driver-vnfm-huawei:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DRIVER_VNFM_JUJU_IP --name nfvo-driver-vnfm-juju openoint/nfvo-driver-vnfm-juju
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_DRIVER_VNFM_ZTE_IP --name nfvo-driver-vnfm-zte openoint/nfvo-driver-vnfm-zte:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 -e MYSQL_ADDR=COMMON_TOSCA_INVENTORY_IP:3306 --network lab_net --ip NFVO_LCM_IP --name nfvo-lcm openoint/nfvo-lcm:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_RESMANAGEMENT_IP --name nfvo-resmanagement openoint/nfvo-resmanagement:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip NFVO_UMC_IP --name nfvo-umc openoint/nfvo-umc:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_HUAWEI_L3VPN_IP --name sdno-driver-huawei-l3vpn openoint/sdno-driver-huawei-l3vpn:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_HUAWEI_OPENSTACK_IP --name sdno-driver-huawei-openstack openoint/sdno-driver-huawei-openstack:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_HUAWEI_OVERLAY_IP --name sdno-driver-huawei-overlay openoint/sdno-driver-huawei-overlay:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_HUAWEI_SERVICECHAIN_IP --name sdno-driver-huawei-servicechain openoint/sdno-driver-huawei-servicechain:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_ZTE_SPTN_IP --name sdno-driver-zte-sptn openoint/sdno-driver-zte-sptn:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_BRS_IP --name sdno-service-brs openoint/sdno-service-brs:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_IPSEC_IP --name sdno-service-ipsec openoint/sdno-service-ipsec:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_L2VPN_IP --name sdno-service-l2vpn openoint/sdno-service-l2vpn:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_L3VPN_IP --name sdno-service-l3vpn openoint/sdno-service-l3vpn:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_MSS_IP --name sdno-service-mss openoint/sdno-service-mss:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 -e MYSQL_ADDR=COMMON_TOSCA_INVENTORY_IP:3306 --network lab_net --ip SDNO_SERVICE_NSLCM_IP --name sdno-service-nslcm openoint/sdno-service-nslcm:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_OVERLAYVPN_IP --name sdno-service-overlayvpn openoint/sdno-service-overlayvpn:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_SERVICECHAIN_IP --name sdno-service-servicechain openoint/sdno-service-servicechain:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_VPC_IP --name sdno-service-vpc openoint/sdno-service-vpc:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_SERVICE_VXLAN_IP --name sdno-service-vxlan openoint/sdno-service-vxlan:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip COMMON_TOSCA_ARIA_IP --name common-tosca-aria openoint/common-tosca-aria:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_DRIVER_CT_TE_IP --name sdno-driver-ct-te openoint/sdno-driver-ct-te:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_MONITORING_IP --name sdno-monitoring openoint/sdno-monitoring:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip SDNO_VSITEMGR_IP --name sdno-vsitemgr openoint/sdno-vsitemgr:REPLACE_OPENO_TAG
- docker run -d -e MSB_ADDR=COMMON_SERVICES_MSB_IP:80 --network lab_net --ip GSO_GUI_PORTAL_IP --name gso-gui-portal openoint/gso-gui-portal:REPLACE_OPENO_TAG
+ OPENO_VERSION=${OPENO_VERSION:-"1.0.0"}
+ msb_ip=$OPENO_IP:$COMMON_SERVICES_MSB_PORT
+
+ docker run -d --name common-services-msb -p $OPENO_IP:$COMMON_SERVICES_MSB_PORT:80 openoint/common-services-msb:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --add-host controller:127.0.0.1 --name common-services-auth openoint/common-services-auth:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-services-drivermanager openoint/common-services-drivermanager:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-services-extsys openoint/common-services-extsys:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-services-protocolstack openoint/common-services-protocolstack:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-services-wso2ext openoint/common-services-wso2ext:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-tosca-catalog openoint/common-tosca-catalog:$OPENO_VERSION
+ tosca_inventory_id=$(docker run -d -e MSB_ADDR=$msb_ip --name common-tosca-inventory openoint/common-tosca-inventory:$OPENO_VERSION)
+ tosca_inventory_ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $tosca_inventory_id)
+ docker run -d -e MSB_ADDR=$msb_ip --name common-tosca-modeldesigner openoint/common-tosca-modeldesigner:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name gso-service-gateway openoint/gso-service-gateway:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip -e MYSQL_ADDR=$tosca_inventory_ip:3306 --name gso-service-manager openoint/gso-service-manager:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-dac openoint/nfvo-dac:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-sdnc-zte openoint/nfvo-driver-sdnc-zte:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vim openoint/nfvo-driver-vim:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-huawei openoint/nfvo-driver-vnfm-huawei:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-juju -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_PORT:8483 -p $OPENO_IP:$NFVO_DRIVER_VNFM_JUJU_MYSQL_PORT:3306 openoint/nfvo-driver-vnfm-juju
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-driver-vnfm-zte openoint/nfvo-driver-vnfm-zte:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip -e MYSQL_ADDR=$tosca_inventory_ip:3306 --name nfvo-lcm -p $OPENO_IP:8403:8403 openoint/nfvo-lcm:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-resmanagement openoint/nfvo-resmanagement:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name nfvo-umc openoint/nfvo-umc:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-huawei-l3vpn openoint/sdno-driver-huawei-l3vpn:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-huawei-openstack openoint/sdno-driver-huawei-openstack:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-huawei-overlay openoint/sdno-driver-huawei-overlay:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-huawei-servicechain openoint/sdno-driver-huawei-servicechain:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-zte-sptn openoint/sdno-driver-zte-sptn:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-brs openoint/sdno-service-brs:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-ipsec openoint/sdno-service-ipsec:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-l2vpn openoint/sdno-service-l2vpn:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-l3vpn openoint/sdno-service-l3vpn:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-mss openoint/sdno-service-mss:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip -e MYSQL_ADDR=$tosca_inventory_ip:3306 --name sdno-service-nslcm openoint/sdno-service-nslcm:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-overlayvpn openoint/sdno-service-overlayvpn:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-servicechain openoint/sdno-service-servicechain:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-vpc openoint/sdno-service-vpc:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-service-vxlan openoint/sdno-service-vxlan:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name common-tosca-aria -p $OPENO_IP:$COMMON_TOSCA_ARIA_PORT:8204 openoint/common-tosca-aria:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-driver-ct-te openoint/sdno-driver-ct-te:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-monitoring openoint/sdno-monitoring:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name sdno-vsitemgr openoint/sdno-vsitemgr:$OPENO_VERSION
+ docker run -d -e MSB_ADDR=$msb_ip --name gso-gui-portal openoint/gso-gui-portal:$OPENO_VERSION
+}
+
+function clean() {
+ docker ps -a | grep openoint | awk '{print $1}' | xargs docker rm -f || true
}
-yum update -y
-yum install -y curl net-tools
-curl -sSL https://experimental.docker.com/ | sh
-service docker start
-docker network create -d macvlan --subnet=OPENO_EXTERNAL_CIDR --gateway=OPENO_EXTERNAL_GW -o parent=eth0 lab_net
-docker_pull
-docker_run
+function launch_openo() {
+ log_info "launch_openo enter"
+
+ docker_pull
+ clean
+ docker_run
+
+ if [[ $(docker ps -q | grep openoint | wc -l) == 40 ]];then
+ echo -e "\n\033[32mOpen-O launch success\033[0m\n"
+ fi
+}
-if [[ $(docker ps -aq | wc -l) == 40 ]];then
- echo -e "\n\033[32mOpen-O Installed!\033[0m\n"
-fi
diff --git a/open-o/openo_vm.sh b/open-o/openo_vm.sh
deleted file mode 100755
index fdce33a..0000000
--- a/open-o/openo_vm.sh
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-OPENO_VM_ISO=${OPENO_VM_ISO_URL##*/}
-OPENO_VM_DIR=${WORK_DIR}/openo_vm
-
-function openo_download_iso()
-{
- local ISO_DIR=${WORK_DIR}/iso
- mkdir -p $ISO_DIR
- if [ ! -e ${ISO_DIR}/${OPENO_VM_ISO} ];then
- wget -O ${ISO_DIR}/${OPENO_VM_ISO} $OPENO_VM_ISO_URL
- fi
-}
-
-function openo_docker_prepare()
-{
- cp $OPENO_DIR/openo_docker.sh ${OPENO_VM_DIR}/
- 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" \
- -e "s/COMMON_SERVICES_EXTSYS_IP/$COMMON_SERVICES_EXTSYS_IP/g" \
- -e "s/COMMON_SERVICES_MSB_IP/$COMMON_SERVICES_MSB_IP/g" \
- -e "s/COMMON_SERVICES_PROTOCOLSTACK_IP/$COMMON_SERVICES_PROTOCOLSTACK_IP/g" \
- -e "s/COMMON_SERVICES_WSO2EXT_IP/$COMMON_SERVICES_WSO2EXT_IP/g" \
- -e "s/COMMON_TOSCA_CATALOG_IP/$COMMON_TOSCA_CATALOG_IP/g" \
- -e "s/COMMON_TOSCA_INVENTORY_IP/$COMMON_TOSCA_INVENTORY_IP/g" \
- -e "s/COMMON_TOSCA_MODELDESIGNER_IP/$COMMON_TOSCA_MODELDESIGNER_IP/g" \
- -e "s/GSO_SERVICE_GATEWAY_IP/$GSO_SERVICE_GATEWAY_IP/g" \
- -e "s/GSO_SERVICE_MANAGER_IP/$GSO_SERVICE_MANAGER_IP/g" \
- -e "s/NFVO_DAC_IP/$NFVO_DAC_IP/g" \
- -e "s/NFVO_DRIVER_SDNC_ZTE_IP/$NFVO_DRIVER_SDNC_ZTE_IP/g" \
- -e "s/NFVO_DRIVER_VIM_IP/$NFVO_DRIVER_VIM_IP/g" \
- -e "s/NFVO_DRIVER_VNFM_HUAWEI_IP/$NFVO_DRIVER_VNFM_HUAWEI_IP/g" \
- -e "s/NFVO_DRIVER_VNFM_JUJU_IP/$NFVO_DRIVER_VNFM_JUJU_IP/g" \
- -e "s/NFVO_DRIVER_VNFM_ZTE_IP/$NFVO_DRIVER_VNFM_ZTE_IP/g" \
- -e "s/NFVO_LCM_IP/$NFVO_LCM_IP/g" \
- -e "s/NFVO_RESMANAGEMENT_IP/$NFVO_RESMANAGEMENT_IP/g" \
- -e "s/NFVO_UMC_IP/$NFVO_UMC_IP/g" \
- -e "s/SDNO_DRIVER_HUAWEI_L3VPN_IP/$SDNO_DRIVER_HUAWEI_L3VPN_IP/g" \
- -e "s/SDNO_DRIVER_HUAWEI_OPENSTACK_IP/$SDNO_DRIVER_HUAWEI_OPENSTACK_IP/g" \
- -e "s/SDNO_DRIVER_HUAWEI_OVERLAY_IP/$SDNO_DRIVER_HUAWEI_OVERLAY_IP/g" \
- -e "s/SDNO_DRIVER_HUAWEI_SERVICECHAIN_IP/$SDNO_DRIVER_HUAWEI_SERVICECHAIN_IP/g" \
- -e "s/SDNO_DRIVER_ZTE_SPTN_IP/$SDNO_DRIVER_ZTE_SPTN_IP/g" \
- -e "s/SDNO_SERVICE_BRS_IP/$SDNO_SERVICE_BRS_IP/g" \
- -e "s/SDNO_SERVICE_IPSEC_IP/$SDNO_SERVICE_IPSEC_IP/g" \
- -e "s/SDNO_SERVICE_L2VPN_IP/$SDNO_SERVICE_L2VPN_IP/g" \
- -e "s/SDNO_SERVICE_L3VPN_IP/$SDNO_SERVICE_L3VPN_IP/g" \
- -e "s/SDNO_SERVICE_MSS_IP/$SDNO_SERVICE_MSS_IP/g" \
- -e "s/SDNO_SERVICE_NSLCM_IP/$SDNO_SERVICE_NSLCM_IP/g" \
- -e "s/SDNO_SERVICE_OVERLAYVPN_IP/$SDNO_SERVICE_OVERLAYVPN_IP/g" \
- -e "s/SDNO_SERVICE_SERVICECHAIN_IP/$SDNO_SERVICE_SERVICECHAIN_IP/g" \
- -e "s/SDNO_SERVICE_VPC_IP/$SDNO_SERVICE_VPC_IP/g" \
- -e "s/SDNO_SERVICE_VXLAN_IP/$SDNO_SERVICE_VXLAN_IP/g" \
- -e "s/COMMON_TOSCA_ARIA_IP/$COMMON_TOSCA_ARIA_IP/g" \
- -e "s/SDNO_DRIVER_CT_TE_IP/$SDNO_DRIVER_CT_TE_IP/g" \
- -e "s/SDNO_MONITORING_IP/$SDNO_MONITORING_IP/g" \
- -e "s/SDNO_VSITEMGR_IP/$SDNO_VSITEMGR_IP/g" \
- -e "s/GSO_GUI_PORTAL_IP/$GSO_GUI_PORTAL_IP/g" \
- ${OPENO_VM_DIR}/openo_docker.sh
-
- scp_to_openo ${OPENO_VM_DIR}/openo_docker.sh /home
-}
-
-function launch_openo_docker()
-{
- openo_docker_prepare
- local cmd="/home/openo_docker.sh"
- exec_cmd_on_openo $cmd
-}
-
-function tear_down_openo()
-{
- sudo virsh destroy open-o > /dev/null 2>&1
- sudo virsh undefine open-o > /dev/null 2>&1
-
- sudo umount $OPENO_VM_DIR/old > /dev/null 2>&1
- sudo umount $OPENO_VM_DIR/new > /dev/null 2>&1
-
- sudo rm -rf $OPENO_VM_DIR
-
- log_info "tear_down_openo success!!!"
-}
-
-function wait_openo_ok()
-{
- set +x
- log_info "wait_openo_ok enter"
- ssh-keygen -f "/root/.ssh/known_hosts" -R $OPENO_VM_IP >/dev/null 2>&1
- local retry=0
- until timeout 1s exec_cmd_on_openo "exit" >/dev/null 2>&1
- do
- log_progress "os install time used: $((retry*100/$1))%"
- sleep 1
- let retry+=1
- if [[ $retry -ge $1 ]];then
- # first try
- exec_cmd_on_openo "exit"
- # second try
- exec_cmd_on_openo "exit"
- local exit_status=$?
- if [[ $exit_status == 0 ]]; then
- log_warn "final ssh login open-o success !!!"
- break
- fi
- log_error "final ssh retry failed with status: " $exit_status
- log_error "os install time out"
- exit 1
- fi
- done
- set -x
- log_warn "os install time used: 100%"
- log_info "wait_openo_ok exit"
-}
-
-function launch_openo_vm() {
- set -x
-
- local old_mnt=${OPENO_VM_DIR}/old
- local new_mnt=${OPENO_VM_DIR}/new
- local old_iso=${WORK_DIR}/iso/${OPENO_VM_ISO}
- local new_iso=${OPENO_VM_DIR}/centos.iso
- local rsa_file=${OPENO_VM_DIR}/boot.rsa
-
- sudo virsh net-destroy external
- sudo virsh net-undefine external
-
- if [[ ! $(virsh net-list | grep external) ]]; then
- sudo virsh net-define ${UTIL_DIR}/external-net.xml
- sudo virsh net-start external
- fi
-
- log_info "launch_openo enter"
-
- tear_down_openo
-
- mkdir -p $OPENO_VM_DIR $old_mnt
- sudo mount -o loop $old_iso $old_mnt
- cd $old_mnt;find .|cpio -pd $new_mnt;cd -
-
- sudo umount $old_mnt
-
- chmod 755 -R $new_mnt
-
- cp ${UTIL_DIR}/isolinux.cfg $new_mnt/isolinux/ -f
- cp ${UTIL_DIR}/ks.cfg $new_mnt/isolinux/ -f
-
- sed -i -e "s/REPLACE_EXTERNAL_IP/$OPENO_VM_IP/g" \
- -e "s/REPLACE_EXTERNAL_NETMASK/$OPENO_VM_MASK/g" \
- -e "s/REPLACE_EXTERNAL_GW/$OPENO_EXTERNAL_GW/g" \
- $new_mnt/isolinux/isolinux.cfg
-
- mkdir -p $new_mnt/bootstrap
- ssh-keygen -f $new_mnt/bootstrap/boot.rsa -t rsa -N ''
- cp $new_mnt/bootstrap/boot.rsa $rsa_file
-
- rm -rf $new_mnt/.rr_moved $new_mnt/rr_moved
- sudo mkisofs -quiet -r -J -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -hide-rr-moved -x "lost+found:" -o $new_iso $new_mnt
-
- rm -rf $old_mnt $new_mnt
-
- qemu-img create -f qcow2 ${OPENO_VM_DIR}/disk.img ${OPENO_VIRT_DISK}G
-
- let OPENO_VIRT_MEM*=1024
- # create vm xml
- sed -e "s/REPLACE_MEM/$OPENO_VIRT_MEM/g" \
- -e "s/REPLACE_CPU/$OPENO_VIRT_CPUS/g" \
- -e "s#REPLACE_IMAGE#$OPENO_VM_DIR/disk.img#g" \
- -e "s#REPLACE_ISO#$OPENO_VM_DIR/centos.iso#g" \
- -e "s/REPLACE_NET_EXTERNAL/$OPENO_VM_NET/g" \
- ${UTIL_DIR}/libvirt.xml \
- > ${OPENO_VM_DIR}/open-o.xml
-
- sudo virsh define ${OPENO_VM_DIR}/open-o.xml
- sudo virsh start open-o
-
- local exit_status=$?
- if [ $exit_status != 0 ];then
- log_error "virsh start open-o failed"
- exit 1
- fi
-
- if ! wait_openo_ok 300;then
- log_error "install os timeout"
- exit 1
- fi
-
- set +x
- log_info "launch_openo exit"
-}
-
-set +ex