diff options
author | Tim Rozet <trozet@redhat.com> | 2016-08-03 18:00:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-03 18:00:14 +0000 |
commit | 80783b3b94f3f1dba94bcb15d43be311e157120e (patch) | |
tree | ca51b862d834397dce421741455ded4fac74c9ae | |
parent | 15f9318043b5ccfddaa3d74880a834493c871ef1 (diff) | |
parent | 2e9b552d5efe383ce08ff48a9739031f28251013 (diff) |
Merge "Build Congress RPM package"
-rw-r--r-- | build/Makefile | 27 | ||||
-rw-r--r-- | build/network-environment.yaml | 1 | ||||
-rwxr-xr-x | build/openstack-congress.spec | 80 | ||||
-rwxr-xr-x | build/overcloud-full.sh | 4 | ||||
-rw-r--r-- | build/variables.sh | 3 | ||||
-rwxr-xr-x | ci/dev_deploy_check.sh | 3 | ||||
-rwxr-xr-x | lib/virtual-setup-functions.sh | 18 |
7 files changed, 123 insertions, 13 deletions
diff --git a/build/Makefile b/build/Makefile index a1089a84..96711d23 100644 --- a/build/Makefile +++ b/build/Makefile @@ -27,7 +27,7 @@ all_networks="admin_network private_network storage_network external_network api all: iso .PHONY: clean -clean: images-clean rpms-clean iso-clean tacker-clean +clean: images-clean rpms-clean iso-clean tacker-clean congress-clean .PHONY: images images: undercloud overcloud-full overcloud-opendaylight overcloud-onos overcloud-opendaylight-sfc @@ -107,6 +107,29 @@ openstack-tacker-2015.2-1.noarch.rpm: rpmbuild --clean -bb --target noarch openstack-tacker.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' ############### +# CONGRESS # +############### + +.PHONY: congress-clean + +congress-clean: + @rm -rf openstack-congress-2016.1 + @rm -f openstack-congress.tar.gz + +openstack-congress.tar.gz: + @echo "Preparing the Congress RPM prerequisites" + git clone http://github.com/openstack/congress -b stable/mitaka openstack-congress-2016.1 + cd openstack-congress-2016.1 && curl -O https://radez.fedorapeople.org/openstack-congress.service + tar czf openstack-congress.tar.gz openstack-congress-2016.1 + +.PHONY: congress-rpm +congress-rpm: openstack-congress.tar.gz openstack-congress-2016.1-1.noarch.rpm + +openstack-congress-2016.1-1.noarch.rpm: + @echo "Building the Congress RPM" + rpmbuild --clean -bb --target noarch openstack-congress.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' + +############### # UNDERCLOUD # ############### @@ -151,7 +174,7 @@ overcloud-full-clean: .PHONY: overcloud-full overcloud-full: images/overcloud-full.qcow2 -images/overcloud-full.qcow2: tacker-rpm +images/overcloud-full.qcow2: tacker-rpm congress-rpm @echo "Building the Apex Base Overcloud Image" @./overcloud-full.sh diff --git a/build/network-environment.yaml b/build/network-environment.yaml index 84bb5cef..4493322a 100644 --- a/build/network-environment.yaml +++ b/build/network-environment.yaml @@ -82,6 +82,7 @@ parameters: SwiftMgmtNetwork: storage SwiftProxyNetwork: storage TackerApiNetwork: internal_api + CongressApiNetwork: internal_api HorizonNetwork: internal_api MemcachedNetwork: internal_api RabbitMqNetwork: internal_api diff --git a/build/openstack-congress.spec b/build/openstack-congress.spec new file mode 100755 index 00000000..0dd3491c --- /dev/null +++ b/build/openstack-congress.spec @@ -0,0 +1,80 @@ +%define debug_package %{nil} + +Name: openstack-congress +Version: 2016.1 +Release: 1%{?dist} +Summary: OpenStack servicevm/device manager + +Group: Applications/Internet +License: Apache 2.0 +URL: https://wiki.openstack.org/wiki/Congress/Installation +Source0: openstack-congress.tar.gz + +BuildArch: noarch +BuildRequires: python-setuptools python2-oslo-config python2-debtcollector +#Requires: pbr>=0.8 Paste PasteDeploy>=1.5.0 Routes>=1.12.3!=2.0 anyjson>=0.3.3 argparse +#Requires: Babel>=1.3 eventlet>=0.16.1!=0.17.0 greenlet>=0.3.2 httplib2>=0.7.5 requests>=2.2.0!=2.4.0 +#Requires: iso8601>=0.1.9 kombu>=2.5.0 netaddr>=0.7.12 SQLAlchemy<1.1.0>=0.9.7 +#Requires: WebOb>=1.2.3 python-heatclient>=0.3.0 python-keystoneclient>=1.1.0 alembic>=0.7.2 six>=1.9.0 +#Requires: stevedore>=1.5.0 http oslo.config>=1.11.0 oslo.messaging!=1.17.0!=1.17.1>=1.16.0 oslo.rootwrap>=2.0.0 python-novaclient>=2.22.0 + +%description +OpenStack policy manager + +%prep +#git archive --format=tar.gz --prefix=openstack-congress-%{version}/ HEAD > openstack-congress.tar.gz + +%setup -q + + +%build +#rm requirements.txt +#/usr/bin/python setup.py build + + +%install +/usr/bin/python setup.py install --prefix=%{buildroot} --install-lib=%{buildroot}/usr/lib/python2.7/site-packages + +install -d -m 755 %{buildroot}/var/log/congress/ +install -d -m 755 %{buildroot}/etc/congress/snapshot/ + +install etc/api-paste.ini %{buildroot}/etc/congress/api-paste.ini +install etc/policy.json %{buildroot}/etc/congress/policy.json +tox -egenconfig +install etc/congress.conf.sample %{buildroot}/etc/congress/congress.conf + +install -p -D -m 644 openstack-congress.service %{buildroot}%{_unitdir}/openstack-congress.service +install -d -m 755 %{buildroot}%{_sharedstatedir}/congress + +%pre +getent group congress >/dev/null || groupadd -r congress +if ! getent passwd congress >/dev/null; then + useradd -r -g congress -G congress,nobody -d %{_sharedstatedir}/congress -s /sbin/nologin -c "OpenStack Congress Daemon" congress +fi +exit 0 + +%post +%systemd_post openstack-congress + +%preun +%systemd_preun openstack-congress + +%postun +%systemd_postun_with_restart openstack-congress + +%files + +%config /etc/congress/congress.conf +/etc/congress/policy.json +/etc/congress/api-paste.ini +/bin/congress-server +/bin/congress-db-manage +%{_unitdir}/openstack-congress.service +/usr/lib/python2.7/site-packages/congress/* +/usr/lib/python2.7/site-packages/congress-* +/usr/lib/python2.7/site-packages/congress_tempest_tests/* +/usr/lib/python2.7/site-packages/antlr3runtime/* +%dir %attr(0750, congress, root) %{_localstatedir}/log/congress + +%changelog + diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh index 93d2b5a4..6a72705a 100755 --- a/build/overcloud-full.sh +++ b/build/overcloud-full.sh @@ -13,7 +13,6 @@ 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/ @@ -121,7 +120,8 @@ 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" \ + --upload ../noarch/openstack-congress-2016.1-1.el7.centos.noarch.rpm:/root/ \ + --install /root/openstack-congress-2016.1-1.el7.centos.noarch.rpm \ --install "python2-congressclient" \ --upload puppet-congress.tar.gz:/etc/puppet/modules/ \ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \ diff --git a/build/variables.sh b/build/variables.sh index 27118c93..134cc295 100644 --- a/build/variables.sh +++ b/build/variables.sh @@ -13,8 +13,7 @@ onos_release_uri=https://downloads.onosproject.org/nightly/ onos_release_file=onos-1.6.0-rc2.tar.gz onos_jdk_uri=https://www.dropbox.com/s/qyujpib8zyhzeev onos_ovs_uri=https://www.dropbox.com/s/2dyd8zyt2l6p586 -openstack_congress=https://radez.fedorapeople.org/openstack-congress-2016.1-1.fc24.noarch.rpm -doctor_driver=https://raw.githubusercontent.com/muroi/congress/doctor-poc/congress/datasources/doctor_driver.py +doctor_driver=https://raw.githubusercontent.com/openstack/congress/master/congress/datasources/doctor_driver.py dpdk_uri_base=http://artifacts.opnfv.org/ovsnfv dpdk_rpms=( diff --git a/ci/dev_deploy_check.sh b/ci/dev_deploy_check.sh index 831ff1fd..68a9ac2b 100755 --- a/ci/dev_deploy_check.sh +++ b/ci/dev_deploy_check.sh @@ -45,3 +45,6 @@ done # Make sure jinja2 is installed easy_install-3.4 jinja2 + +# TODO(cgoncalves): remove once congress RPM is downloaded from upstream +easy_install-3.4 tox diff --git a/lib/virtual-setup-functions.sh b/lib/virtual-setup-functions.sh index e7410da7..ed4d4dfd 100755 --- a/lib/virtual-setup-functions.sh +++ b/lib/virtual-setup-functions.sh @@ -40,6 +40,17 @@ EOF fi for i in $(seq 0 $vm_index); do + if [ "$VM_COMPUTES" -gt 0 ]; then + capability="profile:compute" + VM_COMPUTES=$((VM_COMPUTES - 1)) + else + capability="profile:control" + if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "$ha_enabled" == "True" && "$ramsize" -lt 10240 ]]; then + echo "WARN: RAM per controller too low. OpenDaylight specified in HA deployment requires at least 10GB" + echo "INFO: Increasing RAM per controller to 10GB" + ramsize=10240 + fi + fi if ! virsh list --all | grep baremetal${i} > /dev/null; then define_vm baremetal${i} network 41 'admin_network' $vcpus $ramsize for n in private_network public_network storage_network api_network; do @@ -54,13 +65,6 @@ EOF #virsh vol-list default | grep baremetal${i} 2>&1> /dev/null || virsh vol-create-as default baremetal${i}.qcow2 41G --format qcow2 mac=$(virsh domiflist baremetal${i} | grep admin_network | awk '{ print $5 }') - if [ "$VM_COMPUTES" -gt 0 ]; then - capability="profile:compute" - VM_COMPUTES=$((VM_COMPUTES - 1)) - else - capability="profile:control" - fi - cat >> $CONFIG/instackenv-virt.json << EOF { "pm_addr": "192.168.122.1", |