diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 6f4c685f98..57a2ab542f 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -70,11 +70,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 f5adfc4b7b..e6bba74d45 100644 --- a/ansible/roles/neutron/templates/metadata_agent.ini.j2 +++ b/ansible/roles/neutron/templates/metadata_agent.ini.j2 @@ -1,4 +1,5 @@ # metadata_agent.ini [DEFAULT] nova_metadata_ip = {{ kolla_internal_address }} +nova_metadata_port = {{ nova_metadata_port }} metadata_proxy_shared_secret = {{ metadata_secret }} 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 b4dbe7dda7..1183931525 100644 --- a/etc/kolla/defaults.yml +++ b/etc/kolla/defaults.yml @@ -35,6 +35,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"