From 3abb38ae149640efe1821c82094ed20dbd390c24 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Fri, 20 Jul 2018 21:56:41 +0000 Subject: [PATCH] Split designate envs Because the designate parameters will always need to be edited for a deployment, a copy of the environment must be made. However, because there were resource_registry entries in the previous enable-designate environments those relative paths would become invalid if the file was moved. Splitting the resource_registry entries from the user-configured parameters should eliminate this problem. Change-Id: I8817a36e20e7a75b340a0d6cb0abf09e57b1fd63 --- ...gnate-ha.yaml => designate-config-ha.yaml} | 16 +---- environments/designate-config.yaml | 69 +++++++++++++++++++ environments/enable-designate.yaml | 64 +---------------- sample-env-generator/enable-services.yaml | 19 +++-- 4 files changed, 89 insertions(+), 79 deletions(-) rename environments/{enable-designate-ha.yaml => designate-config-ha.yaml} (85%) create mode 100644 environments/designate-config.yaml diff --git a/environments/enable-designate-ha.yaml b/environments/designate-config-ha.yaml similarity index 85% rename from environments/enable-designate-ha.yaml rename to environments/designate-config-ha.yaml index fc9243c546..36eeacc364 100644 --- a/environments/enable-designate-ha.yaml +++ b/environments/designate-config-ha.yaml @@ -4,14 +4,10 @@ # Users are recommended to make changes to a copy of the file instead # of the original, if any customizations are needed. # ******************************************************************* -# title: Enable Designate Service +# title: Configure Designate Parameters for HA # description: | -# EXPERIMENTAL: This service is not considered ready for production and -# should only be used for development and test purposes at this time. -# -# This environment enables the Designate services and provides sample -# configuration values for other services to allow them to integrate with -# Designate. +# Sample configuration parameters for Designate that are appropriate +# for an HA deployment. Requires the enable-designate environment. parameter_defaults: # The content for Designate's pools.yaml # Mandatory. This parameter must be set by the user. @@ -129,9 +125,3 @@ parameter_defaults: # Type: comma_delimited_list NeutronPluginExtensions: qos,port_security,dns -resource_registry: - OS::TripleO::Services::DesignateApi: ../docker/services/designate-api.yaml - OS::TripleO::Services::DesignateCentral: ../docker/services/designate-central.yaml - OS::TripleO::Services::DesignateMDNS: ../docker/services/designate-mdns.yaml - OS::TripleO::Services::DesignateProducer: ../docker/services/designate-producer.yaml - OS::TripleO::Services::DesignateWorker: ../docker/services/designate-worker.yaml diff --git a/environments/designate-config.yaml b/environments/designate-config.yaml new file mode 100644 index 0000000000..7bd10a8db9 --- /dev/null +++ b/environments/designate-config.yaml @@ -0,0 +1,69 @@ +# ******************************************************************* +# This file was created automatically by the sample environment +# generator. Developers should use `tox -e genconfig` to update it. +# Users are recommended to make changes to a copy of the file instead +# of the original, if any customizations are needed. +# ******************************************************************* +# title: Configure Designate Parameters +# description: | +# Sample configuration parameters for Designate. Requires the +# enable-designate environment. +parameter_defaults: + # The content for Designate's pools.yaml + # Mandatory. This parameter must be set by the user. + # Type: string + DesignatePools: | + - name: default + # The name is immutable. There will be no option to change the name after + # creation and the only way will to change it will be to delete it + # (and all zones associated with it) and recreate it. + description: Default Pool + + attributes: {} + + # List out the NS records for zones hosted within this pool + # This should be a record that is created outside of designate, that + # points to the public IP of the controller node. + ns_records: + - hostname: ns1-1.example.org. + priority: 1 + + # List out the nameservers for this pool. These are the actual BIND servers. + # We use these to verify changes have propagated to all nameservers. + nameservers: + - host: 10.0.0.51 + port: 53 + + # List out the targets for this pool. For BIND there will be one + # entry for each BIND server, as we have to run rndc command on each server + targets: + - type: bind9 + description: BIND9 Server 1 + + # List out the designate-mdns servers from which BIND servers should + # request zone transfers (AXFRs) from. + # This should be the IP of the controller node. + # If you have multiple controllers you can add multiple masters + # by running designate-mdns on them, and adding them here. + masters: + - host: 10.0.0.51 + port: 5354 + + # BIND Configuration options + options: + host: 10.0.0.51 + port: 53 + rndc_host: 172.17.0.251 + rndc_port: 953 + rndc_key_file: /etc/rndc.key + + # If True, enable the internal Neutron DNS server that provides name + # resolution between VMs. This parameter has no effect if + # NeutronDhcpAgentDnsmasqDnsServers is set. + # Type: boolean + NeutronEnableInternalDNS: True + + # Comma-separated list of extensions enabled for the Neutron plugin. + # Type: comma_delimited_list + NeutronPluginExtensions: qos,port_security,dns + diff --git a/environments/enable-designate.yaml b/environments/enable-designate.yaml index f001153c3a..94a5f1cf40 100644 --- a/environments/enable-designate.yaml +++ b/environments/enable-designate.yaml @@ -9,68 +9,8 @@ # EXPERIMENTAL: This service is not considered ready for production and # should only be used for development and test purposes at this time. # -# This environment enables the Designate services and provides sample -# configuration values for other services to allow them to integrate with -# Designate. -parameter_defaults: - # The content for Designate's pools.yaml - # Mandatory. This parameter must be set by the user. - # Type: string - DesignatePools: | - - name: default - # The name is immutable. There will be no option to change the name after - # creation and the only way will to change it will be to delete it - # (and all zones associated with it) and recreate it. - description: Default Pool - - attributes: {} - - # List out the NS records for zones hosted within this pool - # This should be a record that is created outside of designate, that - # points to the public IP of the controller node. - ns_records: - - hostname: ns1-1.example.org. - priority: 1 - - # List out the nameservers for this pool. These are the actual BIND servers. - # We use these to verify changes have propagated to all nameservers. - nameservers: - - host: 10.0.0.51 - port: 53 - - # List out the targets for this pool. For BIND there will be one - # entry for each BIND server, as we have to run rndc command on each server - targets: - - type: bind9 - description: BIND9 Server 1 - - # List out the designate-mdns servers from which BIND servers should - # request zone transfers (AXFRs) from. - # This should be the IP of the controller node. - # If you have multiple controllers you can add multiple masters - # by running designate-mdns on them, and adding them here. - masters: - - host: 10.0.0.51 - port: 5354 - - # BIND Configuration options - options: - host: 10.0.0.51 - port: 53 - rndc_host: 172.17.0.251 - rndc_port: 953 - rndc_key_file: /etc/rndc.key - - # If True, enable the internal Neutron DNS server that provides name - # resolution between VMs. This parameter has no effect if - # NeutronDhcpAgentDnsmasqDnsServers is set. - # Type: boolean - NeutronEnableInternalDNS: True - - # Comma-separated list of extensions enabled for the Neutron plugin. - # Type: comma_delimited_list - NeutronPluginExtensions: qos,port_security,dns - +# This environment enables the Designate services. One of the +# designate-config* environment files must also be included. resource_registry: OS::TripleO::Services::DesignateApi: ../docker/services/designate-api.yaml OS::TripleO::Services::DesignateCentral: ../docker/services/designate-central.yaml diff --git a/sample-env-generator/enable-services.yaml b/sample-env-generator/enable-services.yaml index 560f897a7f..2609193fcb 100644 --- a/sample-env-generator/enable-services.yaml +++ b/sample-env-generator/enable-services.yaml @@ -6,15 +6,22 @@ environments: EXPERIMENTAL: This service is not considered ready for production and should only be used for development and test purposes at this time. - This environment enables the Designate services and provides sample - configuration values for other services to allow them to integrate with - Designate. + This environment enables the Designate services. One of the + designate-config* environment files must also be included. + # FIXME(bnemec): files should not be a required key. + files: {} resource_registry: OS::TripleO::Services::DesignateApi: ../docker/services/designate-api.yaml OS::TripleO::Services::DesignateCentral: ../docker/services/designate-central.yaml OS::TripleO::Services::DesignateProducer: ../docker/services/designate-producer.yaml OS::TripleO::Services::DesignateWorker: ../docker/services/designate-worker.yaml OS::TripleO::Services::DesignateMDNS: ../docker/services/designate-mdns.yaml + - + name: designate-config + title: Configure Designate Parameters + description: | + Sample configuration parameters for Designate. Requires the + enable-designate environment. files: puppet/services/neutron-plugin-ml2.yaml: parameters: @@ -75,7 +82,11 @@ environments: rndc_key_file: /etc/rndc.key children: - - name: enable-designate-ha + name: designate-config-ha + title: Configure Designate Parameters for HA + description: | + Sample configuration parameters for Designate that are appropriate + for an HA deployment. Requires the enable-designate environment. sample_values: NeutronPluginExtensions: qos,port_security,dns NeutronEnableInternalDNS: True