diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/overcloud-deploy-functions.sh | 23 | ||||
-rw-r--r-- | lib/python/apex/common/constants.py | 1 | ||||
-rw-r--r-- | lib/python/apex/network_settings.py | 3 |
3 files changed, 13 insertions, 14 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh index a7fc5c2e..a42162f2 100755 --- a/lib/overcloud-deploy-functions.sh +++ b/lib/overcloud-deploy-functions.sh @@ -29,14 +29,6 @@ function overcloud_deploy { DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight.yaml" fi SDN_IMAGE=opendaylight - if [ "${deploy_options_array['sfc']}" == 'True' ]; then - SDN_IMAGE+=-sfc - if [ ! -f $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then - echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute an SFC deployment." - echo "Please install the opnfv-apex-opendaylight-sfc package to provide this overcloud image for deployment.${reset}" - exit 1 - fi - fi elif [ "${deploy_options_array['sdn_controller']}" == 'opendaylight-external' ]; then DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight-external.yaml" SDN_IMAGE=opendaylight @@ -117,12 +109,6 @@ EOF -a overcloud-full.qcow2 fi - if [ "${deploy_options_array['sdn_controller']}" == 'onos' && "${deploy_options_array['sfc']}" == 'True' ]; then - # upgrade ovs into ovs 2.5.90 with NSH function - LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_kmod_rpm_name}" \ - --run-command "yum upgrade -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_rpm_name}" \ - -a overcloud-full.qcow2 - fi EOI elif [ "${deploy_options_array['dataplane']}" != 'ovs' ]; then @@ -134,6 +120,15 @@ EOI ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "LIBGUESTFS_BACKEND=direct virt-customize -a overcloud-full.qcow2 --root-password password:opnfvapex" fi + # upgrade ovs into ovs 2.5.90 with NSH function if SFC is enabled + if [ "${deploy_options_array['sfc']}" == 'True' && "${deploy_options_array['dataplane']}" == 'ovs' ]; then + ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI + LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_kmod_rpm_name}" \ + --run-command "yum upgrade -y /root/ovs/rpm/rpmbuild/RPMS/x86_64/${ovs_rpm_name}" \ + -a overcloud-full.qcow2 +EOI + fi + # Set ODL version accordingly if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['odl_version']}" == 'boron' ]]; then ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI diff --git a/lib/python/apex/common/constants.py b/lib/python/apex/common/constants.py index db0a9fd1..741bb4f8 100644 --- a/lib/python/apex/common/constants.py +++ b/lib/python/apex/common/constants.py @@ -18,6 +18,7 @@ COMPUTE = 'compute' OPNFV_NETWORK_TYPES = [ADMIN_NETWORK, TENANT_NETWORK, EXTERNAL_NETWORK, STORAGE_NETWORK, API_NETWORK] DNS_SERVERS = ["8.8.8.8", "8.8.4.4"] +NTP_SERVER = ["pool.ntp.org"] COMPUTE = 'compute' CONTROLLER = 'controller' ROLES = [COMPUTE, CONTROLLER] diff --git a/lib/python/apex/network_settings.py b/lib/python/apex/network_settings.py index ca40ba93..c9f7d450 100644 --- a/lib/python/apex/network_settings.py +++ b/lib/python/apex/network_settings.py @@ -21,6 +21,7 @@ from .common.constants import ( ROLES, DOMAIN_NAME, DNS_SERVERS, + NTP_SERVER, ADMIN_NETWORK, EXTERNAL_NETWORK, OPNFV_NETWORK_TYPES, @@ -113,6 +114,7 @@ class NetworkSettings(dict): if 'dns-domain' not in self: self['domain_name'] = DOMAIN_NAME self['dns_servers'] = self.get('dns_nameservers', DNS_SERVERS) + self['ntp_servers'] = self.get('ntp', NTP_SERVER) def _validate_overcloud_nic_order(self, network): """ @@ -333,6 +335,7 @@ class NetworkSettings(dict): bash_str += flatten('ip_addr_family', self.get_ip_addr_family()) bash_str += flatten('dns_servers', self['dns_servers'], ' ') bash_str += flatten('domain_name', self['dns-domain'], ' ') + bash_str += flatten('ntp_server', self['ntp_servers'][0], ' ') if path: with open(path, 'w') as file: file.write(bash_str) |