From d91346377efa5d551bde6de3ace35e9d889d5364 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 6 Aug 2015 13:14:23 +0000 Subject: [PATCH] Update nova.conf and ports Cleanup all options in the minimal nova.conf. Remove options where the default value was specified explicitly. Updated ports and bindings to be configurable. Partially-Implements: blueprint update-configs Change-Id: I0bca7a8f9c4c6fa40145d66a95de7e98edc0edce --- .../roles/haproxy/templates/haproxy.cfg.j2 | 13 +++++--- .../neutron/templates/metadata_agent.ini.j2 | 1 + ansible/roles/nova/templates/nova.conf.j2 | 33 +++++++++++-------- etc/kolla/defaults.yml | 2 ++ 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 11a3340990..08e0c7cc3f 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -66,11 +66,16 @@ listen nova_api server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_port }} check inter 2000 rise 2 fall 5 {% endfor %} -listen nova_metadata - # TODO(SamYaple): Make metadata port configurable throughout Ansible - bind {{ kolla_internal_address }}:8775 +listen nova_api_ec2 + bind {{ kolla_internal_address }}:{{ nova_api_ec2_port }} {% for host in groups['nova-api'] %} - server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:8775 check inter 2000 rise 2 fall 5 + server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_api_ec2_port }} check inter 2000 rise 2 fall 5 +{% endfor %} + +listen nova_metadata + bind {{ kolla_internal_address }}:{{ nova_metadata_port }} +{% for host in groups['nova-api'] %} + server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_metadata_port }} check inter 2000 rise 2 fall 5 {% endfor %} listen neutron_server diff --git a/ansible/roles/neutron/templates/metadata_agent.ini.j2 b/ansible/roles/neutron/templates/metadata_agent.ini.j2 index f5302889ac..e003982903 100644 --- a/ansible/roles/neutron/templates/metadata_agent.ini.j2 +++ b/ansible/roles/neutron/templates/metadata_agent.ini.j2 @@ -1,6 +1,7 @@ # metadata_agent.ini [DEFAULT] nova_metadata_ip = {{ kolla_internal_address }} +nova_metadata_port = {{ nova_metadata_port }} metadata_proxy_shared_secret = {{ metadata_secret }} auth_uri = http://{{ kolla_internal_address }}:{{ keystone_public_port }} auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }} diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 7d3f1569ea..732c19aeef 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -1,17 +1,21 @@ +# nova.conf [DEFAULT] verbose = true debug = true -state_path = /var/lib/nova -lock_path = /var/lock/nova api_paste_config = /etc/nova/api-paste.ini osapi_compute_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +osapi_compute_listen_port = {{ nova_api_port }} + +metadata_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +metadata_listen_port = {{ nova_metadata_port }} + ec2_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +ec2_listen_port = {{ nova_api_ec2_port }} -notification_driver = nova.openstack.common.notifier.rpc_notifier +notification_driver = noop -virt_type = kvm security_group_api = neutron network_api_class = nova.network.neutronv2.api.API firewall_driver = nova.virt.firewall.NoopFirewallDriver @@ -25,13 +29,14 @@ linuxnet_interface_driver = nova.network.linux_net.BridgeInterfaceDriver compute_driver = libvirt.LibvirtDriver allow_resize_to_same_host = true +# Though my_ip is not used directly, lots of other variables use $my_ip my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -metadata_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -vnc_enabled = true vncserver_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} vncserver_proxyclient_address = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} +{% if inventory_hostname is groups['compute'] %} novncproxy_base_url = http://{{ kolla_internal_address }}:6080/vnc_auto.html +{% endif %} [oslo_messaging_rabbit] rabbit_host = {{ kolla_internal_address }} @@ -51,13 +56,17 @@ catalog_info = volume:cinder:internalURL [neutron] url = http://{{ kolla_internal_address }}:{{ neutron_server_port }} auth_strategy = keystone -admin_auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }}/v2.0 -admin_tenant_name = service -admin_username = neutron -admin_password = {{ neutron_keystone_password }} metadata_proxy_shared_secret = {{ metadata_secret }} service_metadata_proxy = true +auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }} +auth_plugin = password +project_domain_name = default +user_domain_id = default +project_name = service +username = nova +password = {{ neutron_keystone_password }} + [database] connection = mysql://{{ nova_database_user }}:{{ nova_database_password }}@{{ nova_database_address }}/{{ nova_database_name }} @@ -70,7 +79,3 @@ user_domain_id = default project_name = service username = nova password = {{ nova_keystone_password }} - -[libvirt] -connection_type = libvirt -inject_partition = -2 diff --git a/etc/kolla/defaults.yml b/etc/kolla/defaults.yml index 5ed397cbf1..4a5d4c999e 100644 --- a/etc/kolla/defaults.yml +++ b/etc/kolla/defaults.yml @@ -30,6 +30,8 @@ glance_api_port: "9292" glance_registry_port: "9191" nova_api_port: "8774" +nova_api_ec2_port: "8773" +nova_metadata_port: "8775" neutron_server_port: "9696"