Replace pike symlink

This patch fix upgrade if files/pike is symlink.

Change-Id: I00f3f9f8adb7896ad527140e024bf33c2b6ea935
Related-Prod: PROD-17540
diff --git a/debian/changelog b/debian/changelog
index 1963d1b..c508880 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+salt-formula-designate (2016.12.1-xenial1) xenial; urgency=medium
+
+  * Fix files/pike symlink
+
+ -- devops <devops@mirantis.com>  Tue, 06 Feb 2018 15:40:55 +0200
+
 salt-formula-designate (0.0.1) trusty; urgency=medium
 
   * Initial release
diff --git a/debian/salt-formula-designate.postinst b/debian/salt-formula-designate.postinst
new file mode 100644
index 0000000..dfd0f2f
--- /dev/null
+++ b/debian/salt-formula-designate.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/salt-formulas/env/designate/files/pike /usr/share/salt-formulas/env/designate/files/ocata salt-formula-designate -- "$@"
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/salt-formula-designate.postrm b/debian/salt-formula-designate.postrm
new file mode 100644
index 0000000..dfd0f2f
--- /dev/null
+++ b/debian/salt-formula-designate.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/salt-formulas/env/designate/files/pike /usr/share/salt-formulas/env/designate/files/ocata salt-formula-designate -- "$@"
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/salt-formula-designate.preinst b/debian/salt-formula-designate.preinst
new file mode 100644
index 0000000..dfd0f2f
--- /dev/null
+++ b/debian/salt-formula-designate.preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/salt-formulas/env/designate/files/pike /usr/share/salt-formulas/env/designate/files/ocata salt-formula-designate -- "$@"
+
+#DEBHELPER#
+
+exit 0
diff --git a/designate/files/pike b/designate/files/pike
deleted file mode 120000
index d5e8ce2..0000000
--- a/designate/files/pike
+++ /dev/null
@@ -1 +0,0 @@
-ocata
\ No newline at end of file
diff --git a/designate/files/pike/api-paste.ini b/designate/files/pike/api-paste.ini
new file mode 100644
index 0000000..b899d46
--- /dev/null
+++ b/designate/files/pike/api-paste.ini
@@ -0,0 +1,76 @@
+[composite:osapi_dns]
+use = egg:Paste#urlmap
+/: osapi_dns_versions
+/v1: osapi_dns_v1
+/v2: osapi_dns_v2
+/admin: osapi_dns_admin
+
+[composite:osapi_dns_versions]
+use = call:designate.api.middleware:auth_pipeline_factory
+noauth = http_proxy_to_wsgi cors maintenance faultwrapper osapi_dns_app_versions
+keystone = http_proxy_to_wsgi cors maintenance faultwrapper osapi_dns_app_versions
+
+[app:osapi_dns_app_versions]
+paste.app_factory = designate.api.versions:factory
+
+[composite:osapi_dns_v1]
+use = call:designate.api.middleware:auth_pipeline_factory
+noauth = http_proxy_to_wsgi cors request_id  noauthcontext maintenance validation_API_v1 faultwrapper_v1 normalizeuri osapi_dns_app_v1
+keystone = http_proxy_to_wsgi cors request_id authtoken keystonecontext maintenance validation_API_v1 faultwrapper_v1 normalizeuri osapi_dns_app_v1
+
+
+[app:osapi_dns_app_v1]
+paste.app_factory = designate.api.v1:factory
+
+[composite:osapi_dns_v2]
+use = call:designate.api.middleware:auth_pipeline_factory
+noauth = http_proxy_to_wsgi cors request_id faultwrapper validation_API_v2 noauthcontext maintenance normalizeuri osapi_dns_app_v2
+keystone = http_proxy_to_wsgi cors request_id faultwrapper validation_API_v2 authtoken keystonecontext maintenance normalizeuri osapi_dns_app_v2
+
+[app:osapi_dns_app_v2]
+paste.app_factory = designate.api.v2:factory
+
+[composite:osapi_dns_admin]
+use = call:designate.api.middleware:auth_pipeline_factory
+noauth = http_proxy_to_wsgi cors request_id faultwrapper noauthcontext maintenance normalizeuri osapi_dns_app_admin
+keystone = http_proxy_to_wsgi cors request_id faultwrapper authtoken keystonecontext maintenance normalizeuri osapi_dns_app_admin
+
+[app:osapi_dns_app_admin]
+paste.app_factory = designate.api.admin:factory
+
+[filter:cors]
+paste.filter_factory = oslo_middleware.cors:filter_factory
+oslo_config_project = designate
+
+[filter:request_id]
+paste.filter_factory = oslo_middleware:RequestId.factory
+
+[filter:http_proxy_to_wsgi]
+paste.filter_factory = oslo_middleware:HTTPProxyToWSGI.factory
+
+[filter:noauthcontext]
+paste.filter_factory = designate.api.middleware:NoAuthContextMiddleware.factory
+
+[filter:authtoken]
+paste.filter_factory = keystonemiddleware.auth_token:filter_factory
+
+[filter:keystonecontext]
+paste.filter_factory = designate.api.middleware:KeystoneContextMiddleware.factory
+
+[filter:maintenance]
+paste.filter_factory = designate.api.middleware:MaintenanceMiddleware.factory
+
+[filter:normalizeuri]
+paste.filter_factory = designate.api.middleware:NormalizeURIMiddleware.factory
+
+[filter:faultwrapper]
+paste.filter_factory = designate.api.middleware:FaultWrapperMiddleware.factory
+
+[filter:faultwrapper_v1]
+paste.filter_factory = designate.api.middleware:FaultWrapperMiddlewareV1.factory
+
+[filter:validation_API_v1]
+paste.filter_factory = designate.api.middleware:APIv1ValidationErrorMiddleware.factory
+
+[filter:validation_API_v2]
+paste.filter_factory = designate.api.middleware:APIv2ValidationErrorMiddleware.factory
diff --git a/designate/files/pike/designate.conf.Debian b/designate/files/pike/designate.conf.Debian
new file mode 100644
index 0000000..a89914c
--- /dev/null
+++ b/designate/files/pike/designate.conf.Debian
@@ -0,0 +1,642 @@
+{%- from "designate/map.jinja" import server, pool_manager with context %}
+
+[DEFAULT]
+# Where an option is commented out, but filled in this shows the default
+# value of that option
+
+########################
+## General Configuration
+########################
+# Show more verbose log output (sets INFO log level output)
+verbose = True
+
+# Show debugging output in logs (sets DEBUG log level output)
+debug = False
+
+# Top-level directory for maintaining designate's state
+#state_path = /var/lib/designate
+
+# Log Configuration
+#log_config = None
+
+# Log directory
+#logdir = /var/log/designate
+
+# Driver used for issuing notifications
+{%- if server.notification is defined %}
+{%- if server.notification.driver is defined %}
+notification_driver = {{ server.notification.driver }}
+{%- else %}
+notification_driver = messagingv2
+{%- endif %}
+
+# Notification Topics
+{%- if server.notification.topics is defined %}
+notification_topics = {{ server.notification.topics }}
+{%- endif %}
+{%- endif %}
+
+{%- if server.quota is defined %}
+# Default quotas
+{%- if server.quota.zones is defined %}
+quota_zones = {{ server.quota.zones }}
+{%- endif %}
+{%- endif %}
+
+# Use "sudo designate-rootwrap /etc/designate/rootwrap.conf" to use the real
+# root filter facility.
+# Change to "sudo" to skip the filtering and just run the command directly
+#root_helper = sudo designate-rootwrap /etc/designate/rootwrap.conf
+
+# Which networking API to use, Defaults to neutron
+#network_api = neutron
+
+# Supported record types
+#supported_record_type = A, AAAA, CNAME, MX, SRV, TXT, SPF, NS, PTR, SSHFP, SOA
+
+#-----------------------
+# RabbitMQ Config
+#-----------------------
+[oslo_messaging_rabbit]
+#rabbit_userid = guest
+#rabbit_password = guest
+#rabbit_virtual_host = /
+#rabbit_use_ssl = False
+#rabbit_hosts = 127.0.0.1:5672
+{# TODO: switch to transport_url when https://bugs.launchpad.net/designate/+bug/1673403 is fixed #}
+rabbit_userid = {{ server.message_queue.user }}
+rabbit_password = {{ server.message_queue.password }}
+rabbit_virtual_host = {{ server.message_queue.virtual_host }}
+#rabbit_use_ssl = False
+
+{%- set rabbit_port = server.message_queue.get('port', 5671 if server.message_queue.get('ssl',{}).get('enabled', False)  else 5672) %}
+{%- if server.message_queue.members is defined %}
+rabbit_hosts = {% for member in server.message_queue.members -%}
+                   {{ member.host }}:{{ member.get('port', rabbit_port) }}
+                   {%- if not loop.last -%},{%- endif -%}
+               {%- endfor -%}
+{%- else %}
+rabbit_host = {{ server.message_queue.host }}
+rabbit_port = {{ server.message_queue.port }}
+{%- endif %}
+
+{%- if server.message_queue.get('ssl',{}).get('enabled', False) %}
+rabbit_use_ssl=true
+{%- if server.message_queue.ssl.version is defined %}
+kombu_ssl_version = {{ server.message_queue.ssl.version }}
+{%- elif salt['grains.get']('pythonversion') > [2,7,8] %}
+kombu_ssl_version = TLSv1_2
+{%- endif %}
+kombu_ssl_ca_certs = {{ server.message_queue.ssl.get('cacert_file', server.cacert_file) }}
+{%- endif %}
+
+########################
+## Service Configuration
+########################
+#-----------------------
+# Central Service
+#-----------------------
+[service:central]
+# Number of central worker processes to spawn
+#workers = None
+
+# Number of central greenthreads to spawn
+#threads = 1000
+
+# Maximum zone name length
+#max_zone_name_len = 255
+
+# Maximum recordset name length
+#max_recordset_name_len = 255
+
+# Minimum TTL
+#min_ttl = None
+
+# The name of the default pool
+#default_pool_id = '794ccc2c-d751-44fe-b57f-8894c9f5c842'
+
+## Managed resources settings
+
+# Email to use for managed resources like domains created by the FloatingIP API
+#managed_resource_email = hostmaster@example.com.
+
+# Tenant ID to own all managed resources - like auto-created records etc.
+#managed_resource_tenant_id = 123456
+
+# What filters to use. They are applied in order listed in the option, from
+# left to right
+#scheduler_filters = default_pool
+
+#-----------------------
+# API Service
+#-----------------------
+[service:api]
+# Number of api worker processes to spawn
+#workers = None
+
+# Number of api greenthreads to spawn
+#threads = 1000
+
+# Enable host request headers
+#enable_host_header = False
+
+# The base uri used in responses
+#api_base_uri = 'http://127.0.0.1:9001/'
+api_base_uri = {{ server.api.base_uri }}
+
+# API bind host+port pairs, comma separated
+listen = {{ server.bind.api.address }}:9001
+
+# Maximum line size of message headers to be accepted. max_header_line may
+# need to be increased when using large tokens (typically those generated by
+# the Keystone v3 API with big service catalogs).
+#max_header_line = 16384
+
+# Authentication strategy to use - can be either "noauth" or "keystone"
+#auth_strategy = keystone
+auth_strategy = keystone
+
+# Enable Version 1 API (deprecated)
+#enable_api_v1 = True
+enable_api_v1 = True
+
+# Enabled API Version 1 extensions
+# Can be one or more of : diagnostics, quotas, reports, sync, touch
+#enabled_extensions_v1 =
+enabled_extensions_v1 = diagnostics, quotas, reports, sync, touch
+
+# Enable Version 2 API
+#enable_api_v2 = True
+enable_api_v2 = True
+
+# Enabled API Version 2 extensions
+#enabled_extensions_v2 =
+enabled_extensions_v2 = quotas, reports
+
+# Default per-page limit for the V2 API, a value of None means show all results
+# by default
+#default_limit_v2 = 20
+
+# Max page size in the V2 API
+#max_limit_v2 = 1000
+
+# Enable Admin API (experimental)
+enable_api_admin = {{ server.get('admin_api', {}).get('enabled', False) }}
+
+# Enabled Admin API extensions
+# Can be one or more of : reports, quotas, counts, tenants, target_sync
+# zone export is in zones extension
+{%- if server.get('admin_api', {}).get('enabled_extensions_admin', False) %}
+enabled_extensions_admin = {{ server.admin_api.enabled_extensions_admin }}
+{%- else %}
+#enabled_extensions_admin =
+{%- endif %}
+
+# Default per-page limit for the Admin API, a value of None means show all results
+# by default
+#default_limit_admin = 20
+
+# Max page size in the Admin API
+#max_limit_admin = 1000
+
+# Show the pecan HTML based debug interface (v2 only)
+# This is only useful for development, and WILL break python-designateclient
+# if an error occurs
+#pecan_debug = False
+
+#-----------------------
+# Keystone Middleware
+#-----------------------
+[keystone_authtoken]
+auth_host = {{ server.identity.host }}
+auth_port = 35357
+auth_protocol = {{ server.identity.get('protocol', 'http') }}
+admin_tenant_name = {{ server.identity.tenant }}
+admin_user = {{ server.identity.user }}
+admin_password = {{ server.identity.password }}
+{%- if server.identity.get('protocol', 'http') == 'https' %}
+cafile = {{ server.identity.get('cacert_file', server.cacert_file)  }}
+{%- endif %}
+#memcached_servers = localhost:11211
+#auth_type = password
+
+#-----------------------
+# CORS Middleware
+#-----------------------
+[cors]
+
+# Indicate whether this resource may be shared with the domain received in the
+# requests "origin" header. (list value)
+#allowed_origin = <None>
+
+# Indicate that the actual request can include user credentials (boolean value)
+#allow_credentials = true
+
+# Indicate which headers are safe to expose to the API. Defaults to HTTP Simple
+# Headers. (list value)
+#expose_headers = X-OpenStack-Request-ID,Host
+
+# Maximum cache age of CORS preflight requests. (integer value)
+#max_age = 3600
+
+# Indicate which methods can be used during the actual request. (list value)
+#allow_methods = GET,PUT,POST,DELETE,PATCH,HEAD
+
+# Indicate which header field names may be used during the actual request.
+# (list value)
+#allow_headers = X-Auth-Token,X-Auth-Sudo-Tenant-ID,X-Auth-Sudo-Project-ID,X-Auth-All-Projects,X-Designate-Edit-Managed-Records,OpenStack-DNS-Hide-Counts
+
+[cors.subdomain]
+
+# Indicate whether this resource may be shared with the domain received in the
+# requests "origin" header. (list value)
+#allowed_origin = <None>
+
+# Indicate that the actual request can include user credentials (boolean value)
+#allow_credentials = true
+
+# Indicate which headers are safe to expose to the API. Defaults to HTTP Simple
+# Headers. (list value)
+#expose_headers = X-OpenStack-Request-ID,Host
+
+# Maximum cache age of CORS preflight requests. (integer value)
+#max_age = 3600
+
+# Indicate which methods can be used during the actual request. (list value)
+#allow_methods = GET,PUT,POST,DELETE,PATCH,HEAD
+
+# Indicate which header field names may be used during the actual request.
+# (list value)
+#allow_headers = X-Auth-Token,X-Auth-Sudo-Tenant-ID,X-Auth-Sudo-Project-ID,X-Auth-All-Projects,X-Designate-Edit-Managed-Records,OpenStack-DNS-Hide-Counts
+
+#-----------------------
+# Sink Service
+#-----------------------
+[service:sink]
+# List of notification handlers to enable, configuration of these needs to
+# correspond to a [handler:my_driver] section below or else in the config
+# Can be one or more of : nova_fixed, neutron_floatingip
+#enabled_notification_handlers =
+enabled_notification_handlers = nova_fixed, neutron_floatingip
+
+#-----------------------
+# mDNS Service
+#-----------------------
+[service:mdns]
+# Number of mdns worker processes to spawn
+#workers = None
+
+# Number of mdns greenthreads to spawn
+#threads = 1000
+
+# mDNS bind host+port pairs, comma separated
+listen = {{ server.mdns.address }}:{{ server.mdns.port }}
+
+# mDNS TCP Backlog
+#tcp_backlog = 100
+
+# mDNS TCP Receive Timeout
+#tcp_recv_timeout = 0.5
+
+# Enforce all incoming queries (including AXFR) are TSIG signed
+#query_enforce_tsig = False
+
+# Send all traffic over TCP
+#all_tcp = False
+
+# Maximum message size to emit
+#max_message_size = 65535
+
+#-----------------------
+# Agent Service
+#-----------------------
+# The agent runs on the resolver hosts
+[service:agent]
+#workers = None
+#listen = 0.0.0.0:5358
+#tcp_backlog = 100
+#allow_notify = 127.0.0.1
+
+# MiniDNS IP address and port
+#masters = 127.0.0.1:5354
+
+# Set to "fake", "bind9" or "knot2"
+#backend_driver = fake
+
+#transfer_source = None
+#notify_delay = 0
+
+#-----------------------
+# Zone Manager Service
+#-----------------------
+[service:producer]
+# Number of Zone Manager worker processes to spawn
+#workers = None
+
+# Number of Zone Manager greenthreads to spawn
+#threads = 1000
+
+# List of Zone Manager tasks to enable, a value of None will enable all tasks.
+# Can be one or more of: periodic_exists
+#enabled_tasks = None
+
+# Whether to allow synchronous zone exports
+#export_synchronous = True
+
+#------------------------
+# Deleted domains purging
+#------------------------
+[producer_task:domain_purge]
+# How frequently to purge deleted domains, in seconds
+#interval = 3600  # 1h
+
+# How many records to be deleted on each run
+#batch_size = 100
+
+# How old deleted records should be (deleted_at) to be purged, in seconds
+#time_threshold = 604800  # 7 days
+
+#------------------------
+# Delayed zones NOTIFY
+#------------------------
+[producer_task:delayed_notify]
+# How frequently to scan for zones pending NOTIFY, in seconds
+#interval = 5
+
+#------------------------
+# Worker Periodic Recovery
+#------------------------
+[producer_task:worker_periodic_recovery]
+# How frequently to scan for zones pending NOTIFY, in seconds
+#interval = 120
+
+#-----------------------
+# Pool Manager Service
+#-----------------------
+[service:pool_manager]
+# Number of Pool Manager worker processes to spawn
+{%- if pool_manager.workers is defined %}
+workers = {{ pool_manager.workers }}
+{%- else %}
+#workers = None
+{%- endif %}
+
+# Number of Pool Manager greenthreads to spawn
+#threads = 1000
+
+# The ID of the pool managed by this instance of the Pool Manager
+{%- if pool_manager.pool_id is defined %}
+pool_id = {{ pool_manager.pool_id }}
+{%- else %}
+#pool_id = 794ccc2c-d751-44fe-b57f-8894c9f5c842
+{%- endif %}
+
+# The percentage of servers requiring a successful update for a domain change
+# to be considered active
+#threshold_percentage = 100
+
+# The time to wait for a response from a server
+#poll_timeout = 30
+
+# The time between retrying to send a request and waiting for a response from a
+# server
+#poll_retry_interval = 15
+
+# The maximum number of times to retry sending a request and wait for a
+# response from a server
+#poll_max_retries = 10
+
+# The time to wait before sending the first request to a server
+#poll_delay = 5
+
+# Enable the recovery thread
+#enable_recovery_timer = True
+
+# The time between recovering from failures
+#periodic_recovery_interval = 120
+
+# Enable the sync thread
+enable_sync_timer = {{ pool_manager.get('enable_sync_timer', 'True') }}
+
+# The time between synchronizing the servers with storage
+periodic_sync_interval = {{ pool_manager.get('periodic_sync_interval', '1800') }}
+
+# Zones Updated within last N seconds will be syncd. Use None to sync all zones
+periodic_sync_seconds = {{ pool_manager.get('periodic_sync_seconds', '') }}
+
+# Perform multiple update attempts during periodic_sync
+periodic_sync_max_attempts = {{ pool_manager.get('periodic_sync_max_attempts', '3') }}
+periodic_sync_retry_interval = {{ pool_manager.get('periodic_sync_retry_interval', '30') }}
+
+# The cache driver to use
+#cache_driver = memcache
+
+
+#-----------------------
+# Worker Service
+#-----------------------
+[service:worker]
+{# TODO: remove enabled option when https://bugs.launchpad.net/designate/+bug/1676827 is fixed #}
+# Whether to send events to worker instead of Pool Manager
+{%- if pool_manager.enabled is defined and pool_manager.enabled == true %}
+enabled = False
+{%- else %}
+enabled = True
+{%- endif %}
+
+# Number of Worker processes to spawn
+#workers = None
+
+# Number of Worker greenthreads to spawn
+#threads = 1000
+
+# The percentage of servers requiring a successful update for a zone change
+# to be considered active
+#threshold_percentage = 100
+
+# The time to wait for a response from a server
+#poll_timeout = 30
+
+# The time between retrying to send a request and waiting for a response from a
+# server
+#poll_retry_interval = 15
+
+# The maximum number of times to retry sending a request and wait for a
+# response from a server
+#poll_max_retries = 10
+
+# The time to wait before sending the first request to a server
+#poll_delay = 5
+
+# Whether to allow worker to send NOTIFYs. NOTIFY requests to mdns will noop
+# notify = False
+
+###################################
+## Pool Manager Cache Configuration
+###################################
+#-----------------------
+# SQLAlchemy Pool Manager Cache
+#-----------------------
+[pool_manager_cache:sqlalchemy]
+#connection = sqlite:///$state_path/designate_pool_manager.sqlite
+connection = {{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name.pool_manager }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', server.cacert_file) }}{% endif %}
+
+#connection_debug = 100
+#connection_trace = False
+#sqlite_synchronous = True
+#idle_timeout = 3600
+#max_retries = 10
+#retry_interval = 10
+
+#-----------------------
+# Memcache Pool Manager Cache
+#-----------------------
+[pool_manager_cache:memcache]
+#memcached_servers = None
+#expiration = 3600
+
+##############
+## Network API
+##############
+[network_api:neutron]
+# Comma separated list of values, formatted "<name>|<neutron_uri>"
+#endpoints = RegionOne|http://localhost:9696
+#endpoint_type = publicURL
+#timeout = 30
+#admin_username = designate
+#admin_password = designate
+#admin_tenant_name = designate
+#auth_url = http://localhost:35357/v2.0
+#insecure = False
+#auth_strategy = keystone
+#ca_certificates_file =
+
+########################
+## Storage Configuration
+########################
+#-----------------------
+# SQLAlchemy Storage
+#-----------------------
+[storage:sqlalchemy]
+# Database connection string - to configure options for a given implementation
+# like sqlalchemy or other see below
+#connection = sqlite:///$state_path/designate.sqlite
+connection = {{ server.database.engine }}://{{ server.database.user }}:{{ server.database.password }}@{{ server.database.host }}/{{ server.database.name.main_database }}{%- if server.database.get('ssl',{}).get('enabled',False) %}?ssl_ca={{ server.database.ssl.get('cacert_file', server.cacert_file) }}{% endif %}
+
+#connection_debug = 0
+#connection_trace = False
+#sqlite_synchronous = True
+#idle_timeout = 3600
+#max_retries = 10
+#retry_interval = 10
+
+########################
+## Handler Configuration
+########################
+#-----------------------
+# Nova Fixed Handler
+#-----------------------
+[handler:nova_fixed]
+# Zone ID of zone to create records in. Should be pre-created
+zone_id = {{ server.domain_id }}
+notification_topics = notifications
+control_exchange = 'nova'
+formatv4 = '%(hostname)s.%(zone)s'
+formatv6 = '%(hostname)s.%(zone)s'
+
+#------------------------
+# Neutron Floating Handler
+#------------------------
+[handler:neutron_floatingip]
+# Zone ID of zone to create records in. Should be pre-created
+zone_id = {{ server.domain_id }}
+notification_topics = notifications
+control_exchange = 'neutron'
+formatv4 = '%(hostname)s.%(zone)s'
+formatv6 = '%(hostname)s.%(zone)s'
+
+##############################
+## Agent Backend Configuration
+##############################
+
+# Set backend_driver in the [service:agent] section
+
+[backend:agent:bind9]
+#rndc_host = 127.0.0.1
+#rndc_port = 953
+#rndc_config_file = /etc/rndc.conf
+#rndc_key_file = /etc/rndc.key
+#zone_file_path = $state_path/zones
+#query_destination = 127.0.0.1
+
+[backend:agent:knot2]
+# knotc command name when rootwrap is used. Location of the knotc executable
+# on the resolver host if rootwrap is not used
+#knotc_cmd_name = /usr/sbin/knotc
+#
+[backend:agent:djbdns]
+# Command names when rootwrap is used or location of the executables
+# on the resolver host when rootwrap is not used
+# tcpclient_cmd_name =
+# axfr_get_cmd_name =
+# tinydns_data_cmd_name =
+# tinydns_datadir =
+#query_destination = 127.0.0.1
+
+[backend:agent:denominator]
+#name = dynect
+#config_file = /etc/denominator.conf
+
+[backend:agent:gdnsd]
+#gdnsd_cmd_name = gdnsd
+#confdir_path = /etc/gdnsd
+#query_destination = 127.0.0.1
+
+[backend:agent:msdns]
+#query_destination = 127.0.0.1
+
+########################
+## Library Configuration
+########################
+[oslo_concurrency]
+# Path for Oslo Concurrency to store lock files, defaults to the value
+# of the state_path setting.
+#lock_path = $state_path
+
+########################
+## Coordination
+########################
+[coordination]
+# URL for the coordination backend to use.
+#backend_url = kazoo://127.0.0.1/
+
+########################
+## Hook Points
+########################
+# Hook Points are enabled when added to the config and there has been
+# a package that provides the corresponding named designate.hook_point
+# entry point.
+
+# [hook_point:name_of_hook_point]
+# some_param_for_hook = 42
+# Hooks can be disabled in the config
+# enabled = False
+
+# Hook can also be applied to the import path when the hook has not
+# been given an explicit name. The name is created from the hook
+# target function / method:
+#
+#   name = '%s.%s' % (func.__module__, func.__name__)
+
+# [hook_point:designate.api.v2.controllers.zones.get_one]
+
+##################
+## Monasca Statsd
+##################
+[monasca:statsd]
+# Disabled by default
+# enabled = False
+# Statsd server hostname
+# hostname = 127.0.0.1
+# Statsd server UDP port
+# port = 8125
diff --git a/designate/files/pike/pools.yaml b/designate/files/pike/pools.yaml
new file mode 100644
index 0000000..c911e9a
--- /dev/null
+++ b/designate/files/pike/pools.yaml
@@ -0,0 +1,73 @@
+{%- from "designate/map.jinja" import server with context %}
+{% for pool_name, pool in server.pools.iteritems() -%}
+- name: {{ pool_name }}
+  # 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: {{ pool.description }}
+
+  {%- if pool.attributes is defined %}
+  # Attributes are Key:Value pairs that describe the pool. for example the level
+  # of service (i.e. service_tier:GOLD), capabilities (i.e. anycast: true) or
+  # other metadata. Users can use this information to point their zones to the
+  # correct pool
+  attributes:
+    {%- for k,v in pool.attributes.items() %}
+    {{ k }}: {{ v }}
+    {%- endfor %}
+  {%- endif %}
+
+  # List out the NS records for zones hosted within this pool
+  ns_records:
+    {% for rec in pool.ns_records -%}
+    - hostname: {{ rec.hostname }}
+      priority: {{ rec.priority }}
+    {% endfor -%}
+
+  # List out the nameservers for this pool. These are the actual DNS servers.
+  # We use these to verify changes have propagated to all nameservers.
+  nameservers:
+    {% for nameserver in pool.nameservers -%}
+    - host: {{ nameserver.host }}
+      port: {{ nameserver.port }}
+    {% endfor -%}
+
+  # List out the targets for this pool. For DNS there will be one
+  # entry for each DNS server, as we have to run rndc command on each server
+  targets:
+    {% for target_name, target in pool.targets.iteritems() -%}
+    - type: {{ target.type }}
+      description: {{ target.description }}
+
+      # List out the designate-mdns servers from which DNS servers should
+      # request zone transfers (AXFRs) from.
+      masters:
+        {% for master in target.masters -%}
+        - host: {{ master.host }}
+          port: {{ master.port }}
+        {% endfor -%}
+
+      # DNS server Configuration options
+      options:
+        host: {{ target.options.host }}
+        port: {{ target.options.port }}
+        {%- if target.type == 'bind9' %}
+        rndc_host: {{ target.options.rndc_host }}
+        rndc_port: {{ target.options.rndc_port }}
+        rndc_key_file: {{ target.options.rndc_key_file }}
+        {%- elif target.type == 'pdns4' %}
+        api_endpoint: {{ target.options.api_endpoint }}
+        api_token: {{ target.options.api_token }}
+        {%- endif %}
+    {% endfor -%}
+
+  {%- if pool.also_notifies is defined %}
+  # Optional list of additional IP/Port's for which designate-mdns will send
+  # DNS NOTIFY packets to
+  also_notifies:
+    {%- for notify in pool.also_notifies %}
+    - host: {{ notify.host }}
+      port: {{ notify.port }}
+    {%- endfor %}
+  {%- endif %}
+{%- endfor %}