Update config templates for Mitaka

Update api-paste.ini to align with the upstream Mitaka version.

Add nova.conf for Mitaka, dropping all EC2 config options as the
EC2 API was dropped from the nova source tree in Mitaka.

Change-Id: I341d0043d2580db2aa7974537321913dac70c3b7
This commit is contained in:
Corey Bryant 2016-04-08 15:40:59 +00:00
parent 24514dcd5b
commit 902224c44b
3 changed files with 174 additions and 49 deletions

View File

@ -6,53 +6,11 @@ use = egg:Paste#urlmap
/: meta
[pipeline:meta]
pipeline = cors ec2faultwrap logrequest metaapp
pipeline = cors metaapp
[app:metaapp]
paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
#######
# EC2 #
#######
# NOTE: this is now deprecated in favor of https://github.com/stackforge/ec2-api
[composite:ec2]
use = egg:Paste#urlmap
/: ec2cloud
[composite:ec2cloud]
use = call:nova.api.auth:pipeline_factory
noauth2 = cors ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
keystone = cors ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor
[filter:ec2faultwrap]
paste.filter_factory = nova.api.ec2:FaultWrapper.factory
[filter:logrequest]
paste.filter_factory = nova.api.ec2:RequestLogging.factory
[filter:ec2lockout]
paste.filter_factory = nova.api.ec2:Lockout.factory
[filter:ec2keystoneauth]
paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory
[filter:ec2noauth]
paste.filter_factory = nova.api.ec2:NoAuth.factory
[filter:cloudrequest]
controller = nova.api.ec2.cloud.CloudController
paste.filter_factory = nova.api.ec2:Requestify.factory
[filter:authorizer]
paste.filter_factory = nova.api.ec2:Authorizer.factory
[filter:validator]
paste.filter_factory = nova.api.ec2:Validator.factory
[app:ec2executor]
paste.app_factory = nova.api.ec2:Executor.factory
#############
# OpenStack #
#############
@ -65,7 +23,6 @@ use = call:nova.api.openstack.urlmap:urlmap_factory
# this causes issues with your clients you can rollback to the
# *frozen* v2 api by commenting out the above stanza and using the
# following instead::
# /v1.1: openstack_compute_api_legacy_v2
# /v2: openstack_compute_api_legacy_v2
# if rolling back to v2 fixes your issue please file a critical bug
# at - https://bugs.launchpad.net/nova/+bugs
@ -75,7 +32,6 @@ use = call:nova.api.openstack.urlmap:urlmap_factory
# API). It also provides new features via API microversions which are
# opt into for clients. Unaware clients will receive the same frozen
# v2 API feature set, but with some relaxed validation
/v1.1: openstack_compute_api_v21_legacy_v2_compatible
/v2: openstack_compute_api_v21_legacy_v2_compatible
/v2.1: openstack_compute_api_v21

158
templates/mitaka/nova.conf Normal file
View File

