Adding ceilometer and heat to be built by anvil
This does not fully install or configure these packages or run unit tests. It mainly builds the packages for heat and ceilometer. Change-Id: I071ad4f7f8ee832e215e691187c05bf3d1edf234
This commit is contained in:
parent
ba154fa614
commit
3211fa039b
44
anvil/components/ceilometer.py
Normal file
44
anvil/components/ceilometer.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from anvil import colorizer
|
||||||
|
from anvil import log as logging
|
||||||
|
from anvil import utils
|
||||||
|
|
||||||
|
from anvil.components import base_install as binstall
|
||||||
|
|
||||||
|
from anvil.components.configurators import ceilometer as cconf
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Sync db command
|
||||||
|
SYNC_DB_CMD = ['sudo', '-u', 'ceilometer', '/usr/bin/ceilometer-dbsync']
|
||||||
|
|
||||||
|
|
||||||
|
class CeilometerInstaller(binstall.PythonInstallComponent):
|
||||||
|
def __init__(self, *args, **kargs):
|
||||||
|
binstall.PythonInstallComponent.__init__(self, *args, **kargs)
|
||||||
|
self.configurator = cconf.CeilometerConfigurator(self)
|
||||||
|
|
||||||
|
def post_install(self):
|
||||||
|
binstall.PythonInstallComponent.post_install(self)
|
||||||
|
if self.get_bool_option('db-sync'):
|
||||||
|
self._sync_db()
|
||||||
|
|
||||||
|
def _sync_db(self):
|
||||||
|
LOG.info("Syncing ceilometer to database: %s", colorizer.quote(self.configurator.DB_NAME))
|
||||||
|
cmds = [{'cmd': SYNC_DB_CMD}]
|
||||||
|
utils.execute_template(*cmds, cwd=self.bin_dir, params=self.config_params(None))
|
45
anvil/components/configurators/ceilometer.py
Normal file
45
anvil/components/configurators/ceilometer.py
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from anvil import shell as sh
|
||||||
|
|
||||||
|
from anvil.components.configurators import base
|
||||||
|
|
||||||
|
API_CONF = 'ceilometer.conf'
|
||||||
|
PIPELINE_CONF = 'pipeline.yaml'
|
||||||
|
SOURCES_CONF = 'sources.json'
|
||||||
|
POLICY_CONF = 'policy.json'
|
||||||
|
CONFIGS = [PIPELINE_CONF, API_CONF, POLICY_CONF, SOURCES_CONF]
|
||||||
|
|
||||||
|
|
||||||
|
class CeilometerConfigurator(base.Configurator):
|
||||||
|
DB_NAME = 'ceilometer'
|
||||||
|
|
||||||
|
def __init__(self, installer):
|
||||||
|
super(CeilometerConfigurator, self).__init__(installer, CONFIGS)
|
||||||
|
self.config_adjusters = {
|
||||||
|
API_CONF: self._config_adjust_api,
|
||||||
|
}
|
||||||
|
self.source_configs = {API_CONF: 'ceilometer.conf.sample'}
|
||||||
|
self.config_dir = sh.joinpths(self.installer.get_option('app_dir'),
|
||||||
|
'etc',
|
||||||
|
installer.name)
|
||||||
|
|
||||||
|
def _config_adjust_api(self, config):
|
||||||
|
# Setup your log dir
|
||||||
|
config.add('log_dir', '/var/log/ceilometer')
|
||||||
|
# Setup your sql connection
|
||||||
|
config.add_with_section('database', 'connection', self.fetch_dbdsn())
|
36
anvil/components/configurators/heat.py
Normal file
36
anvil/components/configurators/heat.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from anvil import shell as sh
|
||||||
|
|
||||||
|
from anvil.components.configurators import base
|
||||||
|
|
||||||
|
API_CONF = 'heat.conf'
|
||||||
|
PASTE_CONF = 'api-paste.ini'
|
||||||
|
POLICY_CONF = 'policy.json'
|
||||||
|
CONFIGS = [API_CONF, PASTE_CONF, POLICY_CONF]
|
||||||
|
|
||||||
|
|
||||||
|
class HeatConfigurator(base.Configurator):
|
||||||
|
DB_NAME = 'heat'
|
||||||
|
|
||||||
|
def __init__(self, installer):
|
||||||
|
super(HeatConfigurator, self).__init__(installer, CONFIGS)
|
||||||
|
self.config_adjusters = {}
|
||||||
|
self.source_configs = {API_CONF: 'heat.conf.sample'}
|
||||||
|
self.config_dir = sh.joinpths(self.installer.get_option('app_dir'),
|
||||||
|
'etc',
|
||||||
|
installer.name)
|
44
anvil/components/heat.py
Normal file
44
anvil/components/heat.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
from anvil import colorizer
|
||||||
|
from anvil import log as logging
|
||||||
|
from anvil import utils
|
||||||
|
|
||||||
|
from anvil.components import base_install as binstall
|
||||||
|
|
||||||
|
from anvil.components.configurators import heat as hconf
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Sync db command
|
||||||
|
SYNC_DB_CMD = ['sudo', '-u', 'heat', '/usr/bin/heat-db-setup', '-y']
|
||||||
|
|
||||||
|
|
||||||
|
class HeatInstaller(binstall.PythonInstallComponent):
|
||||||
|
def __init__(self, *args, **kargs):
|
||||||
|
binstall.PythonInstallComponent.__init__(self, *args, **kargs)
|
||||||
|
self.configurator = hconf.HeatConfigurator(self)
|
||||||
|
|
||||||
|
def post_install(self):
|
||||||
|
binstall.PythonInstallComponent.post_install(self)
|
||||||
|
if self.get_bool_option('db-sync'):
|
||||||
|
self._sync_db()
|
||||||
|
|
||||||
|
def _sync_db(self):
|
||||||
|
LOG.info("Syncing heat to database: %s", colorizer.quote(self.configurator.DB_NAME))
|
||||||
|
cmds = [{'cmd': SYNC_DB_CMD}]
|
||||||
|
utils.execute_template(*cmds, cwd=self.bin_dir)
|
@ -33,11 +33,14 @@ LOG = logging.getLogger(__name__)
|
|||||||
# TODO(harlowja): get rid of static lists in code files for these names
|
# TODO(harlowja): get rid of static lists in code files for these names
|
||||||
# which we should be able to take in via configuration or other automatic
|
# which we should be able to take in via configuration or other automatic
|
||||||
# process
|
# process
|
||||||
OPENSTACK_PACKAGES = set([
|
OPENSTACK_PACKAGES = frozenset([
|
||||||
|
"ceilometer",
|
||||||
"cinder",
|
"cinder",
|
||||||
"glance",
|
"glance",
|
||||||
|
"heat",
|
||||||
"horizon",
|
"horizon",
|
||||||
"keystone",
|
"keystone",
|
||||||
|
"neutron",
|
||||||
"nova",
|
"nova",
|
||||||
"oslo.config",
|
"oslo.config",
|
||||||
"python-cinderclient",
|
"python-cinderclient",
|
||||||
@ -47,7 +50,6 @@ OPENSTACK_PACKAGES = set([
|
|||||||
"python-novaclient",
|
"python-novaclient",
|
||||||
"python-swiftclient",
|
"python-swiftclient",
|
||||||
"python-troveclient",
|
"python-troveclient",
|
||||||
"neutron",
|
|
||||||
"swift",
|
"swift",
|
||||||
"trove",
|
"trove",
|
||||||
])
|
])
|
||||||
|
@ -70,7 +70,16 @@ class YumDependencyHandler(base.DependencyHandler):
|
|||||||
"cinder": "Volume",
|
"cinder": "Volume",
|
||||||
"neutron": "Networking",
|
"neutron": "Networking",
|
||||||
}
|
}
|
||||||
SERVER_NAMES = ["nova", "glance", "keystone", "neutron", "cinder", "trove"]
|
SERVER_NAMES = [
|
||||||
|
"ceilometer",
|
||||||
|
"cinder",
|
||||||
|
"glance",
|
||||||
|
"heat",
|
||||||
|
"keystone",
|
||||||
|
"neutron",
|
||||||
|
"nova",
|
||||||
|
"trove",
|
||||||
|
]
|
||||||
TRANSLATION_NAMES = {
|
TRANSLATION_NAMES = {
|
||||||
'horizon': "python-django-horizon",
|
'horizon': "python-django-horizon",
|
||||||
}
|
}
|
||||||
|
3
conf/components/ceilometer.yaml
Normal file
3
conf/components/ceilometer.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Settings for component Ceilometer
|
||||||
|
---
|
||||||
|
...
|
3
conf/components/heat.yaml
Normal file
3
conf/components/heat.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Settings for component Heat
|
||||||
|
---
|
||||||
|
...
|
@ -388,4 +388,31 @@ components:
|
|||||||
test: anvil.components.base_testing:PythonTestingComponent
|
test: anvil.components.base_testing:PythonTestingComponent
|
||||||
coverage: anvil.components.base_testing:PythonTestingComponent
|
coverage: anvil.components.base_testing:PythonTestingComponent
|
||||||
uninstall: anvil.components.base_install:PkgUninstallComponent
|
uninstall: anvil.components.base_install:PkgUninstallComponent
|
||||||
|
heat:
|
||||||
|
action_classes:
|
||||||
|
install: anvil.components.heat:HeatInstaller
|
||||||
|
running: anvil.components.base_runtime:EmptyRuntime
|
||||||
|
test: anvil.components.base_testing:EmptyTestingComponent
|
||||||
|
uninstall: anvil.components.base_install:PkgUninstallComponent
|
||||||
|
daemon_to_package:
|
||||||
|
api: openstack-heat-api
|
||||||
|
api-cfn: openstack-heat-api-cfn
|
||||||
|
api-cloudwatch: openstack-heat-api-cloudwatch
|
||||||
|
engine: openstack-heat-engine
|
||||||
|
ceilometer:
|
||||||
|
pip:
|
||||||
|
- name: wsme
|
||||||
|
version: ">=0.5b5,<0.5b6"
|
||||||
|
- name: flask
|
||||||
|
version: ">=0.10,<1"
|
||||||
|
action_classes:
|
||||||
|
install: anvil.components.ceilometer:CeilometerInstaller
|
||||||
|
running: anvil.components.base_runtime:EmptyRuntime
|
||||||
|
test: anvil.components.base_testing:EmptyTestingComponent
|
||||||
|
uninstall: anvil.components.base_install:PkgUninstallComponent
|
||||||
|
daemon_to_package:
|
||||||
|
api: openstack-ceilometer-api
|
||||||
|
central: openstack-ceilometer-central
|
||||||
|
collector: openstack-ceilometer-collector
|
||||||
|
compute: openstack-ceilometer-compute
|
||||||
...
|
...
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
ceilometer:
|
||||||
|
repo: git://github.com/openstack/ceilometer.git
|
||||||
|
tag: 2013.2
|
||||||
ceilometer-client:
|
ceilometer-client:
|
||||||
repo: git://github.com/openstack/python-ceilometerclient.git
|
repo: git://github.com/openstack/python-ceilometerclient.git
|
||||||
tag: 1.0.6
|
tag: 1.0.6
|
||||||
@ -16,6 +19,9 @@ glance-client:
|
|||||||
glance:
|
glance:
|
||||||
repo: git://github.com/openstack/glance.git
|
repo: git://github.com/openstack/glance.git
|
||||||
tag: 2013.2
|
tag: 2013.2
|
||||||
|
heat:
|
||||||
|
repo: git://github.com/openstack/heat.git
|
||||||
|
tag: 2013.2
|
||||||
heat-client:
|
heat-client:
|
||||||
repo: git://github.com/openstack/python-heatclient.git
|
repo: git://github.com/openstack/python-heatclient.git
|
||||||
tag: 0.2.5
|
tag: 0.2.5
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
ceilometer:
|
||||||
|
repo: git://github.com/openstack/ceilometer.git
|
||||||
|
branch: stable/havana
|
||||||
ceilometer-client:
|
ceilometer-client:
|
||||||
repo: git://github.com/openstack/python-ceilometerclient.git
|
repo: git://github.com/openstack/python-ceilometerclient.git
|
||||||
tag: 1.0.6
|
tag: 1.0.6
|
||||||
@ -19,6 +22,9 @@ glance:
|
|||||||
heat-client:
|
heat-client:
|
||||||
repo: git://github.com/openstack/python-heatclient.git
|
repo: git://github.com/openstack/python-heatclient.git
|
||||||
tag: 0.2.5
|
tag: 0.2.5
|
||||||
|
heat:
|
||||||
|
repo: git://github.com/openstack/heat.git
|
||||||
|
branch: stable/havana
|
||||||
horizon:
|
horizon:
|
||||||
repo: git://github.com/openstack/horizon.git
|
repo: git://github.com/openstack/horizon.git
|
||||||
branch: stable/havana
|
branch: stable/havana
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
ceilometer:
|
||||||
|
repo: git://github.com/openstack/ceilometer.git
|
||||||
|
branch: master
|
||||||
ceilometer-client:
|
ceilometer-client:
|
||||||
repo: git://github.com/openstack/python-ceilometerclient.git
|
repo: git://github.com/openstack/python-ceilometerclient.git
|
||||||
branch: master
|
branch: master
|
||||||
@ -19,6 +22,9 @@ glance:
|
|||||||
heat-client:
|
heat-client:
|
||||||
repo: git://github.com/openstack/python-heatclient.git
|
repo: git://github.com/openstack/python-heatclient.git
|
||||||
branch: master
|
branch: master
|
||||||
|
heat:
|
||||||
|
repo: git://github.com/openstack/heat.git
|
||||||
|
branch: master
|
||||||
horizon:
|
horizon:
|
||||||
repo: git://github.com/openstack/horizon.git
|
repo: git://github.com/openstack/horizon.git
|
||||||
branch: master
|
branch: master
|
||||||
|
@ -24,6 +24,8 @@ components:
|
|||||||
- trove-client
|
- trove-client
|
||||||
- django-openstack-auth
|
- django-openstack-auth
|
||||||
- horizon
|
- horizon
|
||||||
|
- heat
|
||||||
|
- ceilometer
|
||||||
options:
|
options:
|
||||||
general:
|
general:
|
||||||
install-all-deps: false
|
install-all-deps: false
|
||||||
@ -42,6 +44,9 @@ options:
|
|||||||
db-sync: true
|
db-sync: true
|
||||||
do-init: true
|
do-init: true
|
||||||
enable-pki: false
|
enable-pki: false
|
||||||
|
heat: {}
|
||||||
|
ceilometer:
|
||||||
|
db-sync: true
|
||||||
horizon:
|
horizon:
|
||||||
make-blackhole: true
|
make-blackhole: true
|
||||||
cinder:
|
cinder:
|
||||||
@ -72,6 +77,16 @@ subsystems:
|
|||||||
- api
|
- api
|
||||||
- scheduler
|
- scheduler
|
||||||
- volume
|
- volume
|
||||||
|
heat:
|
||||||
|
- api
|
||||||
|
- api-cfn
|
||||||
|
- api-cloudwatch
|
||||||
|
- engine
|
||||||
|
ceilometer:
|
||||||
|
- api
|
||||||
|
- collector
|
||||||
|
- compute
|
||||||
|
- central
|
||||||
supports:
|
supports:
|
||||||
- rhel
|
- rhel
|
||||||
...
|
...
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
# Sample settings for ceilometer
|
||||||
|
|
||||||
|
[DEFAULT]
|
||||||
|
log_dir = /var/log/ceilometer
|
||||||
|
|
||||||
|
[database]
|
||||||
|
connection = mongodb://localhost:27017/ceilometer
|
@ -0,0 +1,9 @@
|
|||||||
|
compress
|
||||||
|
|
||||||
|
/var/log/ceilometer/*.log {
|
||||||
|
weekly
|
||||||
|
rotate 4
|
||||||
|
missingok
|
||||||
|
compress
|
||||||
|
minsize 100k
|
||||||
|
}
|
181
conf/templates/packaging/sources/heat/heat-api-paste.ini
Normal file
181
conf/templates/packaging/sources/heat/heat-api-paste.ini
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
# Default pipeline
|
||||||
|
[pipeline:heat-api]
|
||||||
|
pipeline = versionnegotiation authtoken context apiv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth
|
||||||
|
# i.e. in heat-api.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-keystone]
|
||||||
|
pipeline = versionnegotiation authtoken context apiv1app
|
||||||
|
|
||||||
|
# Use the following pipeline to enable transparent caching of image files
|
||||||
|
# i.e. in heat-api.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-caching]
|
||||||
|
pipeline = versionnegotiation authtoken context cache apiv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with caching
|
||||||
|
# i.e. in heat-api.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-keystone+caching]
|
||||||
|
pipeline = versionnegotiation authtoken context cache apiv1app
|
||||||
|
|
||||||
|
# Use the following pipeline to enable the Image Cache Management API
|
||||||
|
# i.e. in heat-api.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cachemanagement]
|
||||||
|
pipeline = versionnegotiation authtoken context cache cachemanage apiv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with cache management
|
||||||
|
# i.e. in heat-api.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-keystone+cachemanagement]
|
||||||
|
pipeline = versionnegotiation auth-context cache cachemanage apiv1app
|
||||||
|
|
||||||
|
[pipeline:heat-api-cfn]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth
|
||||||
|
# i.e. in heat-api-cfn.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cfn-keystone]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context apicfnv1app
|
||||||
|
|
||||||
|
# Use the following pipeline to enable transparent caching of image files
|
||||||
|
# i.e. in heat-api-cfn.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cfn-caching]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache apicfnv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with caching
|
||||||
|
# i.e. in heat-api-cfn.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cfn-keystone+caching]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache apicfnv1app
|
||||||
|
|
||||||
|
# Use the following pipeline to enable the Image Cache Management API
|
||||||
|
# i.e. in heat-api-cfn.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cfn-cachemanagement]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache cachemanage apicfnv1app
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with cache management
|
||||||
|
# i.e. in heat-api-cfn.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cfn-keystone+cachemanagement]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken auth-context cache cachemanage apicfnv1app
|
||||||
|
|
||||||
|
[pipeline:heat-api-cloudwatch]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context apicwapp
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth
|
||||||
|
# i.e. in heat-api-cloudwatch.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cloudwatch-keystone]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context apicwapp
|
||||||
|
|
||||||
|
# Use the following pipeline to enable transparent caching of image files
|
||||||
|
# i.e. in heat-api-cloudwatch.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cloudwatch-caching]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache apicwapp
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with caching
|
||||||
|
# i.e. in heat-api-cloudwatch.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+caching
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cloudwatch-keystone+caching]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache apicwapp
|
||||||
|
|
||||||
|
# Use the following pipeline to enable the Image Cache Management API
|
||||||
|
# i.e. in heat-api-cloudwatch.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cloudwatch-cachemanagement]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken context cache cachemanage apicwapp
|
||||||
|
|
||||||
|
# Use the following pipeline for keystone auth with cache management
|
||||||
|
# i.e. in heat-api-cloudwatch.conf:
|
||||||
|
# [paste_deploy]
|
||||||
|
# flavor = keystone+cachemanagement
|
||||||
|
#
|
||||||
|
[pipeline:heat-api-cloudwatch-keystone+cachemanagement]
|
||||||
|
pipeline = versionnegotiation ec2authtoken authtoken auth-context cache cachemanage apicwapp
|
||||||
|
|
||||||
|
[app:apicwapp]
|
||||||
|
paste.app_factory = heat.common.wsgi:app_factory
|
||||||
|
heat.app_factory = heat.api.cloudwatch:API
|
||||||
|
|
||||||
|
[app:apiv1app]
|
||||||
|
paste.app_factory = heat.common.wsgi:app_factory
|
||||||
|
heat.app_factory = heat.api.openstack.v1:API
|
||||||
|
|
||||||
|
[app:apicfnv1app]
|
||||||
|
paste.app_factory = heat.common.wsgi:app_factory
|
||||||
|
heat.app_factory = heat.api.cfn.v1:API
|
||||||
|
|
||||||
|
[filter:versionnegotiation]
|
||||||
|
paste.filter_factory = heat.common.wsgi:filter_factory
|
||||||
|
heat.filter_factory = heat.api.openstack:version_negotiation_filter
|
||||||
|
|
||||||
|
[filter:cache]
|
||||||
|
paste.filter_factory = heat.common.wsgi:filter_factory
|
||||||
|
heat.filter_factory = heat.api.middleware.cache:CacheFilter
|
||||||
|
|
||||||
|
[filter:cachemanage]
|
||||||
|
paste.filter_factory = heat.common.wsgi:filter_factory
|
||||||
|
heat.filter_factory = heat.api.middleware.cache_manage:CacheManageFilter
|
||||||
|
|
||||||
|
[filter:context]
|
||||||
|
paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory
|
||||||
|
|
||||||
|
[filter:ec2authtoken]
|
||||||
|
paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory
|
||||||
|
auth_uri = http://localhost:5000/v2.0
|
||||||
|
keystone_ec2_uri = http://localhost:5000/v2.0/ec2tokens
|
||||||
|
|
||||||
|
[filter:authtoken]
|
||||||
|
paste.filter_factory = heat.common.auth_token:filter_factory
|
||||||
|
service_protocol = http
|
||||||
|
service_host = localhost
|
||||||
|
service_port = 5000
|
||||||
|
auth_host = localhost
|
||||||
|
auth_port = 35357
|
||||||
|
auth_protocol = http
|
||||||
|
auth_uri = http://localhost:5000/v2.0
|
||||||
|
|
||||||
|
# These must be set to your local values in order for the token
|
||||||
|
# authentication to work.
|
||||||
|
admin_tenant_name = services
|
||||||
|
admin_user = heat
|
||||||
|
admin_password = heat
|
||||||
|
|
||||||
|
[filter:auth-context]
|
||||||
|
paste.filter_factory = heat.common.wsgi:filter_factory
|
||||||
|
heat.filter_factory = keystone.middleware.heat_auth_token:KeystoneContextMiddleware
|
147
conf/templates/packaging/sources/heat/heat.conf
Normal file
147
conf/templates/packaging/sources/heat/heat.conf
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
|
||||||
|
# Print more verbose output (set logging level to INFO instead
|
||||||
|
# of default WARNING level). (boolean value)
|
||||||
|
verbose = True
|
||||||
|
|
||||||
|
# Select deferred auth method, stored password or trusts
|
||||||
|
# (string value)
|
||||||
|
deferred_auth_method = password
|
||||||
|
|
||||||
|
# URL of the Heat metadata server (string value)
|
||||||
|
heat_metadata_server_url = http://localhost:8000
|
||||||
|
|
||||||
|
# the RabbitMQ password (string value)
|
||||||
|
rabbit_password = guest
|
||||||
|
|
||||||
|
# Maximum depth allowed when using nested stacks. (integer
|
||||||
|
# value)
|
||||||
|
max_nested_stack_depth = 3
|
||||||
|
|
||||||
|
# Seconds between running periodic tasks (integer value)
|
||||||
|
periodic_interval = 60
|
||||||
|
|
||||||
|
# The RabbitMQ broker address where a single node is used
|
||||||
|
# (string value)
|
||||||
|
rabbit_host = localhost
|
||||||
|
|
||||||
|
# Maximum resources allowed per top-level stack. (integer
|
||||||
|
# value)
|
||||||
|
max_resources_per_stack = 1000
|
||||||
|
|
||||||
|
# Driver to use for controlling instances (string value)
|
||||||
|
instance_driver = heat.engine.nova
|
||||||
|
|
||||||
|
# the RabbitMQ userid (string value)
|
||||||
|
rabbit_userid = guest
|
||||||
|
|
||||||
|
# Controls how many events will be pruned whenever a stack's
|
||||||
|
# events exceed max_events_per_stack. Set this lower to keep
|
||||||
|
# more events at the expense of more frequent purges. (integer
|
||||||
|
# value)
|
||||||
|
event_purge_batch_size = 10
|
||||||
|
|
||||||
|
# The default user for new instances (string value)
|
||||||
|
instance_user = ec2-user
|
||||||
|
|
||||||
|
# The SQLAlchemy connection string used to connect to the
|
||||||
|
# database (string value)
|
||||||
|
sql_connection = mysql://heat:heat@localhost:3306/heat?charset=utf8
|
||||||
|
|
||||||
|
# Subset of trustor roles to be delegated to heat (list value
|
||||||
|
trusts_delegated_roles = heat_stack_owner
|
||||||
|
|
||||||
|
# Maximum raw byte size of any template. (integer value)
|
||||||
|
max_template_size = 524288
|
||||||
|
|
||||||
|
# The RabbitMQ broker port where a single node is used
|
||||||
|
# (integer value)
|
||||||
|
rabbit_port = 5672
|
||||||
|
|
||||||
|
# Name of the engine node. This can be an opaque identifier.It
|
||||||
|
# is not necessarily a hostname, FQDN, or IP address. (string
|
||||||
|
# value)
|
||||||
|
host = localhost
|
||||||
|
|
||||||
|
# List of directories to search for Plugins (list value)
|
||||||
|
plugin_dirs = /usr/lib64/heat,/usr/lib/heat
|
||||||
|
|
||||||
|
# The directory to search for environment files (string value)
|
||||||
|
environment_dir = /etc/heat/environment.d
|
||||||
|
|
||||||
|
# Keystone role for heat template-defined users (string value)
|
||||||
|
heat_stack_user_role = heat_stack_user
|
||||||
|
|
||||||
|
# Controls how many events will be pruned whenever a stack's
|
||||||
|
# events exceed max_events_per_stack. Set this lower to keep
|
||||||
|
# more events at the expense of more frequent purges. (integer
|
||||||
|
# value)
|
||||||
|
max_events_per_stack = 1000
|
||||||
|
|
||||||
|
# The backend to use for db (string value)
|
||||||
|
db_backend = heat.db.sqlalchemy.api
|
||||||
|
|
||||||
|
# URL of the Heat cloudwatch server (string value)
|
||||||
|
heat_watch_server_url = http://localhost:8003
|
||||||
|
|
||||||
|
# Timeout before idle sql connections are reaped (integer
|
||||||
|
# value)
|
||||||
|
sql_idle_timeout = 3600
|
||||||
|
|
||||||
|
# URL of the Heat waitcondition server (string value)
|
||||||
|
heat_waitcondition_server_url = http://localhost:8000/v1/waitcondition
|
||||||
|
|
||||||
|
# Print debugging output (set logging level to DEBUG instead
|
||||||
|
# of default WARNING level). (boolean value)
|
||||||
|
debug = True
|
||||||
|
|
||||||
|
# Maximum number of stacks any one tenant may have active at
|
||||||
|
# one time. (integer value)
|
||||||
|
max_stacks_per_tenant = 100
|
||||||
|
|
||||||
|
[paste_deploy]
|
||||||
|
|
||||||
|
# The API paste config file to use (string value)
|
||||||
|
api_paste_config = heat-api-paste.ini
|
||||||
|
|
||||||
|
[heat_api_cfn]
|
||||||
|
|
||||||
|
# The port on which the server will listen. (integer value)
|
||||||
|
bind_port = 8000
|
||||||
|
|
||||||
|
# Number of backlog requests to configure the socket with
|
||||||
|
# (integer value)
|
||||||
|
backlog = 4096
|
||||||
|
|
||||||
|
# Address to bind the server. Useful when selecting a
|
||||||
|
# particular network interface. (string value)
|
||||||
|
bind_host = 0.0.0.0
|
||||||
|
|
||||||
|
[keystone_authtoken]
|
||||||
|
|
||||||
|
# Keystone account username (string value)
|
||||||
|
admin_user = heat
|
||||||
|
|
||||||
|
# The name of the admin tenant (string value)
|
||||||
|
admin_tenant_name = services
|
||||||
|
|
||||||
|
# The keystone port (integer value)
|
||||||
|
auth_port = 35357
|
||||||
|
|
||||||
|
# Protocol to be used for auth requests http/https (string value)
|
||||||
|
auth_protocol = http
|
||||||
|
|
||||||
|
# Authentication Endpoint URI (string value)
|
||||||
|
auth_uri = http://localhost:5000/v2.0/
|
||||||
|
|
||||||
|
# Keystone account password (string value)
|
||||||
|
admin_password = heat
|
||||||
|
|
||||||
|
# Host providing the admin Identity API endpoint (string
|
||||||
|
# value)
|
||||||
|
auth_host = localhost
|
||||||
|
|
||||||
|
[auth_password]
|
||||||
|
|
||||||
|
# Allow orchestration of multiple clouds (boolean value)
|
||||||
|
multi_cloud = false
|
9
conf/templates/packaging/sources/heat/heat.logrotate
Normal file
9
conf/templates/packaging/sources/heat/heat.logrotate
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
compress
|
||||||
|
|
||||||
|
/var/log/heat/*.log {
|
||||||
|
weekly
|
||||||
|
rotate 4
|
||||||
|
missingok
|
||||||
|
compress
|
||||||
|
minsize 100k
|
||||||
|
}
|
322
conf/templates/packaging/specs/openstack-ceilometer.spec
Normal file
322
conf/templates/packaging/specs/openstack-ceilometer.spec
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
%global _without_doc 1
|
||||||
|
%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
|
||||||
|
%global python_name ceilometer
|
||||||
|
%global daemon_prefix openstack-ceilometer
|
||||||
|
%global os_version ${version}
|
||||||
|
|
||||||
|
Name: openstack-ceilometer
|
||||||
|
Version: %{os_version}$version_suffix
|
||||||
|
Release: $release%{?dist}
|
||||||
|
Summary: OpenStack measurement collection service
|
||||||
|
|
||||||
|
Group: Applications/System
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://wiki.openstack.org/wiki/Ceilometer
|
||||||
|
Source0: %{python_name}-%{os_version}.tar.gz
|
||||||
|
|
||||||
|
Source10: openstack-ceilometer-api.init
|
||||||
|
Source11: openstack-ceilometer-collector.init
|
||||||
|
Source12: openstack-ceilometer-compute.init
|
||||||
|
Source13: openstack-ceilometer-central.init
|
||||||
|
Source14: openstack-ceilometer-alarm-notifier.init
|
||||||
|
Source15: openstack-ceilometer-alarm-evaluator.init
|
||||||
|
|
||||||
|
Source20: ceilometer-dist.conf
|
||||||
|
Source21: ceilometer.logrotate
|
||||||
|
|
||||||
|
#for $idx, $fn in enumerate($patches)
|
||||||
|
Patch$idx: $fn
|
||||||
|
#end for
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: intltool
|
||||||
|
BuildRequires: python-sphinx10
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python-pbr
|
||||||
|
BuildRequires: python-d2to1
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
|
||||||
|
BuildRequires: openstack-utils
|
||||||
|
|
||||||
|
# These are required to build due to the requirements check added
|
||||||
|
BuildRequires: python-sqlalchemy0.7
|
||||||
|
BuildRequires: python-webob1.2
|
||||||
|
|
||||||
|
%description
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
%package -n python-ceilometer
|
||||||
|
Summary: OpenStack ceilometer python libraries
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
#for $i in $requires
|
||||||
|
Requires: ${i}
|
||||||
|
#end for
|
||||||
|
|
||||||
|
# Requires for some of the packages are wrong
|
||||||
|
Requires: python-wsme >= 0.5b5
|
||||||
|
Requires: python-wsme < 05.b6
|
||||||
|
Requires: python-flask >= 0.10
|
||||||
|
Requires: python-flask < 1
|
||||||
|
|
||||||
|
%description -n python-ceilometer
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the ceilometer python library.
|
||||||
|
|
||||||
|
%package common
|
||||||
|
Summary: Components common to all OpenStack ceilometer services
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: python-ceilometer
|
||||||
|
Requires: openstack-utils
|
||||||
|
|
||||||
|
Requires(pre): shadow-utils
|
||||||
|
|
||||||
|
%description common
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains components common to all OpenStack
|
||||||
|
ceilometer services.
|
||||||
|
|
||||||
|
%package compute
|
||||||
|
Summary: OpenStack ceilometer compute agent
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: python-novaclient
|
||||||
|
Requires: python-keystoneclient
|
||||||
|
Requires: libvirt-python
|
||||||
|
|
||||||
|
%description compute
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the ceilometer agent for
|
||||||
|
running on OpenStack compute nodes.
|
||||||
|
|
||||||
|
%package central
|
||||||
|
Summary: OpenStack ceilometer central agent
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: python-novaclient
|
||||||
|
Requires: python-keystoneclient
|
||||||
|
Requires: python-glanceclient
|
||||||
|
Requires: python-swiftclient
|
||||||
|
|
||||||
|
%description central
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the central ceilometer agent.
|
||||||
|
|
||||||
|
%package collector
|
||||||
|
Summary: OpenStack ceilometer collector agent
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: python-pymongo
|
||||||
|
|
||||||
|
%description collector
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the ceilometer collector agent.
|
||||||
|
|
||||||
|
%package api
|
||||||
|
Summary: OpenStack ceilometer API service
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: python-pymongo
|
||||||
|
Requires: python-flask
|
||||||
|
Requires: python-pecan
|
||||||
|
Requires: python-wsme
|
||||||
|
|
||||||
|
%description api
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the ceilometer API service.
|
||||||
|
|
||||||
|
%package alarm
|
||||||
|
Summary: OpenStack ceilometer alarm services
|
||||||
|
Group: Applications/System
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
Requires: python-ceilometerclient
|
||||||
|
|
||||||
|
%description alarm
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains the ceilometer alarm notification
|
||||||
|
and evaluation services.
|
||||||
|
|
||||||
|
%files -n python-ceilometer
|
||||||
|
%{python_sitelib}/ceilometer
|
||||||
|
%{python_sitelib}/ceilometer-%{os_version}*.egg-info
|
||||||
|
|
||||||
|
%if 0%{?with_doc}
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for OpenStack ceilometer
|
||||||
|
Group: Documentation
|
||||||
|
|
||||||
|
# Required to build module documents
|
||||||
|
BuildRequires: python-eventlet
|
||||||
|
BuildRequires: python-sqlalchemy0.7
|
||||||
|
BuildRequires: python-webob
|
||||||
|
# while not strictly required, quiets the build down when building docs.
|
||||||
|
BuildRequires: python-migrate
|
||||||
|
BuildRequires: python-iso8601
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
OpenStack ceilometer provides services to measure and
|
||||||
|
collect metrics from OpenStack components.
|
||||||
|
|
||||||
|
This package contains documentation files for ceilometer.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{python_name}-%{os_version}
|
||||||
|
|
||||||
|
#raw
|
||||||
|
find . \( -name .gitignore -o -name .placeholder \) -delete
|
||||||
|
|
||||||
|
find ceilometer -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
|
||||||
|
|
||||||
|
# TODO: Have the following handle multi line entries
|
||||||
|
sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
|
||||||
|
|
||||||
|
#end raw
|
||||||
|
#for $idx, $fn in enumerate($patches)
|
||||||
|
%patch$idx -p1
|
||||||
|
#end for
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
#raw
|
||||||
|
# docs generation requires everything to be installed first
|
||||||
|
export PYTHONPATH="$( pwd ):$PYTHONPATH"
|
||||||
|
|
||||||
|
pushd doc
|
||||||
|
|
||||||
|
%if 0%{?with_doc}
|
||||||
|
SPHINX_DEBUG=1 sphinx-1.0-build -b html source build/html
|
||||||
|
# Fix hidden-file-or-dir warnings
|
||||||
|
rm -fr build/html/.doctrees build/html/.buildinfo
|
||||||
|
%endif
|
||||||
|
|
||||||
|
popd
|
||||||
|
#end raw
|
||||||
|
|
||||||
|
# Setup directories
|
||||||
|
install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer
|
||||||
|
install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer/tmp
|
||||||
|
install -d -m 755 %{buildroot}%{_localstatedir}/log/ceilometer
|
||||||
|
|
||||||
|
# Install config files
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/ceilometer
|
||||||
|
install -p -D -m 640 %{SOURCE20} %{buildroot}%{_datadir}/ceilometer/ceilometer-dist.conf
|
||||||
|
install -p -D -m 640 etc/ceilometer/ceilometer.conf.sample %{buildroot}%{_sysconfdir}/ceilometer/ceilometer.conf
|
||||||
|
install -p -D -m 640 etc/ceilometer/policy.json %{buildroot}%{_sysconfdir}/ceilometer/policy.json
|
||||||
|
install -p -D -m 640 etc/ceilometer/sources.json %{buildroot}%{_sysconfdir}/ceilometer/sources.json
|
||||||
|
install -p -D -m 640 etc/ceilometer/pipeline.yaml %{buildroot}%{_sysconfdir}/ceilometer/pipeline.yaml
|
||||||
|
|
||||||
|
# Install initscripts for services
|
||||||
|
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/%{name}-api
|
||||||
|
install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}-collector
|
||||||
|
install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/%{name}-compute
|
||||||
|
install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/%{name}-central
|
||||||
|
install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/%{name}-alarm-notifier
|
||||||
|
install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/%{name}-alarm-evaluator
|
||||||
|
|
||||||
|
#Fix for bin path for central and compute
|
||||||
|
sed -i "s#/usr/bin/ceilometer-compute#/usr/bin/ceilometer-agent-compute#" %{buildroot}%{_initrddir}/%{name}-compute
|
||||||
|
sed -i "s#/usr/bin/ceilometer-central#/usr/bin/ceilometer-agent-central#" %{buildroot}%{_initrddir}/%{name}-central
|
||||||
|
|
||||||
|
# Install logrotate
|
||||||
|
install -p -D -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
# Install pid directory
|
||||||
|
install -d -m 755 %{buildroot}%{_localstatedir}/run/ceilometer
|
||||||
|
|
||||||
|
# Remove unneeded in production stuff
|
||||||
|
rm -f %{buildroot}%{_bindir}/ceilometer-debug
|
||||||
|
rm -fr %{buildroot}%{python_sitelib}/tests/
|
||||||
|
rm -fr %{buildroot}%{python_sitelib}/run_tests.*
|
||||||
|
rm -f %{buildroot}/usr/share/doc/ceilometer/README*
|
||||||
|
rm -f %{buildroot}/%{python_sitelib}/ceilometer/api/v1/static/LICENSE.*
|
||||||
|
|
||||||
|
%pre common
|
||||||
|
getent group ceilometer >/dev/null || groupadd -r ceilometer --gid 166
|
||||||
|
if ! getent passwd ceilometer >/dev/null; then
|
||||||
|
# Id reservation request: https://bugzilla.redhat.com/923891
|
||||||
|
useradd -u 166 -r -g ceilometer -G ceilometer,nobody -d %{_sharedstatedir}/ceilometer -s /sbin/nologin -c "OpenStack ceilometer Daemons" ceilometer
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%files common
|
||||||
|
%doc LICENSE
|
||||||
|
%dir %{_sysconfdir}/ceilometer
|
||||||
|
%attr(-, root, ceilometer) %{_datadir}/ceilometer/ceilometer-dist.conf
|
||||||
|
%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/ceilometer.conf
|
||||||
|
%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/policy.json
|
||||||
|
%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/sources.json
|
||||||
|
%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/pipeline.yaml
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
|
||||||
|
%dir %attr(0755, ceilometer, root) %{_localstatedir}/log/ceilometer
|
||||||
|
%dir %attr(0755, ceilometer, root) %{_localstatedir}/run/ceilometer
|
||||||
|
|
||||||
|
%{_bindir}/ceilometer-dbsync
|
||||||
|
%{_bindir}/ceilometer-expirer
|
||||||
|
|
||||||
|
%defattr(-, ceilometer, ceilometer, -)
|
||||||
|
%dir %{_sharedstatedir}/ceilometer
|
||||||
|
%dir %{_sharedstatedir}/ceilometer/tmp
|
||||||
|
|
||||||
|
%if 0%{?with_doc}
|
||||||
|
%files doc
|
||||||
|
%doc doc/build/html
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files compute
|
||||||
|
%{_bindir}/ceilometer-agent-compute
|
||||||
|
%{_initrddir}/%{name}-compute
|
||||||
|
|
||||||
|
%files collector
|
||||||
|
%{_bindir}/ceilometer-collector*
|
||||||
|
%{_initrddir}/%{name}-collector
|
||||||
|
|
||||||
|
%files api
|
||||||
|
%doc ceilometer/api/v1/static/LICENSE.*
|
||||||
|
%{_bindir}/ceilometer-api
|
||||||
|
%{_initrddir}/%{name}-api
|
||||||
|
|
||||||
|
%files central
|
||||||
|
%{_bindir}/ceilometer-agent-central
|
||||||
|
%{_initrddir}/%{name}-central
|
||||||
|
|
||||||
|
%files alarm
|
||||||
|
%{_bindir}/ceilometer-alarm-notifier
|
||||||
|
%{_bindir}/ceilometer-alarm-evaluator
|
||||||
|
%{_initrddir}/%{name}-alarm-notifier
|
||||||
|
%{_initrddir}/%{name}-alarm-evaluator
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
|
186
conf/templates/packaging/specs/openstack-heat.spec
Normal file
186
conf/templates/packaging/specs/openstack-heat.spec
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
%global python_name heat
|
||||||
|
%global daemon_prefix openstack-heat
|
||||||
|
%global os_version ${version}
|
||||||
|
|
||||||
|
%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
|
||||||
|
|
||||||
|
#TODO: Get heat to build with docs. It currently reuiqres over 15 packages/buildrequires to build just the docs. Punting for now due to insanity.
|
||||||
|
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
|
||||||
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: openstack-heat
|
||||||
|
Summary: OpenStack Orchestration (heat)
|
||||||
|
Version: %{os_version}$version_suffix
|
||||||
|
Release: $release%{?dist}
|
||||||
|
|
||||||
|
License: ASL 2.0
|
||||||
|
Group: System Environment/Base
|
||||||
|
Vendor: Openstack Foundation
|
||||||
|
URL: http://www.openstack.org
|
||||||
|
Source0: %{python_name}-%{os_version}.tar.gz
|
||||||
|
|
||||||
|
Source10: openstack-heat-api.init
|
||||||
|
Source11: openstack-heat-api-cfn.init
|
||||||
|
Source12: openstack-heat-engine.init
|
||||||
|
Source13: openstack-heat-api-cloudwatch.init
|
||||||
|
|
||||||
|
Source20: heat.conf
|
||||||
|
Source21: heat-api-paste.ini
|
||||||
|
Source22: heat.logrotate
|
||||||
|
|
||||||
|
#for $idx, $fn in enumerate($patches)
|
||||||
|
Patch$idx: $fn
|
||||||
|
#end for
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python-sphinx
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
Requires: %{name}-engine = %{version}-%{release}
|
||||||
|
Requires: %{name}-api = %{version}-%{release}
|
||||||
|
Requires: %{name}-api-cfn = %{version}-%{release}
|
||||||
|
Requires: %{name}-api-cloudwatch = %{version}-%{release}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Heat provides AWS CloudFormation and CloudWatch functionality for OpenStack.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{python_name}-%{os_version}
|
||||||
|
|
||||||
|
#for $idx, $fn in enumerate($patches)
|
||||||
|
%patch$idx -p1
|
||||||
|
#end for
|
||||||
|
|
||||||
|
#raw
|
||||||
|
%build
|
||||||
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
|
||||||
|
sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/db/sqlalchemy/manage.py
|
||||||
|
sed -i -e '/^#!/,1 d' %{buildroot}/%{python_sitelib}/heat/db/sqlalchemy/migrate_repo/manage.py
|
||||||
|
mkdir -p %{buildroot}/var/log/heat/
|
||||||
|
mkdir -p %{buildroot}/var/run/heat/
|
||||||
|
|
||||||
|
# install init files
|
||||||
|
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-heat-api
|
||||||
|
install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-heat-api-cfn
|
||||||
|
install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-heat-engine
|
||||||
|
install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-heat-api-cloudwatch
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/var/lib/heat/
|
||||||
|
mkdir -p %{buildroot}/etc/heat/
|
||||||
|
|
||||||
|
#export PYTHONPATH="$PWD:$PYTHONPATH"
|
||||||
|
#pushd doc
|
||||||
|
#sphinx-1.0-build -b html -d build/doctrees source build/html
|
||||||
|
#sphinx-1.0-build -b man -d build/doctrees source build/man
|
||||||
|
#mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
|
#install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
|
||||||
|
#popd
|
||||||
|
|
||||||
|
rm -rf %{buildroot}/var/lib/heat/.dummy
|
||||||
|
rm -f %{buildroot}/usr/bin/cinder-keystone-setup
|
||||||
|
|
||||||
|
install -p -D -m 640 %{SOURCE20} %{buildroot}/%{_sysconfdir}/heat/heat.conf
|
||||||
|
install -p -D -m 640 %{SOURCE21} %{buildroot}/%{_sysconfdir}/heat/heat-api-paste.ini
|
||||||
|
install -p -D -m 640 %{SOURCE22} %{buildroot}/%{_sysconfdir}/logrotate.d/heat
|
||||||
|
#end raw
|
||||||
|
|
||||||
|
%package common
|
||||||
|
Summary: Heat common
|
||||||
|
Group: System Environment/Base
|
||||||
|
|
||||||
|
#for $i in $requires
|
||||||
|
Requires: ${i}
|
||||||
|
#end for
|
||||||
|
|
||||||
|
Requires(pre): shadow-utils
|
||||||
|
|
||||||
|
%description common
|
||||||
|
Components common to all OpenStack Heat services
|
||||||
|
|
||||||
|
%files common
|
||||||
|
%doc LICENSE
|
||||||
|
%{_bindir}/heat-db-setup
|
||||||
|
%{_bindir}/heat-keystone-setup
|
||||||
|
%{_bindir}/heat-manage
|
||||||
|
%{python_sitelib}/heat*
|
||||||
|
%dir %attr(0755,heat,root) %{_localstatedir}/log/heat
|
||||||
|
%dir %attr(0755,heat,root) %{_sharedstatedir}/heat
|
||||||
|
%dir %attr(0755,heat,root) %{_sysconfdir}/heat
|
||||||
|
%config(noreplace) %{_sysconfdir}/heat/heat.conf
|
||||||
|
%config(noreplace)/%{_sysconfdir}/heat/heat-api-paste.ini
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/heat
|
||||||
|
|
||||||
|
%pre common
|
||||||
|
# 187:187 for heat - rhbz#845078
|
||||||
|
getent group heat >/dev/null || groupadd -r --gid 187 heat
|
||||||
|
getent passwd heat >/dev/null || \
|
||||||
|
useradd --uid 187 -r -g heat -d %{_sharedstatedir}/heat -s /sbin/nologin \
|
||||||
|
-c "OpenStack Heat Daemons" heat
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%package engine
|
||||||
|
Summary: The Heat engine
|
||||||
|
Group: System Environment/Base
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
%description engine
|
||||||
|
OpenStack API for starting CloudFormation templates on OpenStack
|
||||||
|
|
||||||
|
%files engine
|
||||||
|
%doc README.rst LICENSE
|
||||||
|
%{_bindir}/heat-engine
|
||||||
|
%{_initrddir}/openstack-heat-engine
|
||||||
|
|
||||||
|
%package api
|
||||||
|
Summary: The Heat API
|
||||||
|
Group: System Environment/Base
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
%description api
|
||||||
|
OpenStack-native ReST API to the Heat Engine
|
||||||
|
|
||||||
|
%files api
|
||||||
|
%doc README.rst LICENSE
|
||||||
|
%{_bindir}/heat-api
|
||||||
|
%{_initrddir}/openstack-heat-api
|
||||||
|
|
||||||
|
%package api-cfn
|
||||||
|
Summary: Heat CloudFormation API
|
||||||
|
Group: System Environment/Base
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
%description api-cfn
|
||||||
|
AWS CloudFormation-compatible API to the Heat Engine
|
||||||
|
|
||||||
|
%files api-cfn
|
||||||
|
%doc README.rst LICENSE
|
||||||
|
%{_bindir}/heat-api-cfn
|
||||||
|
%{_initrddir}/openstack-heat-api-cfn
|
||||||
|
|
||||||
|
|
||||||
|
%package api-cloudwatch
|
||||||
|
Summary: Heat CloudWatch API
|
||||||
|
Group: System Environment/Base
|
||||||
|
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
|
%description api-cloudwatch
|
||||||
|
AWS CloudWatch-compatible API to the Heat Engine
|
||||||
|
|
||||||
|
%files api-cloudwatch
|
||||||
|
%{_bindir}/heat-api-cloudwatch
|
||||||
|
%{_initrddir}/openstack-heat-api-cloudwatch
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user