[openstack-nova/f17] split into more subpackages

Pádraig Brady pbrady at fedoraproject.org
Mon Jul 30 02:43:45 UTC 2012


commit 4cb5949ac5496e1a728784d54b6294169843ef8f
Author: Pádraig Brady <P at draigBrady.com>
Date:   Sun Jul 29 01:39:01 2012 +0100

    split into more subpackages

 openstack-nova.spec |  463 ++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 422 insertions(+), 41 deletions(-)
---
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 189d57a..7890a9f 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2012.1.1
-Release:          4%{?dist}
+Release:          10%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -59,27 +59,190 @@ BuildRequires:    python-setuptools
 BuildRequires:    python-netaddr
 BuildRequires:    python-lockfile
 
+Requires:         openstack-nova-compute = %{version}-%{release}
+Requires:         openstack-nova-cert = %{version}-%{release}
+Requires:         openstack-nova-scheduler = %{version}-%{release}
+Requires:         openstack-nova-volume = %{version}-%{release}
+Requires:         openstack-nova-api = %{version}-%{release}
+Requires:         openstack-nova-network = %{version}-%{release}
+Requires:         openstack-nova-objectstore = %{version}-%{release}
+Requires:         openstack-nova-console = %{version}-%{release}
+
+
+%description
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+%package common
+Summary:          Components common to all OpenStack services
+Group:            Applications/System
+
 Requires:         openstack-utils
 Requires:         python-nova = %{version}-%{release}
 
-Requires:         bridge-utils
-Requires:         dnsmasq-utils
+Requires(post):   systemd-units
+Requires(preun):  systemd-units
+Requires(postun): systemd-units
+Requires(pre):    shadow-utils
+
+%description common
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains scripts, config and dependencies shared
+between all the OpenStack nova services.
+
+
+%package compute
+Summary:          OpenStack Nova Virtual Machine control service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+Requires:         curl
+Requires:         iscsi-initiator-utils
+Requires:         iptables iptables-ipv6
+Requires:         vconfig
 Requires:         libguestfs-mount >= 1.7.17
 # The fuse dependency should be added to libguestfs-mount
 Requires:         fuse
 Requires:         libvirt >= 0.8.7
-Requires:         MySQL-python
+Requires:         libvirt-python
+Requires(pre):    qemu-kvm
 
-Requires:         euca2ools
-Requires:         openssl
-Requires:         sudo
+%description compute
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
 
-Requires(post):   systemd-units
-Requires(preun):  systemd-units
-Requires(postun): systemd-units
-Requires(pre):    shadow-utils qemu-kvm
+This package contains the Nova service for controlling Virtual Machines.
 
-%description
+
+%package network
+Summary:          OpenStack Nova Network control service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+Requires:         vconfig
+Requires:         radvd
+Requires:         bridge-utils
+Requires:         dnsmasq-utils
+
+%description network
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova service for controlling networking.
+
+
+%package volume
+Summary:          OpenStack Nova storage volume control service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+Requires:         lvm2
+Requires:         scsi-target-utils
+
+%description volume
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova service for controlling storage volumes.
+
+
+%package scheduler
+Summary:          OpenStack Nova VM distribution service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+
+%description scheduler
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the service for scheduling where
+to run Virtual Machines in the cloud.
+
+
+%package cert
+Summary:          OpenStack Nova certificate management service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+
+%description cert
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova service for managing certificates.
+
+
+%package api
+Summary:          OpenStack Nova API services
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+
+%description api
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova services providing programmatic access.
+
+
+%package objectstore
+Summary:          OpenStack Nova simple object store service
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+
+%description objectstore
 OpenStack Compute (codename Nova) is open source software designed to
 provision and manage large networks of virtual machines, creating a
 redundant and scalable cloud computing platform. It gives you the
@@ -89,47 +252,71 @@ through users and projects. OpenStack Compute strives to be both
 hardware and hypervisor agnostic, currently supporting a variety of
 standard hardware configurations and seven major hypervisors.
 