@ -0,0 +1,158 @@
# mitaka
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
[DEFAULT]
verbose={{ verbose }}
debug={{ debug }}
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
connection_type=libvirt
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
api_paste_config=/etc/nova/api-paste.ini
volumes_path=/var/lib/nova/volumes
enabled_apis=osapi_compute,metadata
auth_strategy=keystone
compute_driver=libvirt.LibvirtDriver
use_ipv6 = {{ use_ipv6 }}
osapi_compute_listen = {{ bind_host }}
metadata_host = {{ bind_host }}
s3_listen = {{ bind_host }}
osapi_compute_workers = {{ workers }}
scheduler_default_filters = {{ scheduler_default_filters }}
cpu_allocation_ratio = {{ cpu_allocation_ratio }}
ram_allocation_ratio = {{ ram_allocation_ratio }}
use_syslog={{ use_syslog }}
my_ip = {{ host_ip }}
{% if memcached_servers %}
memcached_servers = {{ memcached_servers }}
{% endif %}
{% include "parts/novnc" %}
{% if rbd_pool -%}
rbd_pool = {{ rbd_pool }}
rbd_user = {{ rbd_user }}
rbd_secret_uuid = {{ rbd_secret_uuid }}
{% endif -%}
{% if neutron_plugin and neutron_plugin == 'ovs' -%}
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
libvirt_user_virtio_for_bridges = True
{% if neutron_security_groups -%}
security_group_api = {{ network_manager }}
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
{% endif -%}
{% if external_network -%}
default_floating_pool = {{ external_network }}
{% endif -%}
{% endif -%}
{% if neutron_plugin and neutron_plugin == 'vsp' -%}
neutron_ovs_bridge = alubr0
{% endif -%}
{% if neutron_plugin and neutron_plugin == 'nvp' -%}
security_group_api = neutron
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
{% if external_network -%}
default_floating_pool = {{ external_network }}
{% endif -%}
{% endif -%}
{% if neutron_plugin and neutron_plugin == 'Calico' -%}
security_group_api = neutron
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
{% endif -%}
{% if neutron_plugin and neutron_plugin == 'plumgrid' -%}
security_group_api=neutron
firewall_driver = nova.virt.firewall.NoopFirewallDriver
{% endif -%}
{% if network_manager_config -%}
{% for key, value in network_manager_config.iteritems() -%}
{{ key }} = {{ value }}
{% endfor -%}
{% endif -%}
{% if network_manager and network_manager == 'neutron' -%}
network_api_class = nova.network.neutronv2.api.API
{% else -%}
network_manager = nova.network.manager.FlatDHCPManager
{% endif -%}
{% if default_floating_pool -%}
default_floating_pool = {{ default_floating_pool }}
{% endif -%}
{% if volume_service -%}
volume_api_class=nova.volume.cinder.API
{% endif -%}
{% if user_config_flags -%}
{% for key, value in user_config_flags.iteritems() -%}
{{ key }} = {{ value }}
{% endfor -%}
{% endif -%}
{% if listen_ports -%}
{% for key, value in listen_ports.iteritems() -%}
{{ key }} = {{ value }}
{% endfor -%}
{% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}
{% endfor -%}
{% endif %}
{% include "section-zeromq" %}
{% include "parts/database-v2" %}
{% include "parts/database-api" %}
{% if glance_api_servers -%}
[glance]
api_servers = {{ glance_api_servers }}
{% endif -%}
{% if network_manager and network_manager == 'neutron' -%}
[neutron]
url = {{ neutron_url }}
auth_strategy = keystone
auth_section = keystone_authtoken
auth_plugin = password
{% endif -%}
{% include "section-keystone-authtoken" %}
{% include "parts/section-cinder" %}
[osapi_v3]
enabled=True
{% include "parts/cell" %}
[conductor]
workers = {{ workers }}
{% include "section-rabbitmq-oslo" %}
[oslo_concurrency]
lock_path=/var/lock/nova
[spice]
{% include "parts/spice" %}

View File

@ -206,6 +206,9 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
services[self.nova_cc_sentry].remove('nova-api-ec2')
services[self.nova_cc_sentry].remove('nova-objectstore')
if self._get_openstack_release() >= self.trusty_liberty:
services[self.keystone_sentry] = ['apache2']
ret = u.validate_services_by_name(services)
if ret:
amulet.raise_status(amulet.FAIL, msg=ret)
@ -544,17 +547,13 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf',
'verbose': 'False',
'debug': 'False',
'ec2_private_dns_show_ip': 'True',
'api_paste_config': '/etc/nova/api-paste.ini',
'volumes_path': '/var/lib/nova/volumes',
'enabled_apis': 'ec2,osapi_compute,metadata',
'auth_strategy': 'keystone',
'compute_driver': 'libvirt.LibvirtDriver',
'keystone_ec2_url': ks_ec2,
'network_manager': 'nova.network.manager.FlatDHCPManager',
's3_listen_port': '3323',
'osapi_compute_listen_port': '8764',
'ec2_listen_port': '8763'
}
}
@ -629,6 +628,18 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
'signing_dir': '/var/cache/nova',
}
if self._get_openstack_release() < self.trusty_mitaka:
expected['DEFAULT'].update({
'ec2_private_dns_show_ip': 'True',
'enabled_apis': 'ec2,osapi_compute,metadata',
'keystone_ec2_url': ks_ec2,
'ec2_listen_port': '8763'
})
elif self._get_openstack_release() >= self.trusty_mitaka:
expected['DEFAULT'].update({
'enabled_apis': 'osapi_compute,metadata',
})
for section, pairs in expected.iteritems():
ret = u.validate_config_data(unit, conf, section, pairs)
if ret: