Merge "Stop using puppet to configure VIPs in /etc/hosts"

This commit is contained in:
Jenkins 2016-11-29 01:02:31 +00:00 committed by Gerrit Code Review
commit 95e443cd10
7 changed files with 55 additions and 98 deletions

View File

@ -25,5 +25,4 @@ parameter_defaults:
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- OS::TripleO::Services::CephOSD
- OS::TripleO::Services::CephOSD

View File

@ -1,5 +1,5 @@
# A Heat environment file which can be used to disable the writing of the VIPs
# to the /etc/hosts file in the overcloud. Use this in case you have a working
# DNS server that you will provide for the overcloud.
resource_registry:
OS::TripleO::Services::VipHosts: OS::Heat::None
parameter_defaults:
AddVipsToEtcHosts: False

View File

@ -3,7 +3,7 @@ description: 'All Hosts Config'
parameters:
hosts:
type: comma_delimited_list
type: string
resources:
@ -12,10 +12,7 @@ resources:
properties:
group: os-apply-config
config:
hosts:
list_join:
- "\n"
- {get_param: hosts}
hosts: {get_param: hosts}
outputs:
config_id:

View File

@ -182,7 +182,6 @@ resource_registry:
OS::TripleO::Services::GnocchiApi: puppet/services/gnocchi-api.yaml
OS::TripleO::Services::GnocchiMetricd: puppet/services/gnocchi-metricd.yaml
OS::TripleO::Services::GnocchiStatsd: puppet/services/gnocchi-statsd.yaml
OS::TripleO::Services::VipHosts: puppet/services/vip-hosts.yaml
# Services that are disabled by default (use relevant environment files):
OS::TripleO::Services::FluentdClient: OS::Heat::None
OS::TripleO::LoggingConfiguration: puppet/services/logging/fluentd-config.yaml

View File

@ -170,9 +170,50 @@ parameters:
description: >
Setting this to a unique value will re-run any deployment tasks which
perform configuration on a Heat stack-update.
AddVipsToEtcHosts:
default: True
type: boolean
description: >
Set to true to append per network Vips to /etc/hosts on each node.
conditions:
add_vips_to_etc_hosts: {equals : [{get_param: AddVipsToEtcHosts}, True]}
resources:
VipHosts:
type: OS::Heat::Value
properties:
type: string
value:
list_join:
- '\n'
- - str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, external]}
HOST: {get_param: CloudName}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, ctlplane]}
HOST: {get_param: CloudNameCtlplane}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, internal_api]}
HOST: {get_param: CloudNameInternal}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, storage]}
HOST: {get_param: CloudNameStorage}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, storage_mgmt]}
HOST: {get_param: CloudNameStorageManagement}
HeatAuthEncryptionKey:
type: OS::Heat::RandomString
@ -328,8 +369,15 @@ resources:
type: OS::TripleO::Hosts::SoftwareConfig
properties:
hosts:
list_join:
- '\n'
- - if:
- add_vips_to_etc_hosts
- {get_attr: [VipHosts, value]}
- ''
-
{% for role in roles %}
- list_join:
- list_join:
- '\n'
- {get_attr: [{{role.name}}, hosts_entry]}
{% endfor %}
@ -581,32 +629,7 @@ outputs:
list_join:
- "\n"
- - {get_attr: [hostsConfig, hosts_entries]}
-
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, external]}
HOST: {get_param: CloudName}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, ctlplane]}
HOST: {get_param: CloudNameCtlplane}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, internal_api]}
HOST: {get_param: CloudNameInternal}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, storage]}
HOST: {get_param: CloudNameStorage}
- str_replace:
template: IP HOST
params:
IP: {get_attr: [VipMap, net_ip_map, storage_mgmt]}
HOST: {get_param: CloudNameStorageManagement}
- - {get_attr: [VipHosts, value]}
EnabledServices:
description: The services enabled on each role
value:

View File

@ -1,56 +0,0 @@
heat_template_version: 2016-04-08
description: >
If the deployer doesn't have a DNS server for the overcloud nodes. This will
populate the node-names and IPs for the VIPs of the overcloud.
parameters:
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
outputs:
role_data:
description: role data for the VIP hosts role
value:
service_name: vip_hosts
config_settings:
tripleo::vip_hosts::hosts_spec:
external:
name: "%{hiera('cloud_name_external')}"
ip: "%{hiera('public_virtual_ip')}"
ensure: present
comment: FQDN of the external VIP
internal_api:
name: "%{hiera('cloud_name_internal_api')}"
ip: "%{hiera('internal_api_virtual_ip')}"
ensure: present
comment: FQDN of the internal api VIP
storage:
name: "%{hiera('cloud_name_storage')}"
ip: "%{hiera('storage_virtual_ip')}"
ensure: present
comment: FQDN of the storage VIP
storage_mgmt:
name: "%{hiera('cloud_name_storage_mgmt')}"
ip: "%{hiera('storage_mgmt_virtual_ip')}"
ensure: present
comment: FQDN of the storage mgmt VIP
ctlplane:
name: "%{hiera('cloud_name_ctlplane')}"
ip: "%{hiera('controller_virtual_ip')}"
ensure: present
comment: FQDN of the ctlplane VIP
step_config: |
include ::tripleo::vip_hosts

View File

@ -94,7 +94,6 @@
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- OS::TripleO::Services::BarbicanApi
- OS::TripleO::Services::PankoApi
@ -122,7 +121,6 @@
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- name: BlockStorage
ServicesDefault:
@ -136,7 +134,6 @@
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- name: ObjectStorage
ServicesDefault:
@ -151,7 +148,6 @@
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- name: CephStorage
ServicesDefault:
@ -165,4 +161,3 @@
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts