From 278b141183f767d78596358c6ce33a725ac253ec Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Wed, 24 Jan 2018 10:26:37 +0530 Subject: [PATCH] Add endpoint for ODL Add ODL endpoint and use it to get ODL port. Public access to ODL is not allowed and hence the public endpoint is missing. Internal endpoint is used for all internal communication and TLS is enabled for that. Change-Id: I66af960c6732f5d2efa8ea2db28cad122e321999 --- .../ssl/tls-endpoints-public-dns.yaml | 2 + environments/ssl/tls-endpoints-public-ip.yaml | 2 + .../ssl/tls-everywhere-endpoints-dns.yaml | 2 + environments/tls-endpoints-public-dns.yaml | 2 + environments/tls-endpoints-public-ip.yaml | 2 + .../tls-everywhere-endpoints-dns.yaml | 2 + network/endpoints/endpoint_data.yaml | 7 + network/endpoints/endpoint_map.yaml | 164 ++++++++++++++++++ puppet/services/opendaylight-api.yaml | 21 ++- puppet/services/opendaylight-ovs.yaml | 14 +- .../notes/odl_endpoint-74b00c6ed38e9a98.yaml | 7 + sample-env-generator/ssl.yaml | 6 + 12 files changed, 225 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/odl_endpoint-74b00c6ed38e9a98.yaml diff --git a/environments/ssl/tls-endpoints-public-dns.yaml b/environments/ssl/tls-endpoints-public-dns.yaml index d851024a7d..8211cd8562 100644 --- a/environments/ssl/tls-endpoints-public-dns.yaml +++ b/environments/ssl/tls-endpoints-public-dns.yaml @@ -78,6 +78,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'} diff --git a/environments/ssl/tls-endpoints-public-ip.yaml b/environments/ssl/tls-endpoints-public-ip.yaml index 1fbbdd441e..f212c723a4 100644 --- a/environments/ssl/tls-endpoints-public-ip.yaml +++ b/environments/ssl/tls-endpoints-public-ip.yaml @@ -78,6 +78,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'IP_ADDRESS'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'IP_ADDRESS'} diff --git a/environments/ssl/tls-everywhere-endpoints-dns.yaml b/environments/ssl/tls-everywhere-endpoints-dns.yaml index 05aca9cd71..ae53aff4c6 100644 --- a/environments/ssl/tls-everywhere-endpoints-dns.yaml +++ b/environments/ssl/tls-everywhere-endpoints-dns.yaml @@ -78,6 +78,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} + OpenDaylightInternal: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} PankoAdmin: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoInternal: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'} diff --git a/environments/tls-endpoints-public-dns.yaml b/environments/tls-endpoints-public-dns.yaml index 6144ba0179..7151f15aa8 100644 --- a/environments/tls-endpoints-public-dns.yaml +++ b/environments/tls-endpoints-public-dns.yaml @@ -72,6 +72,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'} diff --git a/environments/tls-endpoints-public-ip.yaml b/environments/tls-endpoints-public-ip.yaml index 6cbe37e25d..0408fec96a 100644 --- a/environments/tls-endpoints-public-ip.yaml +++ b/environments/tls-endpoints-public-ip.yaml @@ -72,6 +72,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'IP_ADDRESS'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'IP_ADDRESS'} diff --git a/environments/tls-everywhere-endpoints-dns.yaml b/environments/tls-everywhere-endpoints-dns.yaml index 4f7886ef3a..86d2be07f9 100644 --- a/environments/tls-everywhere-endpoints-dns.yaml +++ b/environments/tls-everywhere-endpoints-dns.yaml @@ -68,6 +68,8 @@ parameter_defaults: OctaviaAdmin: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} + OpenDaylightInternal: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} PankoAdmin: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoInternal: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'} diff --git a/network/endpoints/endpoint_data.yaml b/network/endpoints/endpoint_data.yaml index 1e5cd627bc..d5f4370479 100644 --- a/network/endpoints/endpoint_data.yaml +++ b/network/endpoints/endpoint_data.yaml @@ -354,3 +354,10 @@ DockerRegistry: Internal: net_param: DockerRegistry port: 8787 + +OpenDaylight: + Internal: + net_param: OpenDaylightApi + Admin: + net_param: OpenDaylightApi + port: 8081 \ No newline at end of file diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml index cd4fab66f6..153b3f9bf6 100644 --- a/network/endpoints/endpoint_map.yaml +++ b/network/endpoints/endpoint_map.yaml @@ -85,6 +85,8 @@ parameters: OctaviaAdmin: {protocol: http, port: '9876', host: IP_ADDRESS} OctaviaInternal: {protocol: http, port: '9876', host: IP_ADDRESS} OctaviaPublic: {protocol: http, port: '9876', host: IP_ADDRESS} + OpenDaylightAdmin: {protocol: http, port: '8081', host: IP_ADDRESS} + OpenDaylightInternal: {protocol: http, port: '8081', host: IP_ADDRESS} PankoAdmin: {protocol: http, port: '8977', host: IP_ADDRESS} PankoInternal: {protocol: http, port: '8977', host: IP_ADDRESS} PankoPublic: {protocol: http, port: '8977', host: IP_ADDRESS} @@ -6528,6 +6530,168 @@ outputs: template: NETWORK_uri port: get_param: [EndpointMap, OctaviaPublic, port] + OpenDaylightAdmin: + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightAdmin, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + host_nobrackets: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightAdmin, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + port: + get_param: [EndpointMap, OpenDaylightAdmin, port] + protocol: + get_param: [EndpointMap, OpenDaylightAdmin, protocol] + uri: + make_url: + scheme: + get_param: [EndpointMap, OpenDaylightAdmin, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightAdmin, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, OpenDaylightAdmin, port] + uri_no_suffix: + make_url: + scheme: + get_param: [EndpointMap, OpenDaylightAdmin, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightAdmin, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, OpenDaylightAdmin, port] + OpenDaylightInternal: + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightInternal, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + host_nobrackets: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightInternal, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + port: + get_param: [EndpointMap, OpenDaylightInternal, port] + protocol: + get_param: [EndpointMap, OpenDaylightInternal, protocol] + uri: + make_url: + scheme: + get_param: [EndpointMap, OpenDaylightInternal, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightInternal, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, OpenDaylightInternal, port] + uri_no_suffix: + make_url: + scheme: + get_param: [EndpointMap, OpenDaylightInternal, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, OpenDaylightInternal, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, OpenDaylightApiNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, OpenDaylightApiNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, OpenDaylightInternal, port] PankoAdmin: host: str_replace: diff --git a/puppet/services/opendaylight-api.yaml b/puppet/services/opendaylight-api.yaml index 6ffdcf3656..e362adbd32 100644 --- a/puppet/services/opendaylight-api.yaml +++ b/puppet/services/opendaylight-api.yaml @@ -5,7 +5,7 @@ description: > parameters: OpenDaylightPort: - default: 8081 + default: 0 description: Set opendaylight service port type: number OpenDaylightUsername: @@ -94,10 +94,16 @@ parameter_groups: OpenStack mailing list. parameters: - OpenDaylightConnectionProtocol + - OpenDaylightPort conditions: internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} + odl_deprecated_port_set: + not: + equals: + - {get_param: OpenDaylightPort} + - 0 outputs: role_data: @@ -107,7 +113,11 @@ outputs: config_settings: map_merge: - - opendaylight::odl_rest_port: {get_param: OpenDaylightPort} + opendaylight::odl_rest_port: + if: + - odl_deprecated_port_set + - {get_param: OpenDaylightPort} + - {get_param: [EndpointMap, OpenDaylightInternal, port]} opendaylight::username: {get_param: OpenDaylightUsername} opendaylight::password: {get_param: OpenDaylightPassword} opendaylight::extra_features: {get_param: OpenDaylightFeatures} @@ -116,7 +126,10 @@ outputs: tripleo.opendaylight_api.firewall_rules: '137 opendaylight api': dport: - - {get_param: OpenDaylightPort} + - if: + - odl_deprecated_port_set + - {get_param: OpenDaylightPort} + - {get_param: [EndpointMap, OpenDaylightInternal, port]} - 6640 - 6653 - 2550 @@ -174,4 +187,4 @@ outputs: - service: odl network: {get_param: [ServiceNetMap, OpendaylightApiNetwork]} type: node - - null + - null \ No newline at end of file diff --git a/puppet/services/opendaylight-ovs.yaml b/puppet/services/opendaylight-ovs.yaml index 656051bbbf..33d8fbce97 100644 --- a/puppet/services/opendaylight-ovs.yaml +++ b/puppet/services/opendaylight-ovs.yaml @@ -5,7 +5,7 @@ description: > parameters: OpenDaylightPort: - default: 8081 + default: 0 description: Set opendaylight service port type: number OpenDaylightUsername: @@ -110,10 +110,16 @@ parameter_groups: OpenStack mailing list. parameters: - OpenDaylightConnectionProtocol + - OpenDaylightPort conditions: internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} + odl_deprecated_port_set: + not: + equals: + - {get_param: OpenDaylightPort} + - 0 resources: Ovs: @@ -158,7 +164,11 @@ outputs: service_name: opendaylight_ovs config_settings: map_merge: - - opendaylight::odl_rest_port: {get_param: OpenDaylightPort} + - opendaylight::odl_rest_port: + if: + - odl_deprecated_port_set + - {get_param: OpenDaylightPort} + - {get_param: [EndpointMap, OpenDaylightInternal, port]} opendaylight::username: {get_param: OpenDaylightUsername} opendaylight::password: {get_param: OpenDaylightPassword} neutron::plugins::ovs::opendaylight::odl_username: {get_param: OpenDaylightUsername} diff --git a/releasenotes/notes/odl_endpoint-74b00c6ed38e9a98.yaml b/releasenotes/notes/odl_endpoint-74b00c6ed38e9a98.yaml new file mode 100644 index 0000000000..58a2ffb7f6 --- /dev/null +++ b/releasenotes/notes/odl_endpoint-74b00c6ed38e9a98.yaml @@ -0,0 +1,7 @@ +--- +features: + - Endpoint is added for ODL. Public access is not allowed for ODL + so public endpoint is not added. +deprecations: + - Parameter "OpenDaylightPort" is deprecated and will be removed from + R. \ No newline at end of file diff --git a/sample-env-generator/ssl.yaml b/sample-env-generator/ssl.yaml index c6a4e69adb..8a23cef405 100644 --- a/sample-env-generator/ssl.yaml +++ b/sample-env-generator/ssl.yaml @@ -173,6 +173,8 @@ environments: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'IP_ADDRESS'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'IP_ADDRESS'} @@ -275,6 +277,8 @@ environments: OctaviaAdmin: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'http', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} + OpenDaylightInternal: {protocol: 'http', port: '8081', host: 'IP_ADDRESS'} PankoAdmin: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoInternal: {protocol: 'http', port: '8977', host: 'IP_ADDRESS'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'} @@ -377,6 +381,8 @@ environments: OctaviaAdmin: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaInternal: {protocol: 'https', port: '9876', host: 'IP_ADDRESS'} OctaviaPublic: {protocol: 'https', port: '13876', host: 'CLOUDNAME'} + OpenDaylightAdmin: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} + OpenDaylightInternal: {protocol: 'https', port: '8081', host: 'CLOUDNAME'} PankoAdmin: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoInternal: {protocol: 'https', port: '8977', host: 'CLOUDNAME'} PankoPublic: {protocol: 'https', port: '13977', host: 'CLOUDNAME'}