diff options
8 files changed, 37 insertions, 18 deletions
diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-nofeature-ha.yml index 64d6793d..617095a8 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-nosdn-nofeature-ha.yml @@ -28,9 +28,9 @@ hosts: - ha - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-ocl-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-ocl-nofeature-ha.yml index 0492efdb..77c03a92 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-ocl-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-ocl-nofeature-ha.yml @@ -28,9 +28,9 @@ hosts: - compute - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-odl_l2-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-odl_l2-nofeature-ha.yml index ce10bab9..02fdd03e 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-odl_l2-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-odl_l2-nofeature-ha.yml @@ -30,9 +30,9 @@ hosts: - odl - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-odl_l3-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-odl_l3-nofeature-ha.yml index 563f6405..7f770f5f 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-odl_l3-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-odl_l3-nofeature-ha.yml @@ -32,9 +32,9 @@ hosts: - odl - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-onos-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-onos-nofeature-ha.yml index 9b05aded..4a5d6888 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-onos-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-onos-nofeature-ha.yml @@ -30,9 +30,9 @@ hosts: - onos - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/conf/hardware_environment/huawei-pod1/os-onos-sfc-ha.yml b/deploy/conf/hardware_environment/huawei-pod1/os-onos-sfc-ha.yml index 5b1206b4..de403488 100644 --- a/deploy/conf/hardware_environment/huawei-pod1/os-onos-sfc-ha.yml +++ b/deploy/conf/hardware_environment/huawei-pod1/os-onos-sfc-ha.yml @@ -32,9 +32,9 @@ hosts: - onos - name: host3 - mac: 'D8:49:0B:DA:2A:28' + mac: 'D8:49:0B:DA:67:1F' interfaces: - - eth1: 'D8:49:0B:DA:2A:29' + - eth1: 'D8:49:0B:DA:67:20' ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: diff --git a/deploy/launch.sh b/deploy/launch.sh index 9947bd8d..488e0fd7 100755 --- a/deploy/launch.sh +++ b/deploy/launch.sh @@ -12,6 +12,8 @@ WORK_DIR=$COMPASS_DIR/work/deploy mkdir -p $WORK_DIR/script +export DEPLOY_FIRST_TIME=${DEPLOY_FIRST_TIME-"true"} + source ${COMPASS_DIR}/deploy/prepare.sh prepare_python_env source ${COMPASS_DIR}/util/log.sh diff --git a/deploy/prepare.sh b/deploy/prepare.sh index e7d84441..a4f606af 100755 --- a/deploy/prepare.sh +++ b/deploy/prepare.sh @@ -36,11 +36,14 @@ function download_iso() } function prepare_env() { - sudo apt-get update -y - sudo apt-get install -y --force-yes mkisofs bc curl ipmitool openvswitch-switch - sudo apt-get install -y --force-yes git python-dev - sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev - sudo apt-get install -y --force-yes libffi-dev libssl-dev + if [[ "$DEPLOY_FIRST_TIME" == "true" ]]; then + sudo apt-get update -y + sudo apt-get install -y --force-yes mkisofs bc curl ipmitool openvswitch-switch + sudo apt-get install -y --force-yes git python-dev + sudo apt-get install -y --force-yes libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev + sudo apt-get install -y --force-yes libffi-dev libssl-dev + fi + sudo service libvirt-bin restart if sudo service openvswitch-switch status|grep stop; then sudo service openvswitch-switch start @@ -71,7 +74,7 @@ function prepare_env() { sudo cp ${COMPASS_DIR}/deploy/qemu_hook.sh /etc/libvirt/hooks/qemu } -function prepare_python_env() { +function _prepare_python_env() { rm -rf $WORK_DIR/venv mkdir -p $WORK_DIR/venv @@ -88,3 +91,17 @@ function prepare_python_env() { pip install --upgrade oslo.config pip install --upgrade ansible } + +function prepare_python_env() +{ + if [[ "$DEPLOY_FIRST_TIME" == "true" ]]; then + _prepare_python_env + else + source $WORK_DIR/venv/bin/activate + if [[ $? -ne 0 ]]; then + _prepare_python_env + fi + fi + which python +} + |