Initial commit
Change-Id: I82738f63c49d10385183c6e626239cd15618d58b
diff --git "a/\173\173 cookiecutter._env_name \175\175/features/designate/database.yml" "b/\173\173 cookiecutter._env_name \175\175/features/designate/database.yml"
new file mode 100644
index 0000000..e1e12d7
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/features/designate/database.yml"
@@ -0,0 +1,3 @@
+classes:
+- system.galera.server.database.designate
+- environment.{{ cookiecutter._env_name }}.features.designate
diff --git "a/\173\173 cookiecutter._env_name \175\175/features/designate/init.yml" "b/\173\173 cookiecutter._env_name \175\175/features/designate/init.yml"
new file mode 100644
index 0000000..33f4259
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/features/designate/init.yml"
@@ -0,0 +1,38 @@
+{%- macro password(size=16) -%}
+{% for index in range(size) %}{{ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'|random }}{% endfor %}
+{%- endmacro -%}
+parameters:
+ _param:
+ # Put overrides for any environment-specific variables here
+ powerdns_webserver_password: {{ password(12) }}
+ powerdns_webserver_port: 8081
+ designate_domain_id: 5186883b-91fb-4891-bd49-e6769234a8fc
+ designate_pdns_api_key: {{ password(12) }}
+ designate_pdns_api_endpoint: "http://${_param:openstack_control_node01_address}:${_param:powerdns_webserver_port}"
+ designate_pool_ns_records:
+ - hostname: 'ns1.example.org.'
+ priority: 10
+ designate_pool_nameservers:
+ - host: ${_param:openstack_control_node01_address}
+ port: 53
+ - host: ${_param:openstack_control_node02_address}
+ port: 53
+ - host: ${_param:openstack_control_node03_address}
+ port: 53
+ designate_pool_target_type: pdns4
+ designate_pool_target_masters:
+ - host: ${_param:openstack_control_node01_address}
+ port: 5354
+ - host: ${_param:openstack_control_node02_address}
+ port: 5354
+ - host: ${_param:openstack_control_node03_address}
+ port: 5354
+ designate_pool_target_options:
+ host: ${_param:openstack_control_node01_address}
+ port: 53
+ api_token: ${_param:designate_pdns_api_key}
+ api_endpoint: ${_param:designate_pdns_api_endpoint}
+ designate_version: ${_param:openstack_version}
+ designate_service_host: ${_param:openstack_control_address}
+ mysql_designate_password: {{ password(16) }}
+ keystone_designate_password: {{ password(16) }}
diff --git "a/\173\173 cookiecutter._env_name \175\175/features/designate/keystone.yml" "b/\173\173 cookiecutter._env_name \175\175/features/designate/keystone.yml"
new file mode 100644
index 0000000..4726bf6
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/features/designate/keystone.yml"
@@ -0,0 +1,3 @@
+classes:
+- system.keystone.client.service.designate
+- environment.{{ cookiecutter._env_name }}.features.designate
diff --git "a/\173\173 cookiecutter._env_name \175\175/features/designate/system.yml" "b/\173\173 cookiecutter._env_name \175\175/features/designate/system.yml"
new file mode 100644
index 0000000..3fa26a6
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/features/designate/system.yml"
@@ -0,0 +1,38 @@
+classes:
+- system.designate.server.cluster
+- system.designate.server.backend.pdns
+- environment.{{ cookiecutter._env_name }}.features.designate
+parameters:
+ powerdns:
+ server:
+ axfr_ips:
+ - ${_param:openstack_control_node01_address}
+ - ${_param:openstack_control_node02_address}
+ - ${_param:openstack_control_node03_address}
+ - 127.0.0.1
+ designate:
+ server:
+ pools:
+ default:
+ description: 'test pool'
+ targets:
+ default:
+ description: 'test target1'
+ default1:
+ type: ${_param:designate_pool_target_type}
+ description: 'test target2'
+ masters: ${_param:designate_pool_target_masters}
+ options:
+ host: ${_param:openstack_control_node02_address}
+ port: 53
+ api_endpoint: "http://${_param:openstack_control_node02_address}:${_param:powerdns_webserver_port}"
+ api_token: ${_param:designate_pdns_api_key}
+ default2:
+ type: ${_param:designate_pool_target_type}
+ description: 'test target3'
+ masters: ${_param:designate_pool_target_masters}
+ options:
+ host: ${_param:openstack_control_node03_address}
+ port: 53
+ api_endpoint: "http://${_param:openstack_control_node03_address}:${_param:powerdns_webserver_port}"
+ api_token: ${_param:designate_pdns_api_key}
diff --git "a/\173\173 cookiecutter._env_name \175\175/init.yml" "b/\173\173 cookiecutter._env_name \175\175/init.yml"
new file mode 100644
index 0000000..89db66f
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/init.yml"
@@ -0,0 +1,55 @@
+{# 'infra_config_classes' list object is dynamically generated from 'roles' to add on the cfg node #}
+{%- set infra_config_classes = [] %}
+{# 'global_metadata' is a global collection of objects shared between nodes #}
+{%- set global_metadata = {} %}
+{%- set common_roles = ['_linux_network_interface', '_metadata_process', '_overrides'] %}
+
+parameters:
+ _param:
+ _esc: $
+ reclass:
+ storage:
+ node:
+ {%- for inventory_node_name, node in nodes.items()|sort %}
+ {%- set node_name = inventory_node_name.split('.')[0] %}
+ {{ node['reclass_storage_name'] }}:
+
+ {#- 'local_metadata' is to collect the data from different roles in a single place inside the node #}
+ {%- set local_metadata = {} %}
+ {#- 'params' dict object is dynamically generated from 'roles' to add on the node #}
+ {%- set params = {} %}
+
+ {%- macro register_metaparam(param_name, role_name) %}
+ {#- Add the <role_name> into the list attached to <param_name> #}
+ {#- to control that the <param_name> is not spreaded across incompatible roles #}
+ {%- set _ = local_metadata.update({param_name: local_metadata.get(param_name, []) + [role_name]}) %}
+ {%- endmacro %}
+
+ {%- macro set_param(param_name, param_value) %}
+ {#- Set a parameter for '_param' dict for the node #}
+ {%- set _ = params.update({param_name: param_value}) %}
+ {%- endmacro %}
+
+ classes:
+ {#- Default roles are added to each node #}
+ {#- 'overrides' must be the very last role for each node #}
+ {%- for role in node.get('roles', []) + common_roles %}
+ {%- include ("{# roles #}/" + role) %}
+ {%- endfor %}
+
+ {%- if params %}
+ params:
+ {%- for param_name, param in params.items() %}
+ {{ param_name }}: {{ param }}
+ {%- endfor %}
+ {%- endif %}
+ name: {{ node_name }}
+ domain: ${_param:cluster_domain}
+ {%- endfor %}
+
+classes:
+# Enable root and *ALL* users access
+- system.openssh.server.team.all
+{%- for infra_config_class in infra_config_classes %}
+- {{ infra_config_class }}
+{%- endfor %}
diff --git "a/\173\173 cookiecutter._env_name \175\175/linux_network_interface.yml" "b/\173\173 cookiecutter._env_name \175\175/linux_network_interface.yml"
new file mode 100644
index 0000000..8474d17
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/linux_network_interface.yml"
@@ -0,0 +1,6 @@
+parameters:
+ # _param:
+ # Put overrides for any environment-specific variables here
+ linux:
+ network:
+ interface: ${_param:linux_network_interfaces}
diff --git "a/\173\173 cookiecutter._env_name \175\175/overrides.yml" "b/\173\173 cookiecutter._env_name \175\175/overrides.yml"
new file mode 100644
index 0000000..f35b469
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/overrides.yml"
@@ -0,0 +1,20 @@
+# Do not delete! This file is for global parameters overrides over all the nodes in the environment.
+classes:
+# Enable root and *ALL* users access
+- system.openssh.server.team.all
+
+# Example: salt-call reclass.cluster_meta_set foo bar /path/to/overrides.yml
+#parameters:
+# _param:
+# foo: bar
+parameters:
+ _param:
+ apt_mk_version: stable # This will be replaced with REPOSITORY_SUITE env variable
+ openssh:
+ server:
+ password_auth: true
+ linux:
+ system:
+ user:
+ root:
+ password: $6$oV7iKxfx$7DOZUfLw30d/W.pzUf97F0z1JhxgNmFAiKT1HhIodjkWb0M/.dTYAc3uxDCScR3lvCALjRe4/xWtiDyywf8wi1
diff --git "a/\173\173 cookiecutter._env_name \175\175/reclass_datasource_local.yml" "b/\173\173 cookiecutter._env_name \175\175/reclass_datasource_local.yml"
new file mode 100644
index 0000000..1c334f7
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/reclass_datasource_local.yml"
@@ -0,0 +1,7 @@
+# Switch to the local metadata storage instead of git
+parameters:
+# local storage
+ reclass:
+ storage:
+ data_source:
+ engine: local
diff --git "a/\173\173 cookiecutter._env_name \175\175/\173\043 interfaces \043\175" "b/\173\173 cookiecutter._env_name \175\175/\173\043 interfaces \043\175"
new file mode 120000
index 0000000..c95e61c
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/\173\043 interfaces \043\175"
@@ -0,0 +1 @@
+../{# interfaces #}
\ No newline at end of file
diff --git "a/\173\173 cookiecutter._env_name \175\175/\173\043 roles \043\175" "b/\173\173 cookiecutter._env_name \175\175/\173\043 roles \043\175"
new file mode 120000
index 0000000..c52ceb2
--- /dev/null
+++ "b/\173\173 cookiecutter._env_name \175\175/\173\043 roles \043\175"
@@ -0,0 +1 @@
+../{# roles #}
\ No newline at end of file