diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/Makefile | 15 | ||||
-rw-r--r-- | build/nics-template.yaml.jinja2 | 21 | ||||
-rw-r--r-- | build/opnfv-apex-common.spec | 2 | ||||
-rwxr-xr-x | build/overcloud-full.sh | 17 | ||||
-rwxr-xr-x | build/overcloud-onos.sh | 4 | ||||
-rwxr-xr-x | build/undercloud.sh | 6 | ||||
-rw-r--r-- | build/variables.sh | 15 |
7 files changed, 63 insertions, 17 deletions
diff --git a/build/Makefile b/build/Makefile index 0763d361..84305618 100644 --- a/build/Makefile +++ b/build/Makefile @@ -66,12 +66,23 @@ $(RPMCOM): .PHONY: python-tests python-tests: + # clean previous coverage data + rm -rf ../tests/.coverage + rm -rf ../tests/htmlcov # run nose tests - cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex + cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex --cover-package apex_python_utils --cover-html --cover-min-percentage 85 + # generate reports - cd ../tests && coverage3 html --include '*lib/python/*' cd ../tests && coverage3 report --include '*lib/python/*' -m +####################### +# PYTHON PEP8 CHECK # +####################### + +.PHONY: python-pep8-check +python-pep8-check: + pep8 ../lib/python + pep8 ../tests ############### # UNDERCLOUD # diff --git a/build/nics-template.yaml.jinja2 b/build/nics-template.yaml.jinja2 index 1c51ab7f..455ae0f3 100644 --- a/build/nics-template.yaml.jinja2 +++ b/build/nics-template.yaml.jinja2 @@ -85,7 +85,7 @@ resources: os_net_config: network_config: - - {%- if vlans['private_network'] != 'native' or vlans['storage_network'] != 'native' or vlans['api_network'] != 'native' %} + {%- if vlans['private_network'] is number or vlans['storage_network'] is number or vlans['api_network'] is number %} type: ovs_bridge name: {get_input: bridge_name} members: @@ -94,7 +94,7 @@ resources: name: nic1 # force the MAC address of the bridge to this interface primary: true - {%- if 'public_network' in enabled_networks and vlans['private_network'] != 'native' %} + {%- if 'public_network' in enabled_networks and vlans['private_network'] is number %} - type: vlan vlan_id: {get_param: ExternalNetworkVlanID} @@ -106,7 +106,7 @@ resources: default: true next_hop: {get_param: ExternalInterfaceDefaultRoute} {%- endif %} - {%- if 'private_network' in enabled_networks and vlans['private_network'] != 'native' %} + {%- if 'private_network' in enabled_networks and vlans['private_network'] is number %} - type: vlan vlan_id: {get_param: TenantNetworkVlanID} @@ -114,7 +114,7 @@ resources: - ip_netmask: {get_param: TenantIpSubnet} {%- endif %} - {%- if 'storage_network' in enabled_networks and vlans['storage_network'] != 'native' %} + {%- if 'storage_network' in enabled_networks and vlans['storage_network'] is number %} - type: vlan vlan_id: {get_param: StorageNetworkVlanID} @@ -122,7 +122,7 @@ resources: - ip_netmask: {get_param: StorageIpSubnet} {%- endif %} - {%- if 'api_network' in enabled_networks and vlans['api_network'] != 'native' %} + {%- if 'api_network' in enabled_networks and vlans['api_network'] is number %} - type: vlan vlan_id: {get_param: InternalApiNetworkVlanID} @@ -212,6 +212,17 @@ resources: name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %} # force the MAC address of the bridge to this interface primary: true + {%- if role == 'controller' %} + dns_servers: {get_param: DnsServers} + addresses: + - + ip_netmask: {get_param: ExternalIpSubnet} + routes: + - + default: true + ip_netmask: 0.0.0.0/0 + next_hop: {get_param: ExternalInterfaceDefaultRoute} + {%- endif %} {%- endif %} {%- if 'storage_network' in enabled_networks and vlans['storage_network'] == 'native' %} - diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec index d5532411..5abd4493 100644 --- a/build/opnfv-apex-common.spec +++ b/build/opnfv-apex-common.spec @@ -53,7 +53,7 @@ install config/network/network_settings_v6.yaml %{buildroot}%{_sysconfdir}/opnfv mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/python/apex install lib/common-functions.sh %{buildroot}%{_var}/opt/opnfv/lib/ install lib/utility-functions.sh %{buildroot}%{_var}/opt/opnfv/lib/ -install lib/python/apex-python-utils.py %{buildroot}%{_var}/opt/opnfv/lib/python/ +install lib/python/apex_python_utils.py %{buildroot}%{_var}/opt/opnfv/lib/python/ mkdir -p %{buildroot}%{python3_sitelib}/apex/ install lib/python/apex/__init__.py %{buildroot}%{python3_sitelib}/apex/ install lib/python/apex/deploy_env.py %{buildroot}%{python3_sitelib}/apex/ diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh index 777fa1c5..936decc3 100755 --- a/build/overcloud-full.sh +++ b/build/overcloud-full.sh @@ -13,6 +13,7 @@ source ./variables.sh source ./functions.sh populate_cache "$rdo_images_uri/overcloud-full.tar" +populate_cache "$openstack_congress" if [ ! -d images/ ]; then mkdir images; fi tar -xf cache/overcloud-full.tar -C images/ @@ -50,11 +51,23 @@ for package in ${dpdk_rpms[@]}; do dpdk_pkg_str+=" --upload $package:/root/dpdk_rpms" done +# tar up the congress puppet module +rm -rf puppet-congress +git clone https://github.com/radez/puppet-congress +pushd puppet-congress > /dev/null +git archive --format=tar.gz --prefix=congress/ origin/stable/mitaka > ../puppet-congress.tar.gz +popd > /dev/null + # installing forked opnfv-puppet-tripleo # enable connection tracking for protocal sctp # upload dpdk rpms but do not install +# enable connection tracking for protocal sctp +# install the congress rpms +# upload and explode the congress puppet module LIBGUESTFS_BACKEND=direct virt-customize \ --upload ../opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \ + --run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \ + --run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \ --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \ --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \ --run-command "mkdir /root/dpdk_rpms" \ @@ -64,6 +77,10 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --run-command "yum remove -y qemu-system-x86" \ --upload ../os-net-config.tar.gz:/usr/lib/python2.7/site-packages \ --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \ + --install "$openstack_congress" \ + --install "python2-congressclient" \ + --upload puppet-congress.tar.gz:/etc/puppet/modules/ \ + --run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \ -a overcloud-full_build.qcow2 mv -f overcloud-full_build.qcow2 overcloud-full.qcow2 diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh index 72f3a681..d59be0a3 100755 --- a/build/overcloud-onos.sh +++ b/build/overcloud-onos.sh @@ -19,7 +19,7 @@ cp -f overcloud-full.qcow2 overcloud-full-onos_build.qcow2 ####################################### # upgrade ovs into ovs 2.5.90 with NSH function -curl -O "$onos_artifacts_uri"package_ovs_rpm.tar.gz +curl -L -O ${onos_ovs_uri}/package_ovs_rpm.tar.gz tar -xzf package_ovs_rpm.tar.gz LIBGUESTFS_BACKEND=direct virt-customize --upload openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm:/root/ \ --run-command "yum install -y /root/openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm" \ @@ -31,7 +31,7 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload openvswitch-kmod-2.5.90-1.el7. # get the onos files rm -rf puppet-onos populate_cache "$onos_release_uri/$onos_release_file" -populate_cache "$onos_artifacts_uri/jdk-8u51-linux-x64.tar.gz" +populate_cache "$onos_jdk_uri/jdk-8u51-linux-x64.tar.gz" LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/$onos_release_file:/opt/ \ --run-command "mkdir /opt/onos && cd /opt/ && tar -xzf $onos_release_file -C /opt/onos --strip-components=1" \ diff --git a/build/undercloud.sh b/build/undercloud.sh index c1d7c3ab..9873c177 100755 --- a/build/undercloud.sh +++ b/build/undercloud.sh @@ -27,6 +27,7 @@ pushd images > /dev/null # enabling ceph OSDs to live on the controller # OpenWSMan package update supports the AMT Ironic driver for the TealBox # seeding configuration files specific to OPNFV +# add congress password to python-triploclient LIBGUESTFS_BACKEND=direct virt-customize \ --upload ../opnfv-tht.tar.gz:/usr/share \ --run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \ @@ -37,6 +38,11 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \ --upload ../opnfv-environment.yaml:/home/stack/ \ --upload ../virtual-environment.yaml:/home/stack/ \ + --install "python2-congressclient" \ + --run-command "sed -i '/SERVICE_LIST/a\\ \x27congress\x27: {\x27password_field\x27: \x27OVERCLOUD_CONGRESS_PASSWORD\x27},' /usr/lib/python2.7/site-packages/tripleoclient/constants.py" \ + --run-command "sed -i '/PASSWORD_NAMES =/a\\ \"OVERCLOUD_CONGRESS_PASSWORD\",' /usr/lib/python2.7/site-packages/tripleoclient/utils.py" \ + --run-command "sed -i '/AodhPassword/a\\ parameters\[\x27CongressPassword\x27\] = passwords\[\x27OVERCLOUD_CONGRESS_PASSWORD\x27\]' /usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py" \ + --run-command "sed -i '/^SERVICES/a\ \x27congress\x27: {\x27description\x27: \x27Congress Service\x27, \x27type\x27: \x27policy\x27, \x27path\x27: \x27/\x27, \x27port\x27: 1789 },' /usr/lib/python2.7/site-packages/os_cloud_config/keystone.py" \ -a undercloud_build.qcow2 # Add custom IPA to allow kernel params diff --git a/build/variables.sh b/build/variables.sh index 19294ce5..ccd1add5 100644 --- a/build/variables.sh +++ b/build/variables.sh @@ -11,14 +11,15 @@ rdo_images_uri=https://ci.centos.org/artifacts/rdo/images/mitaka/delorean/stable/ onos_release_uri=https://downloads.onosproject.org/nightly/ onos_release_file=onos-1.6.0-rc2.tar.gz -onos_artifacts_uri=http://205.177.226.237:9999/onosfw/ - +onos_jdk_uri=https://www.dropbox.com/s/qyujpib8zyhzeev +onos_ovs_uri=https://www.dropbox.com/s/gm6o6k80l56pf0o +openstack_congress=https://radez.fedorapeople.org/openstack-congress-2016.1-1.fc24.noarch.rpm dpdk_uri_base=http://artifacts.opnfv.org/ovsnfv dpdk_rpms=( -'ovs4opnfv-dpdk-16.04.0-2.el7.centos.x86_64.rpm' -'ovs4opnfv-dpdk-devel-16.04.0-2.el7.centos.x86_64.rpm' -'ovs4opnfv-dpdk-examples-16.04.0-2.el7.centos.x86_64.rpm' -'ovs4opnfv-dpdk-tools-16.04.0-2.el7.centos.x86_64.rpm' -'ovs4opnfv-openvswitch-2.5.90-0.12060.git46ed1382.1.el7.centos.x86_64.rpm' +'ovs4opnfv-32930523-dpdk-16.04.0-1.el7.centos.x86_64.rpm' +'ovs4opnfv-32930523-dpdk-devel-16.04.0-1.el7.centos.x86_64.rpm' +'ovs4opnfv-32930523-dpdk-examples-16.04.0-1.el7.centos.x86_64.rpm' +'ovs4opnfv-32930523-dpdk-tools-16.04.0-1.el7.centos.x86_64.rpm' +'ovs4opnfv-32930523-openvswitch-2.5.90-0.12032.gitc61e93d6.1.el7.centos.x86_64.rpm' ) |