From: Mikhail Ivanov Date: Tue, 17 Nov 2015 12:58:33 +0000 (+0300) Subject: Rebuild neutron-lbaas for centos7 X-Git-Tag: mos-9.0~7 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F13956%2F9;p=openstack-build%2Fneutron-lbaas-build.git Rebuild neutron-lbaas for centos7 Change-Id: I31157f5c974072efa68736d8bb211441c145b07e --- diff --git a/centos7/rpm/SOURCES/neutron-lbaas-agent.service b/centos7/rpm/SOURCES/neutron-lbaas-agent.service new file mode 100644 index 0000000..2f8f3a4 --- /dev/null +++ b/centos7/rpm/SOURCES/neutron-lbaas-agent.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenStack Neutron Load Balancing as a Service Agent +After=syslog.target network.target + +[Service] +Type=simple +User=neutron +ExecStart=/usr/bin/neutron-lbaas-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-lbaas-agent --log-file /var/log/neutron/lbaas-agent.log +PrivateTmp=false +KillMode=process + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SOURCES/neutron-lbaasv2-agent.service b/centos7/rpm/SOURCES/neutron-lbaasv2-agent.service new file mode 100644 index 0000000..80b422b --- /dev/null +++ b/centos7/rpm/SOURCES/neutron-lbaasv2-agent.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenStack Neutron Load Balancing as a Service (API v2.x) Agent +After=syslog.target network.target + +[Service] +Type=simple +User=neutron +ExecStart=/usr/bin/neutron-lbaasv2-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/lbaas_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-lbaasv2-agent --log-file /var/log/neutron/lbaas-agent.log +PrivateTmp=false +KillMode=process + +[Install] +WantedBy=multi-user.target diff --git a/centos7/rpm/SPECS/openstack-neutron-lbaas.spec b/centos7/rpm/SPECS/openstack-neutron-lbaas.spec new file mode 100644 index 0000000..0c6db0f --- /dev/null +++ b/centos7/rpm/SPECS/openstack-neutron-lbaas.spec @@ -0,0 +1,176 @@ +%global modulename neutron_lbaas +%global servicename neutron-lbaas +%global type LBaaS + +%global release_name liberty + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +Name: openstack-%{servicename} +Version: 7.0.0 +Release: 1%{?milestone}%{?dist}~mos8.0.1 +Epoch: 1 +Summary: Openstack Networking %{type} plugin + +License: ASL 2.0 +URL: http://launchpad.net/neutron/ +Source0: http://launchpad.net/neutron/%{release_name}/%{version}/+download/%{servicename}-%{upstream_version}.tar.gz +Source1: %{servicename}-agent.service +Source2: %{servicename}v2-agent.service + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: python-setuptools +BuildRequires: systemd-units +BuildRequires: git + +Requires: python-%{servicename} = %{epoch}:%{version}-%{release} +Requires: openstack-neutron >= %{epoch}:%{version} + +%description +This is a %{type} service plugin for Openstack Neutron (Networking) service. + + +%package -n python-%{servicename} +Summary: Neutron %{type} Python libraries +Group: Applications/System + +Requires: python-neutron >= %{epoch}:%{version} +Requires: python-alembic >= 0.7.2 +Requires: python-barbicanclient >= 3.0.1 +Requires: python-eventlet +Requires: python-netaddr >= 0.7.12 +Requires: python-oslo-config >= 2:1.9.3 +Requires: python-oslo-db >= 1.7.0 +Requires: python-oslo-log >= 1.0.0 +Requires: python-oslo-messaging >= 1.8.0 +Requires: python-oslo-serialization >= 1.4.0 +Requires: python-oslo-utils >= 1.4.0 +Requires: python-pbr +Requires: python-pyasn1 +Requires: python-pyasn1-modules +Requires: python-requests +Requires: python-six +Requires: python-sqlalchemy >= 0.9.7 +Requires: pyOpenSSL + + +%description -n python-%{servicename} +This is a %{type} service plugin for Openstack Neutron (Networking) service. + +This package contains the Neutron %{type} Python library. + + +%package -n python-%{servicename}-tests +Summary: Neutron %{type} tests +Group: Applications/System + +Requires: python-%{servicename} = %{epoch}:%{version}-%{release} + + +%description -n python-%{servicename}-tests +This is a %{type} service plugin for Openstack Neutron (Networking) service. + +This package contains Neutron %{type} test files. + + +%prep +%autosetup -n %{servicename}-%{upstream_version} -S git + +# Let's handle dependencies ourselves +rm -f requirements.txt + +# Kill egg-info in order to generate new SOURCES.txt +rm -rf neutron_lbaas.egg-info + +%build +export PBR_VERSION=%{version} +export SKIP_PIP_INSTALL=1 +%{__python2} setup.py build + + +%install +export PBR_VERSION=%{version} +export SKIP_PIP_INSTALL=1 +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} + +# Move rootwrap files to proper location +install -d -m 755 %{buildroot}%{_datarootdir}/neutron/rootwrap +mv %{buildroot}/usr/etc/neutron/rootwrap.d/*.filters %{buildroot}%{_datarootdir}/neutron/rootwrap + +# Move config files to proper location +install -d -m 755 %{buildroot}%{_sysconfdir}/neutron +mv %{buildroot}/usr/etc/neutron/*.ini %{buildroot}%{_sysconfdir}/neutron +mv %{buildroot}/usr/etc/neutron/*.conf %{buildroot}%{_sysconfdir}/neutron + +# Install systemd units +install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{servicename}-agent.service +install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{servicename}v2-agent.service + +# Create configuration directories that can be populated by users with custom *.conf files +mkdir -p %{buildroot}/%{_sysconfdir}/neutron/conf.d/%{servicename}-agent +mkdir -p %{buildroot}/%{_sysconfdir}/neutron/conf.d/%{servicename}v2-agent + +# Make sure neutron-server loads new configuration file +mkdir -p %{buildroot}/%{_datadir}/neutron/server +ln -s %{_sysconfdir}/neutron/%{modulename}.conf %{buildroot}%{_datadir}/neutron/server/%{modulename}.conf + + +%post +%systemd_post %{servicename}-agent.service +%systemd_post %{servicename}v2-agent.service + + +%preun +%systemd_preun %{servicename}-agent.service +%systemd_preun %{servicename}v2-agent.service + + +%postun +%systemd_postun_with_restart %{servicename}-agent.service +%systemd_postun_with_restart %{servicename}v2-agent.service + + +%files +%license LICENSE +%doc AUTHORS CONTRIBUTING.rst README.rst +%{_bindir}/%{servicename}-agent +%{_bindir}/%{servicename}v2-agent +%{_unitdir}/%{servicename}-agent.service +%{_unitdir}/%{servicename}v2-agent.service +%{_datarootdir}/neutron/rootwrap/lbaas-haproxy.filters +%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/lbaas_agent.ini +%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/neutron_lbaas.conf +%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/services_lbaas.conf +%dir %{_sysconfdir}/neutron/conf.d +%dir %{_sysconfdir}/neutron/conf.d/%{servicename}-agent +%dir %{_sysconfdir}/neutron/conf.d/%{servicename}v2-agent +%{_datadir}/neutron/server/%{modulename}.conf + + +%files -n python-%{servicename} +%{python2_sitelib}/%{modulename} +%{python2_sitelib}/%{modulename}-7.0.0-py%{python2_version}.egg-info +%exclude %{python2_sitelib}/%{modulename}/tests + + +%files -n python-%{servicename}-tests +%{python2_sitelib}/%{modulename}/tests + + +%changelog +* Tue Nov 17 2015 Mikhail Ivanov - 1:7.0.0-1~mos8.0.1 +- Rebuild for MOS8.0 + +* Tue Oct 20 2015 Alan Pevec 1:7.0.0-1 +- Update to 7.0.0 + +* Mon Oct 12 2015 Alan Pevec 1:7.0.0-0.3.0rc2 +- Update to upstream 7.0.0.0rc2 + +* Thu Oct 01 2015 Ihar Hrachyshka 1:7.0.0-0.2.0rc1.el7 +- Update to upstream 7.0.0.0rc1 + +* Wed Sep 16 2015 Ihar Hrachyshka 1:7.0.0-0.1.0b3.el7 +- Initial release for Liberty M3. diff --git a/tests/runtests.sh b/tests/runtests.sh index 39b8b0e..2f1fe30 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -25,6 +25,7 @@ install_packages() { echo "mysql-server mysql-server/root_password_again select $MYSQL_PASS" | debconf-set-selections apt-get install -y --force-yes rabbitmq-server mysql-server mysql-client-core-5.5 python-mysqldb keystone else + setenforce 0 |: #yum install -y openstack-keystone rabbitmq-server mysql-server MySQL-client python-oslo-utils yum install -y openstack-keystone rabbitmq-server python-oslo-utils #CentOS 7 temporary workaround