From df06f21dc792b1c17219d9d9d59e29184e1868bb Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Thu, 2 Mar 2017 10:51:10 +0800 Subject: fix no precise image bug 1. add precise image name 2. release caches before install open-o and before install juju 3. remove known_hosts on jump host Change-Id: I7d1957c53c1b957718622d3f90c2a86966f1ec23 Signed-off-by: Harry Huang --- conf/download.conf | 2 +- conf/network.yml | 86 +++++++++++++++++++++++++++--------------------------- juju/juju_setup.sh | 5 ++++ opera_launch.sh | 8 +++-- 4 files changed, 55 insertions(+), 46 deletions(-) diff --git a/conf/download.conf b/conf/download.conf index 4c2d70d..76a7fc6 100644 --- a/conf/download.conf +++ b/conf/download.conf @@ -1,6 +1,6 @@ # iso and img conifg 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_NAME=(xenial_x86_64 trusty_x86_64 precise_x86_64) 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/precise/current/precise-server-cloudimg-amd64-disk1.img) diff --git a/conf/network.yml b/conf/network.yml index e587b2d..bcf1e5a 100644 --- a/conf/network.yml +++ b/conf/network.yml @@ -8,52 +8,52 @@ ############################################################################## --- openo_net: - openo_vm_ip: 192.168.57.50 + openo_vm_ip: 192.168.104.50 openo_vm_mask: 255.255.255.0 - openo_external_gw: 192.168.57.250 - openo_external_cidr: 192.168.57.0/24 + openo_external_gw: 192.168.104.1 + openo_external_cidr: 192.168.104.0/24 openo_docker_net: - common_services_auth_ip: 192.168.57.51 - common_services_drivermanager_ip: 192.168.57.52 - common_services_extsys_ip: 192.168.57.53 - common_services_msb_ip: 192.168.57.54 - common_services_protocolstack_ip: 192.168.57.55 - common_services_wso2ext_ip: 192.168.57.56 - common_tosca_catalog_ip: 192.168.57.57 - common_tosca_inventory_ip: 192.168.57.58 - common_tosca_modeldesigner_ip: 192.168.57.59 - gso_service_gateway_ip: 192.168.57.60 - gso_service_manager_ip: 192.168.57.61 - nfvo_dac_ip: 192.168.57.62 - nfvo_driver_sdnc_zte_ip: 192.168.57.63 - nfvo_driver_vim_ip: 192.168.57.64 - nfvo_driver_vnfm_huawei_ip: 192.168.57.65 - nfvo_driver_vnfm_juju_ip: 192.168.57.66 - nfvo_driver_vnfm_zte_ip: 192.168.57.67 - nfvo_lcm_ip: 192.168.57.68 - nfvo_resmanagement_ip: 192.168.57.69 - nfvo_umc_ip: 192.168.57.70 - sdno_driver_huawei_l3vpn_ip: 192.168.57.71 - sdno_driver_huawei_openstack_ip: 192.168.57.72 - sdno_driver_huawei_overlay_ip: 192.168.57.73 - sdno_driver_huawei_servicechain_ip: 192.168.57.74 - sdno_driver_zte_sptn_ip: 192.168.57.75 - sdno_service_brs_ip: 192.168.57.76 - sdno_service_ipsec_ip: 192.168.57.77 - sdno_service_l2vpn_ip: 192.168.57.78 - sdno_service_l3vpn_ip: 192.168.57.79 - sdno_service_mss_ip: 192.168.57.80 - sdno_service_nslcm_ip: 192.168.57.81 - sdno_service_overlayvpn_ip: 192.168.57.82 - sdno_service_servicechain_ip: 192.168.57.83 - sdno_service_vpc_ip: 192.168.57.84 - sdno_service_vxlan_ip: 192.168.57.85 - common_tosca_aria_ip: 192.168.57.86 - sdno_driver_ct_te_ip: 192.168.57.87 - sdno_monitoring_ip: 192.168.57.88 - sdno_vsitemgr_ip: 192.168.57.89 - gso_gui_portal_ip: 192.168.57.90 + common_services_auth_ip: 192.168.104.51 + common_services_drivermanager_ip: 192.168.104.52 + common_services_extsys_ip: 192.168.104.53 + common_services_msb_ip: 192.168.104.54 + common_services_protocolstack_ip: 192.168.104.55 + common_services_wso2ext_ip: 192.168.104.56 + common_tosca_catalog_ip: 192.168.104.57 + common_tosca_inventory_ip: 192.168.104.58 + common_tosca_modeldesigner_ip: 192.168.104.59 + gso_service_gateway_ip: 192.168.104.60 + gso_service_manager_ip: 192.168.104.61 + nfvo_dac_ip: 192.168.104.62 + nfvo_driver_sdnc_zte_ip: 192.168.104.63 + nfvo_driver_vim_ip: 192.168.104.64 + nfvo_driver_vnfm_huawei_ip: 192.168.104.65 + nfvo_driver_vnfm_juju_ip: 192.168.104.66 + nfvo_driver_vnfm_zte_ip: 192.168.104.67 + nfvo_lcm_ip: 192.168.104.68 + nfvo_resmanagement_ip: 192.168.104.69 + nfvo_umc_ip: 192.168.104.70 + sdno_driver_huawei_l3vpn_ip: 192.168.104.71 + sdno_driver_huawei_openstack_ip: 192.168.104.72 + sdno_driver_huawei_overlay_ip: 192.168.104.73 + sdno_driver_huawei_servicechain_ip: 192.168.104.74 + sdno_driver_zte_sptn_ip: 192.168.104.75 + sdno_service_brs_ip: 192.168.104.76 + sdno_service_ipsec_ip: 192.168.104.77 + sdno_service_l2vpn_ip: 192.168.104.78 + sdno_service_l3vpn_ip: 192.168.104.79 + sdno_service_mss_ip: 192.168.104.80 + sdno_service_nslcm_ip: 192.168.104.81 + sdno_service_overlayvpn_ip: 192.168.104.82 + sdno_service_servicechain_ip: 192.168.104.83 + sdno_service_vpc_ip: 192.168.104.84 + sdno_service_vxlan_ip: 192.168.104.85 + common_tosca_aria_ip: 192.168.104.86 + sdno_driver_ct_te_ip: 192.168.104.87 + sdno_monitoring_ip: 192.168.104.88 + sdno_vsitemgr_ip: 192.168.104.89 + gso_gui_portal_ip: 192.168.104.90 juju_net: juju_net_cidr: 12.1.1.0/24 diff --git a/juju/juju_setup.sh b/juju/juju_setup.sh index d52b47f..e37eb1f 100755 --- a/juju/juju_setup.sh +++ b/juju/juju_setup.sh @@ -65,6 +65,11 @@ function juju_prepare() --remote-ip-prefix 0.0.0.0/0 $default_secgroup_id fi + if [[ ! $(neutron security-group-rule-list | grep default | grep "icmp") ]]; then + neutron security-group-rule-create --direction egress --protocol icmp \ + --remote-ip-prefix 0.0.0.0/0 $default_secgroup_id + fi + if [[ ! $(neutron security-group-rule-list | grep default | grep "tcp") ]]; then neutron security-group-rule-create --direction ingress --protocol tcp \ --remote-ip-prefix 0.0.0.0/0 $default_secgroup_id diff --git a/opera_launch.sh b/opera_launch.sh index ebbe63d..750ace2 100755 --- a/opera_launch.sh +++ b/opera_launch.sh @@ -36,6 +36,8 @@ source ${JUJU_DIR}/juju_connect.sh mkdir -p $WORK_DIR if [[ "$DEPLOY_FIRST_TIME" == "true" ]]; then + sudo rm -f /root/.ssh/known_hosts + sudo rm -f /root/.ssh/known_hosts.old package_prepare network_prepare generate_compass_openrc @@ -43,6 +45,8 @@ fi source $WORK_DIR/admin-openrc.sh +sudo sync && sudo sysctl -w vm.drop_caches=3 + if [[ "$DEPLOY_OPENO" == "true" ]]; then if ! openo_download_iso; then log_error "openo_download_iso failed" @@ -60,6 +64,8 @@ if [[ "$DEPLOY_OPENO" == "true" ]]; then fi fi +sudo sync && sudo sysctl -w vm.drop_caches=3 + if [[ "$DEPLOY_JUJU" == "true" ]]; then juju_env_prepare @@ -72,9 +78,7 @@ if [[ "$DEPLOY_JUJU" == "true" ]]; then log_error "launch_juju failed" exit 1 fi -fi -if [[ "$DEPLOY_OPENO" == "true" && "$DEPLOY_JUJU" == "true" ]]; then connect_juju_and_openo fi -- cgit 1.2.3-korg