diff options
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/adapters/ansible/roles/database/templates/mongodb.conf | 1 | ||||
-rwxr-xr-x | deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg | 3 | ||||
-rw-r--r-- | deploy/client.py | 10 | ||||
-rw-r--r-- | deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml | 12 | ||||
-rw-r--r-- | deploy/conf/hardware_environment/intel-pod8/os-ocl-nofeature-ha.yml | 12 | ||||
-rw-r--r-- | deploy/conf/vm_environment/os-ocl-nofeature-ha.yml | 12 | ||||
-rw-r--r-- | deploy/conf/vm_environment/os-odl_l3-nofeature-ha.yml | 31 | ||||
-rwxr-xr-x | deploy/deploy_host.sh | 8 | ||||
-rwxr-xr-x | deploy/launch.sh | 8 | ||||
-rw-r--r-- | deploy/reset_compute.py | 59 |
10 files changed, 123 insertions, 33 deletions
diff --git a/deploy/adapters/ansible/roles/database/templates/mongodb.conf b/deploy/adapters/ansible/roles/database/templates/mongodb.conf index 18306154..7d6dda93 100644 --- a/deploy/adapters/ansible/roles/database/templates/mongodb.conf +++ b/deploy/adapters/ansible/roles/database/templates/mongodb.conf @@ -3,3 +3,4 @@ bind_ip = 0.0.0.0 replSet = compass port = 27017 smallfiles = true +oplogSize = 10240 diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg index f5147082..df2035f6 100755 --- a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg +++ b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg @@ -36,7 +36,8 @@ # # Comma separated list of features repositories to register by default # -featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium-RC1/xml/features +featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium/xml/features +#featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.4.0-Beryllium-RC1/xml/features #mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.3.3-Lithium-SR3/xml/features #mvn:org.apache.karaf.features/standard/3.0.3/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.3/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.1.4/xml/features,mvn:org.apache.karaf.features/spring/3.0.3/xml/features,mvn:org.opendaylight.integration/features-integration-index/0.3.2-Lithium-SR2/xml/features diff --git a/deploy/client.py b/deploy/client.py index 593f9033..a87decc9 100644 --- a/deploy/client.py +++ b/deploy/client.py @@ -235,6 +235,9 @@ opts = [ cfg.StrOpt('rsa_file', help='ssh rsa key file', default=''), + cfg.StrOpt('odl_l3_agent', + help='odl l3 agent enable flag', + default='Disable'), ] CONF.register_cli_opts(opts) @@ -723,6 +726,7 @@ class CompassClient(object): package_config['enable_secgroup'] = (CONF.enable_secgroup == "true") package_config['enable_fwaas'] = (CONF.enable_fwaas== "true") package_config['enable_vpnaas'] = (CONF.enable_vpnaas== "true") + package_config['odl_l3_agent'] = "Enable" if CONF.odl_l3_agent == "Enable" else "Disable" status, resp = self.client.update_cluster_config( cluster_id, package_config=package_config) @@ -871,11 +875,11 @@ class CompassClient(object): (cluster_id, status, cluster_state) ) - LOG.info("current_time=%s, deployment_timeout=%s" \ - % (current_time(), deployment_timeout)) time.sleep(5) - if not current_time() < deployment_timeout: + if current_time() >= deployment_timeout: + LOG.info("current_time=%s, deployment_timeout=%s" \ + % (current_time(), deployment_timeout)) raise RuntimeError("installation timeout") try: diff --git a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml index 7606687e..0492efdb 100644 --- a/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/huawei-us-deploy-bare-1/os-ocl-nofeature-ha.yml @@ -16,7 +16,7 @@ hosts: roles: - controller - ha - - open-contrail + - opencontrail - name: host2 mac: 'D8:49:0B:DA:5A:B7' @@ -25,9 +25,7 @@ hosts: ipmiIp: 172.16.130.27 ipmiPass: huawei@123 roles: - - controller - - ha - - open-contrail + - compute - name: host3 mac: 'D8:49:0B:DA:2A:28' @@ -36,9 +34,7 @@ hosts: ipmiIp: 172.16.130.29 ipmiPass: Huawei@123 roles: - - controller - - ha - - open-contrail + - compute - name: host4 mac: 'D8:49:0B:DA:5B:5D' @@ -48,7 +44,6 @@ hosts: ipmiPass: Huawei@123 roles: - compute - - open-contrail - name: host5 mac: 'D8:49:0B:DA:56:85' @@ -58,5 +53,4 @@ hosts: ipmiPass: Huawei@123 roles: - compute - - open-contrail diff --git a/deploy/conf/hardware_environment/intel-pod8/os-ocl-nofeature-ha.yml b/deploy/conf/hardware_environment/intel-pod8/os-ocl-nofeature-ha.yml index 75872efd..7892a0b5 100644 --- a/deploy/conf/hardware_environment/intel-pod8/os-ocl-nofeature-ha.yml +++ b/deploy/conf/hardware_environment/intel-pod8/os-ocl-nofeature-ha.yml @@ -17,7 +17,7 @@ hosts: roles: - controller - ha - - open-contrail + - opencontrail - name: host2 mac: '00:1E:67:D4:39:B5' @@ -26,9 +26,7 @@ hosts: - eth3: '00:1E:67:C5:52:25' ipmiIp: 10.2.117.129 roles: - - controller - - ha - - open-contrail + - compute - name: host3 mac: '00:1E:67:D4:31:B2' @@ -37,9 +35,7 @@ hosts: - eth3: '00:1E:67:C1:FA:E1' ipmiIp: 10.2.117.131 roles: - - controller - - ha - - open-contrail + - compute - name: host4 mac: '00:1E:67:D4:34:67' @@ -49,7 +45,6 @@ hosts: ipmiIp: 10.2.117.133 roles: - compute - - open-contrail - name: host5 mac: '00:1E:67:D4:38:42' @@ -59,5 +54,4 @@ hosts: ipmiIp: 10.2.117.135 roles: - compute - - open-contrail diff --git a/deploy/conf/vm_environment/os-ocl-nofeature-ha.yml b/deploy/conf/vm_environment/os-ocl-nofeature-ha.yml index 5f4890d6..bdcada8f 100644 --- a/deploy/conf/vm_environment/os-ocl-nofeature-ha.yml +++ b/deploy/conf/vm_environment/os-ocl-nofeature-ha.yml @@ -8,30 +8,24 @@ hosts: - ha - ceph-adm - ceph-mon - - open-contrail + - opencontrail - name: host2 roles: - - controller - - ha + - compute - ceph-mon - - open-contrail - name: host3 roles: - - controller - - ha + - compute - ceph-mon - - open-contrail - name: host4 roles: - compute - ceph-osd - - open-contrail - name: host5 roles: - compute - ceph-osd - - open-contrail diff --git a/deploy/conf/vm_environment/os-odl_l3-nofeature-ha.yml b/deploy/conf/vm_environment/os-odl_l3-nofeature-ha.yml new file mode 100644 index 00000000..cc95ccd5 --- /dev/null +++ b/deploy/conf/vm_environment/os-odl_l3-nofeature-ha.yml @@ -0,0 +1,31 @@ +TYPE: virtual +FLAVOR: cluster + +odl_l3_agent: "Enable" + +hosts: + - name: host1 + roles: + - controller + - ha + - odl + + - name: host2 + roles: + - controller + - ha + - odl + + - name: host3 + roles: + - controller + - ha + - odl + + - name: host4 + roles: + - compute + + - name: host5 + roles: + - compute diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh index 82748743..8e7997ef 100755 --- a/deploy/deploy_host.sh +++ b/deploy/deploy_host.sh @@ -45,9 +45,13 @@ function deploy_host(){ --deployment_timeout="${DEPLOYMENT_TIMEOUT}" --${POLL_SWITCHES_FLAG} --dashboard_url="${DASHBOARD_URL}" \ --cluster_vip="${VIP}" --network_cfg="$NETWORK" --neutron_cfg="$NEUTRON" \ --enable_secgroup="${ENABLE_SECGROUP}" --enable_fwaas="${ENABLE_FWAAS}" \ - --rsa_file="$rsa_file" --enable_vpnaas="${ENABLE_VPNAAS}" + --rsa_file="$rsa_file" --enable_vpnaas="${ENABLE_VPNAAS}" --odl_l3_agent="${odl_l3_agent}" RET=$? sleep $((AYNC_TIMEOUT+5)) - exit $RET + if [[ $RET ]]; then + /bin/true + else + /bin/false + fi } diff --git a/deploy/launch.sh b/deploy/launch.sh index 8ee70e47..f9d915bf 100755 --- a/deploy/launch.sh +++ b/deploy/launch.sh @@ -78,6 +78,14 @@ if [[ "$DEPLOY_HOST" == "true" || $REDEPLOY_HOST == "true" ]]; then if ! deploy_host;then exit 1 fi + echo $HOST_ROLES + echo $TYPE + echo $DHA + if [[ `echo $HOST_ROLES | grep opencontrail` ]]; then + sleep 60 + python ${COMPASS_DIR}/deploy/reset_compute.py $TYPE $DHA + sleep 600 + fi fi figlet -ctf slant Installation Complete! diff --git a/deploy/reset_compute.py b/deploy/reset_compute.py new file mode 100644 index 00000000..717e8833 --- /dev/null +++ b/deploy/reset_compute.py @@ -0,0 +1,59 @@ +import os +import sys +import yaml + +def exec_cmd(cmd): + print cmd + os.system(cmd) + +def reset_baremetal(dha_info): + print "reset_baremetal" + + hosts_info = yaml.load(open(dha_info)) + #print hosts_info + + ipmiUserDf = hosts_info.get('ipmiUser', 'root') + ipmiPassDf = hosts_info.get('ipmiPass', 'Huawei@123') + print ipmiUserDf + print ipmiPassDf + + hosts_list = hosts_info.get('hosts', []) + #print hosts_list + + for host in hosts_list: + print host + if ('compute' in host['roles']): + ipmiUser = host.get('ipmiUser', ipmiUserDf) + ipmiPass = host.get('ipmiPass', ipmiPassDf) + ipmiIp = host['ipmiIp'] + print ipmiUser + print ipmiPass + print ipmiIp + exec_cmd("ipmitool -I lanplus -H %s -U %s -P %s chassis power reset >/dev/null" % (ipmiIp, ipmiUser, ipmiPass)) + + +def reset_virtual(dha_info): + print "reset_virtual" + + hosts_info = yaml.load(open(dha_info)) + print hosts_info + + hosts_list = hosts_info.get('hosts', []) + + for host in hosts_list: + print host + if ('compute' in host['roles']): + name = host['name'] + exec_cmd("virsh destroy %s" % name) + exec_cmd("virsh start %s" % name) + +if __name__ == "__main__": + deploy_type=sys.argv[1] + dha_info=sys.argv[2] + print deploy_type + print dha_info + if (deploy_type == 'baremetal') : + reset_baremetal(dha_info) + elif (deploy_type == 'virtual') : + reset_virtual(dha_info) + |