+This package contains the Nova service providing a simple object store.
+
+
+%package console
+Summary:          OpenStack Nova console access services
+Group:            Applications/System
+
+Requires:         openstack-nova-common
+
+%description console
+OpenStack Compute (codename Nova) is open source software designed to
+provision and manage large networks of virtual machines, creating a
+redundant and scalable cloud computing platform. It gives you the
+software, control panels, and APIs required to orchestrate a cloud,
+including running instances, managing networks, and controlling access
+through users and projects. OpenStack Compute strives to be both
+hardware and hypervisor agnostic, currently supporting a variety of
+standard hardware configurations and seven major hypervisors.
+
+This package contains the Nova services providing
+console access services to Virtual Machines.
+
+
 %package -n       python-nova
 Summary:          Nova Python libraries
 Group:            Applications/System
 
-Requires:         vconfig
-Requires:         PyXML
-Requires:         curl
+Requires:         openssl
+Requires:         sudo
+
+Requires:         MySQL-python
+
 Requires:         python-crypto
-Requires:         libvirt-python
-Requires:         python-anyjson
-Requires:         python-boto
-Requires:         python-cheetah
-# TODO: make these messaging libs optional
+Requires:         python-paramiko
+
 Requires:         python-qpid
 Requires:         python-kombu
 Requires:         python-amqplib
+
 Requires:         python-daemon
 Requires:         python-eventlet
 Requires:         python-greenlet
 Requires:         python-gflags
 Requires:         python-iso8601
 Requires:         python-lockfile
+Requires:         python-netaddr
 Requires:         python-lxml
+Requires:         PyXML
+Requires:         python-anyjson
+Requires:         python-boto
+Requires:         python-cheetah
+Requires:         python-ldap
+
 Requires:         python-memcached
-Requires:         python-paramiko
-Requires:         python-routes
+
 Requires:         python-sqlalchemy
+Requires:         python-migrate
+
+Requires:         python-paste-deploy
+Requires:         python-routes
 Requires:         python-webob
-Requires:         python-netaddr
+
 # TODO: remove the following dependency which is minimal
 Requires:         python-glance
 Requires:         python-novaclient
-Requires:         python-paste-deploy
-Requires:         python-migrate
-Requires:         python-ldap
-Requires:         radvd
-Requires:         iptables iptables-ipv6
-Requires:         iscsi-initiator-utils
-Requires:         scsi-target-utils
-Requires:         lvm2
-Requires:         coreutils
 
 %description -n   python-nova
 OpenStack Compute (codename Nova) is open source software designed to
@@ -296,43 +483,189 @@ rm -fr %{buildroot}%{python_sitelib}/run_tests.*
 rm -f %{buildroot}%{_bindir}/nova-combined
 rm -f %{buildroot}/usr/share/doc/nova/README*
 
-%pre
+%pre common
 getent group nova >/dev/null || groupadd -r nova --gid 162
 if ! getent passwd nova >/dev/null; then
   useradd -u 162 -r -g nova -G nova,nobody,qemu -d %{_sharedstatedir}/nova -s /sbin/nologin -c "OpenStack Nova Daemons" nova
 fi
+exit 0
+
+%pre compute
 # Add nova to the fuse group (if present) to support guestmount
 if getent group fuse >/dev/null; then
   usermod -a -G fuse nova
 fi
 exit 0
 
-%post
+%post compute
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post network
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post volume
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post scheduler
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post cert
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post api
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post objectstore
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%post console
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
 
-
-%preun
+%preun compute
 if [ $1 -eq 0 ] ; then
-    for svc in api cert compute network objectstore scheduler volume direct-api metadata-api console consoleauth xvpvncproxy; do
+    for svc in compute; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun network
+if [ $1 -eq 0 ] ; then
+    for svc in network; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun volume
+if [ $1 -eq 0 ] ; then
+    for svc in volume; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun scheduler
+if [ $1 -eq 0 ] ; then
+    for svc in scheduler; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun cert
+if [ $1 -eq 0 ] ; then
+    for svc in cert; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun api
+if [ $1 -eq 0 ] ; then
+    for svc in api direct-api metadata-api; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun objectstore
+if [ $1 -eq 0 ] ; then
+    for svc in objectstore; do
+        /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
+        /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+    done
+fi
+%preun console
+if [ $1 -eq 0 ] ; then
+    for svc in console consoleauth xvpvncproxy; do
         /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
         /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
     done
 fi
 
