Add magnum to anvil
Change-Id: I35e467a5ecdccdb25a040171c967d2492342f51c
This commit is contained in:
parent
dda9b30745
commit
1fe1964db9
|
@ -0,0 +1,4 @@
|
|||
# Settings for component magnum-client
|
||||
---
|
||||
|
||||
...
|
|
@ -0,0 +1,8 @@
|
|||
# Settings for component magnum
|
||||
---
|
||||
|
||||
daemon_args:
|
||||
magnum-api: "/usr/bin/magnum-api --config-file /etc/magnum/magnum.conf --log-dir=/var/log/magnum"
|
||||
magnum-conductor: "/usr/bin/magnum-conductor --config-file /etc/magnum/magnum.conf --log-dir=/var/log/magnum"
|
||||
|
||||
...
|
|
@ -137,6 +137,10 @@ components:
|
|||
python_entrypoints: True
|
||||
neutron-client:
|
||||
python_entrypoints: True
|
||||
magnum:
|
||||
python_entrypoints: True
|
||||
magnum-client:
|
||||
python_entrypoints: True
|
||||
nova:
|
||||
python_entrypoints: True
|
||||
pips:
|
||||
|
|
|
@ -59,6 +59,12 @@ oslo-config:
|
|||
oslo-incubator:
|
||||
repo: git://github.com/openstack/oslo-incubator.git
|
||||
tag: 2015.1.0
|
||||
magnum:
|
||||
repo: git://github.com/openstack/magnum.git
|
||||
tag: 2015.1.0
|
||||
magnum-client:
|
||||
repo: git://github.com/openstack/python-magnumclient.git
|
||||
tag: 0.0.1
|
||||
neutron-client:
|
||||
repo: git://github.com/openstack/python-neutronclient.git
|
||||
tag: 2.4.0
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
---
|
||||
# Persona that includes all known components
|
||||
components:
|
||||
# Order matters here!
|
||||
# Oslo libraries
|
||||
- oslo-config
|
||||
- oslo-messaging
|
||||
- pycadf
|
||||
# Core components
|
||||
- keystone
|
||||
- glance
|
||||
- ceilometer
|
||||
- cinder
|
||||
- heat
|
||||
- magnum
|
||||
- neutron
|
||||
- neutron-fwaas
|
||||
- neutron-lbaas
|
||||
- neutron-vpnaas
|
||||
- nova
|
||||
- trove
|
||||
# Client used by components
|
||||
- ceilometer-client
|
||||
- cinder-client
|
||||
- glance-client
|
||||
- heat-client
|
||||
- keystone-client
|
||||
- magnum-client
|
||||
- neutron-client
|
||||
- nova-client
|
||||
- swift-client
|
||||
- trove-client
|
||||
- openstack-client
|
||||
# Horizon is given a later priority (typically everything is done at the
|
||||
# same time in stage zero); in its own stage since it requires basically all
|
||||
# the existing things to be pre-built/started... before it can be...
|
||||
- django-openstack-auth: 1
|
||||
- horizon: 2
|
||||
subsystems:
|
||||
glance:
|
||||
- api
|
||||
- registry
|
||||
keystone:
|
||||
- all
|
||||
nova:
|
||||
- api
|
||||
- cert
|
||||
- compute
|
||||
- conductor
|
||||
- scheduler
|
||||
neutron:
|
||||
- server
|
||||
- agent
|
||||
- l3-agent
|
||||
- metadata-agent
|
||||
- dhcp-agent
|
||||
cinder:
|
||||
- api
|
||||
- scheduler
|
||||
- volume
|
||||
heat:
|
||||
- api
|
||||
- api-cfn
|
||||
- api-cloudwatch
|
||||
- engine
|
||||
ceilometer:
|
||||
- api
|
||||
- collector
|
||||
- compute
|
||||
- central
|
||||
magnum:
|
||||
- api
|
||||
- conductor
|
||||
supports:
|
||||
- rhel
|
||||
- fedora
|
||||
- centos
|
||||
...
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"context_is_admin": "role:admin",
|
||||
"admin_or_owner": "is_admin:True or project_id:%(project_id)s",
|
||||
"default": "rule:admin_or_owner",
|
||||
"admin_api": "is_admin:True",
|
||||
|
||||
"bay:create": "rule:default",
|
||||
"bay:delete": "rule:default",
|
||||
"bay:detail": "rule:default",
|
||||
"bay:get": "rule:default",
|
||||
"bay:get_all": "rule:default",
|
||||
"bay:update": "rule:default",
|
||||
|
||||
"baymodel:create": "rule:default",
|
||||
"baymodel:delete": "rule:default",
|
||||
"baymodel:detail": "rule:default",
|
||||
"baymodel:get": "rule:default",
|
||||
"baymodel:get_all": "rule:default",
|
||||
"baymodel:update": "rule:default",
|
||||
|
||||
"node:create": "rule:default",
|
||||
"node:delete": "rule:default",
|
||||
"node:detail": "rule:default",
|
||||
"node:get": "rule:default",
|
||||
"node:get_all": "rule:default",
|
||||
"node:update": "rule:default",
|
||||
|
||||
"pod:create": "rule:default",
|
||||
"pod:delete": "rule:default",
|
||||
"pod:detail": "rule:default",
|
||||
"pod:get": "rule:default",
|
||||
"pod:get_all": "rule:default",
|
||||
"pod:update": "rule:default",
|
||||
|
||||
"rc:create": "rule:default",
|
||||
"rc:delete": "rule:default",
|
||||
"rc:detail": "rule:default",
|
||||
"rc:get": "rule:default",
|
||||
"rc:get_all": "rule:default",
|
||||
"rc:update": "rule:default",
|
||||
|
||||
"service:create": "rule:default",
|
||||
"service:delete": "rule:default",
|
||||
"service:detail": "rule:default",
|
||||
"service:get": "rule:default",
|
||||
"service:get_all": "rule:default",
|
||||
"service:update": "rule:default",
|
||||
|
||||
"container:create": "rule:default",
|
||||
"container:delete": "rule:default",
|
||||
"container:detail": "rule:default",
|
||||
"container:get": "rule:default",
|
||||
"container:get_all": "rule:default",
|
||||
"container:update": "rule:default",
|
||||
|
||||
"certificate:create": "rule:default",
|
||||
"certificate:get": "rule:default",
|
||||
|
||||
"magnum-service:get_all": "rule:admin_api"
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
%global modulename magnum
|
||||
%global servicename magnum
|
||||
%global python_name magnum
|
||||
%global daemon_prefix openstack-magnum
|
||||
%global os_version ${version}
|
||||
%global no_tests $no_tests
|
||||
%global tests_data_dir %{_datarootdir}/%{python_name}-tests
|
||||
|
||||
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 6)
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%endif
|
||||
|
||||
%if ! 0%{?overwrite_configs}
|
||||
%global configfile %config(noreplace)
|
||||
%else
|
||||
%global configfile %verify(mode)
|
||||
%endif
|
||||
|
||||
Name: openstack-%{servicename}
|
||||
Version: %{os_version}$version_suffix
|
||||
Release: $release%{?dist}
|
||||
Epoch: $epoch
|
||||
Summary: Openstack Networking %{type} plugin
|
||||
|
||||
License: ASL 2.0
|
||||
URL: http://launchpad.net/neutron/
|
||||
Source0: %{python_name}-%{os_version}.tar.gz
|
||||
|
||||
|
||||
Source1: openstack-magnum-api.service
|
||||
Source2: openstack-magnum-conductor.service
|
||||
|
||||
Source30: magnum-policy.json
|
||||
|
||||
#for $idx, $fn in enumerate($patches)
|
||||
Patch$idx: $fn
|
||||
#end for
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
Requires: python-%{servicename} = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-magnum >= %{epoch}:%{version}-%{release}
|
||||
|
||||
%description
|
||||
Magnum is an OpenStack project which offers container orchestration engines for deploying and managing containers as first class resources in OpenStack.
|
||||
|
||||
|
||||
%package -n python-%{servicename}
|
||||
Summary: Neutron %{type} Python libraries
|
||||
Group: Applications/System
|
||||
|
||||
Requires: python-magnum >= %{epoch}:%{version}-%{release}
|
||||
|
||||
#Deps that are not specific called out
|
||||
Requires: MySQL-python
|
||||
#if $older_than_eq('2015.1')
|
||||
Requires: kubernetes
|
||||
#end if
|
||||
|
||||
#for $i in $requires
|
||||
Requires: ${i}
|
||||
#end for
|
||||
|
||||
#for $i in $conflicts
|
||||
Conflicts: ${i}
|
||||
#end for
|
||||
|
||||
|
||||
%description -n python-%{servicename}
|
||||
Magnum is an OpenStack project which offers container orchestration engines for deploying and managing containers as first class resources in OpenStack.
|
||||
|
||||
This package contains the Magnum 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
|
||||
Magnum is an OpenStack project which offers container orchestration engines for deploying and managing containers as first class resources in OpenStack.
|
||||
|
||||
This package contains Magnum test files.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{python_name}-%{os_version}
|
||||
|
||||
#for $idx, $fn in enumerate($patches)
|
||||
%patch$idx -p1
|
||||
#end for
|
||||
|
||||
%build
|
||||
|
||||
export PBR_VERSION=$version
|
||||
export SKIP_PIP_INSTALL=1
|
||||
%{__python} setup.py build
|
||||
|
||||
|
||||
%install
|
||||
|
||||
export PBR_VERSION=$version
|
||||
export SKIP_PIP_INSTALL=1
|
||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
|
||||
%if ! 0%{?usr_only}
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/magnum
|
||||
install -m 644 etc/magnum/* %{buildroot}%{_sysconfdir}/magnum
|
||||
#if $older_than_eq('2015.1')
|
||||
install -m 644 %{SOURCE30} %{buildroot}%{_sysconfdir}/magnum/policy.json
|
||||
#end if
|
||||
|
||||
install -p -D -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/openstack-magnum-api.service
|
||||
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-magnum-conductor.service
|
||||
|
||||
mkdir -p %{buildroot}/var/log/magnum/
|
||||
mkdir -p %{buildroot}/var/run/magnum/
|
||||
mkdir -p %{buildroot}/var/lock/magnum/
|
||||
%endif
|
||||
|
||||
%__rm -rf %{buildroot}%{py_sitelib}/{doc,tools}
|
||||
|
||||
%clean
|
||||
%__rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
getent group magnum >/dev/null || groupadd -r magnum
|
||||
getent passwd magnum >/dev/null || \
|
||||
useradd -r -g magnum -d %{_sharedstatedir}/magnum -s /sbin/nologin \
|
||||
-c "OpenStack Magnum Daemon" magnum
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/usr/bin/systemctl preset openstack-magnum-api.service
|
||||
/usr/bin/systemctl preset openstack-magnum-conductor.service
|
||||
fi
|
||||
|
||||
%preun
|
||||
/usr/bin/systemctl --no-reload disable openstack-magnum-api.service > /dev/null 2>&1 || :
|
||||
/usr/bin/systemctl stop openstack-magnum-api.service > /dev/null 2>&1 || :
|
||||
/usr/bin/systemctl --no-reload disable openstack-magnum-conductor.service > /dev/null 2>&1 || :
|
||||
/usr/bin/systemctl stop openstack-magnum-conductor.service > /dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%defattr(-,root,root,-)
|
||||
%doc README* LICENSE* HACKING* ChangeLog AUTHORS
|
||||
%{_usr}/bin/*
|
||||
|
||||
%if ! 0%{?usr_only}
|
||||
%configfile %attr(0640, root, magnum) %{_sysconfdir}/magnum/*
|
||||
%dir %attr(0755, magnum, nobody) %{_localstatedir}/log/magnum
|
||||
%dir %attr(0755, magnum, nobody) %{_localstatedir}/run/magnum
|
||||
%dir %attr(0755, magnum, nobody) %{_localstatedir}/lock/magnum
|
||||
%{_unitdir}/*
|
||||
%endif
|
||||
|
||||
%files -n python-%{servicename}
|
||||
%{python_sitelib}/%{modulename}
|
||||
%{python_sitelib}/%{modulename}-%{version}-py%{python2_version}.egg-info
|
||||
%exclude %{python_sitelib}/%{modulename}/tests
|
||||
|
||||
|
||||
%files -n python-%{servicename}-tests
|
||||
%{python_sitelib}/%{modulename}/tests
|
||||
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue