From 3df5c192350597d850adf77f356641e2dbb81740 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 7 Mar 2017 01:26:08 +0000 Subject: [PATCH] KS endpoint type lookup for Neutron --- neutron/templates/bin/_post.sh.tpl | 6 +-- neutron/templates/etc/_metadata-agent.ini.tpl | 14 +++---- neutron/templates/etc/_neutron.conf.tpl | 24 ++++++----- neutron/values.yaml | 40 +++++++++---------- 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/neutron/templates/bin/_post.sh.tpl b/neutron/templates/bin/_post.sh.tpl index 2bf6eb6c0e..4bd014133f 100644 --- a/neutron/templates/bin/_post.sh.tpl +++ b/neutron/templates/bin/_post.sh.tpl @@ -21,7 +21,7 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ +url='{{ tuple "network" "admin" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}' \ interface=admin \ region_name={{ .Values.keystone.admin_region_name }} \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ @@ -31,7 +31,7 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ +url='{{ tuple "network" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}' \ interface=internal \ region_name={{ .Values.keystone.admin_region_name }} \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ @@ -41,7 +41,7 @@ ansible localhost -vvv -m kolla_keystone_service -a "service_name=neutron \ service_type=network \ description='Openstack Networking' \ endpoint_region={{ .Values.keystone.neutron_region_name }} \ -url='{{ include "helm-toolkit.endpoint_neutron_api_internal" . }}' \ +url='{{ tuple "network" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}' \ interface=public \ region_name={{ .Values.keystone.admin_region_name }} \ auth='{{ include "helm-toolkit.keystone_auth" .}}'" \ diff --git a/neutron/templates/etc/_metadata-agent.ini.tpl b/neutron/templates/etc/_metadata-agent.ini.tpl index 2ba411946e..ef243c8106 100644 --- a/neutron/templates/etc/_metadata-agent.ini.tpl +++ b/neutron/templates/etc/_metadata-agent.ini.tpl @@ -16,16 +16,14 @@ debug = {{ .Values.metadata_agent.default.debug }} # Neutron credentials for API access +auth_url = {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} auth_plugin = password -auth_url = {{ include "helm-toolkit.endpoint_keystone_admin" . }} -auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_region = {{ .Values.keystone.neutron_region_name }} -admin_tenant_name = service -project_domain_id = default -user_domain_id = default -project_name = service -username = {{ .Values.keystone.admin_user }} -password = {{ .Values.keystone.admin_password }} +project_domain_name = {{ .Values.keystone.neutron_project_domain }} +project_name = {{ .Values.keystone.neutron_project_name }} +user_domain_name = {{ .Values.keystone.neutron_user_domain }} +username = {{ .Values.keystone.neutron_user }} +password = {{ .Values.keystone.neutron_password }} endpoint_type = adminURL # Nova metadata service IP and port diff --git a/neutron/templates/etc/_neutron.conf.tpl b/neutron/templates/etc/_neutron.conf.tpl index 716705f0d7..4adcf32805 100644 --- a/neutron/templates/etc/_neutron.conf.tpl +++ b/neutron/templates/etc/_neutron.conf.tpl @@ -47,13 +47,14 @@ router_auto_schedule = True transport_url = rabbit://{{ .Values.rabbitmq.admin_user }}:{{ .Values.rabbitmq.admin_password }}@{{ .Values.rabbitmq.address }}:{{ .Values.rabbitmq.port }} [nova] -auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} -auth_plugin = password -project_domain_id = default -user_domain_id = default -endpoint_type = internal +memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" +auth_version = v3 +auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} +auth_type = password region_name = {{ .Values.keystone.nova_region_name }} -project_name = service +project_domain_name = {{ .Values.keystone.nova_project_domain }} +project_name = {{ .Values.keystone.nova_project_name }} +user_domain_name = {{ .Values.keystone.nova_user_domain }} username = {{ .Values.keystone.nova_user }} password = {{ .Values.keystone.nova_password }} @@ -73,11 +74,14 @@ connection = mysql+pymysql://{{ .Values.database.neutron_user }}:{{ .Values.data max_retries = -1 [keystone_authtoken] -auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} +memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" +auth_version = v3 +auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }} auth_type = password -project_domain_id = default -user_domain_id = default -project_name = service +region_name = {{ .Values.keystone.neutron_region_name }} +project_domain_name = {{ .Values.keystone.neutron_project_domain }} +project_name = {{ .Values.keystone.neutron_project_name }} +user_domain_name = {{ .Values.keystone.neutron_user_domain }} username = {{ .Values.keystone.neutron_user }} password = {{ .Values.keystone.neutron_password }} diff --git a/neutron/values.yaml b/neutron/values.yaml index 6dd479c783..a5cd3c6d40 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -81,7 +81,8 @@ network: metadata: 8775 memcached: - address: "memcached:11211" + host: memcached + port: 11211 rabbitmq: address: rabbitmq @@ -91,18 +92,26 @@ rabbitmq: keystone: admin_user: "admin" + admin_user_domain: "default" admin_password: "password" admin_project_name: "admin" + admin_project_domain: "default" admin_region_name: "RegionOne" - domain_name: "default" - tenant_name: "admin" neutron_user: "neutron" + neutron_user_domain: "default" + neutron_user_role: "admin" neutron_password: "password" + neutron_project_name: "service" + neutron_project_domain: "default" neutron_region_name: "RegionOne" nova_user: "nova" + nova_user_domain: "default" + nova_user_role: "admin" nova_password: "password" + nova_project_name: "service" + nova_project_domain: "default" nova_region_name: "RegionOne" database: @@ -293,39 +302,30 @@ resources: # values, but should include all endpoints # required by this chart endpoints: - glance: - hosts: - default: glance-api - type: image - path: null - scheme: 'http' - port: - api: 9292 - registry: 9191 - nova: + compute: + name: nova hosts: default: nova-api path: "/v2/%(tenant_id)s" - type: compute scheme: 'http' port: api: 8774 metadata: 8775 novncproxy: 6080 - keystone: + identity: + name: keystone hosts: default: keystone-api path: /v3 - type: identity scheme: 'http' port: - admin: 35357 - public: 5000 - neutron: + admin: 35357 + api: 5000 + network: + name: neutron hosts: default: neutron-server path: null - type: network scheme: 'http' port: api: 9696