-%postun
+%postun compute
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in compute; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun network
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in network; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun volume
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
-    for svc in api cert compute network objectstore scheduler volume direct-api metadata-api console consoleauth xvpvncproxy; do
+    for svc in volume; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun scheduler
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in scheduler; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun cert
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in cert; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun api
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in api direct-api metadata-api; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun objectstore
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in objectstore; do
+        /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+    done
+fi
+%postun console
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    for svc in console consoleauth xvpvncproxy; do
         /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
     done
 fi
 
 %files
 %doc LICENSE
+%{_bindir}/nova-all
+
+%files common
+%doc LICENSE
 %dir %{_sysconfdir}/nova
 %config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/nova.conf
 %config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/api-paste.ini
@@ -344,8 +677,11 @@ fi
 %dir %attr(0755, nova, root) %{_localstatedir}/log/nova
 %dir %attr(0755, nova, root) %{_localstatedir}/run/nova
 
-%{_bindir}/nova-*
-%{_unitdir}/openstack-nova-*.service
+%{_bindir}/nova-stack
+%{_bindir}/nova-clear-rabbit-queues
+%{_bindir}/nova-manage
+%{_bindir}/nova-rootwrap
+
 %{_datarootdir}/nova
 %{_mandir}/man1/nova*.1.gz
 
@@ -358,6 +694,30 @@ fi
 %dir %{_sharedstatedir}/nova/networks
 %dir %{_sharedstatedir}/nova/tmp
 
+%files compute
+%{_bindir}/nova-compute
+%{_bindir}/nova-instance-usage-audit
+%{_unitdir}/openstack-nova-compute.service
+%{python_sitelib}/nova/rootwrap/compute.py*
+
+%files network
+%{_bindir}/nova-network
+%{_bindir}/nova-dhcpbridge
+%{_unitdir}/openstack-nova-network.service
+%{python_sitelib}/nova/rootwrap/network.py*
+
+%files volume
+%{_bindir}/nova-volume
+%{_unitdir}/openstack-nova-volume.service
+%{python_sitelib}/nova/rootwrap/volume.py*
+
+%files scheduler
+%{_bindir}/nova-scheduler
+%{_unitdir}/openstack-nova-scheduler.service
+
+%files cert
+%{_bindir}/nova-cert
+%{_unitdir}/openstack-nova-cert.service
 %dir %{_sharedstatedir}/nova/CA/
 %dir %{_sharedstatedir}/nova/CA/certs
 %dir %{_sharedstatedir}/nova/CA/crl
@@ -374,8 +734,26 @@ fi
 %dir %attr(0750, -, -) %{_sharedstatedir}/nova/CA/private
 %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sharedstatedir}/nova/CA/private/cakey.pem
 
+%files api
+%{_bindir}/nova-api*
+%{_bindir}/nova-direct-api
+%{_unitdir}/openstack-nova-*api.service
+
+%files objectstore
+%{_bindir}/nova-objectstore
+%{_unitdir}/openstack-nova-objectstore.service
+
+%files console
+%{_bindir}/nova-console*
+%{_bindir}/nova-xvpvncproxy
+%{_unitdir}/openstack-nova-console*.service
+%{_unitdir}/openstack-nova-xvpvncproxy.service
+
 %files -n python-nova
 %defattr(-,root,root,-)
+%exclude %{python_sitelib}/nova/rootwrap/compute.py*
+%exclude %{python_sitelib}/nova/rootwrap/network.py*
+%exclude %{python_sitelib}/nova/rootwrap/volume.py*
 %doc LICENSE
 %{python_sitelib}/nova
 %{python_sitelib}/nova-%{version}-*.egg-info
@@ -386,6 +764,9 @@ fi
 %endif
 
 %changelog
+* Fri Jul 27 2012 Pádraig Brady <P at draigBrady.com> - 2012.1.1-10
+- Split out into more sub packages
+
 * Fri Jul 20 2012 Pádraig Brady <P at draigBrady.com> - 2012.1.1-4
 - Enable auto cleanup of old cached instance images
 - Fix ram_allocation_ratio based over subscription


More information about the scm-commits mailing list