Initial commit
Change-Id: I82738f63c49d10385183c6e626239cd15618d58b
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea68183
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,64 @@
+*.py[cod]
+
+# C extensions
+*.so
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+include
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+lib
+local
+lib64
+MANIFEST
+TAGS
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+nosetests.xml
+
+# Translations
+*.mo
+
+# Mr Developer
+.mr.developer.cfg
+.cache
+.project
+.pydevproject
+.idea
+
+# Local example
+example_local.py
+
+# Local settings
+local_settings.py
+
+# Documentation
+doc/_build/
+
+# Logs
+/logs
+tests.log
+
+# Certs
+/ca.crt
+/ca.pem
+
+# Cache
+/.cache
+
+# Snapshot configs
+config_test_*.ini
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..39226eb
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=review.gerrithub.io
+port=29418
+project=Mirantis/environment-template.git
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0258f0e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,129 @@
+# environment-template
+
+Contribute
+----------
+
+Please send patches using gerrithub.io:
+
+```
+git remote add gerrit ssh://review.gerrithub.io:29418/dis-xcom/environment-template.git
+git review
+```
+
+Render the template
+-------------------
+
+Use reclass_tools from [1] to render the template:
+
+```
+virtualenv venv-reclass
+. venv-reclass/bin/activate
+pip install git+http://github.com/dis-xcom/reclass-tools
+```
+
+<env_name> : any name for newly created environment model
+<path_to_template> : path to the directory with the cookiecutter template, for example 'tcp-qa/tcp_tests/environment/environment_template'
+<destination_path> : path to directory where will be created the new environment model
+<inventory_fileN> : path to the YAML with the inventory data. Can be specified multiple times to use different parts of the inventory. VCP inventory must be specified for current workflow (when all linux.network.interface are deleted)
+
+
+```
+reclass-tools render -e <env_name> -t <path_to_template> -o <destination_path> -c <inventory_file1> -c <inventory_file2> [...] -c <inventory_fileN>
+```
+
+To attach the environment model to any cluster, use the instructions from [1]
+
+[1] https://github.com/dis-xcom/reclass_tools
+
+
+Template architecture
+---------------------
+
+```
+└── environment_template
+ ├── {{ cookiecutter._env_name }}
+ │ ├── init.yml
+ │ ├── linux_network_interface.yml
+ │ ├── linux_system_codename_trusty.yml
+ │ ├── linux_system_codename_xenial.yml
+ │ ├── {# interfaces #} -> ../{# interfaces #}
+ │ └── {# roles #} -> ../{# roles #}
+ ├── {# interfaces #}
+ │ └── ...
+ └── {# roles #}
+ └── ...
+```
+
+* {{ cookiecutter._env_name }} : folder that will be used to generate the new Environment model, contains:
+
+ - init.yml : file that will be filled with reclass:storage:node pillars generated using inventory files. This is the main file that must be
+ included to cfg01.* node before generating the reclass inventory with the salt state 'reclass.storage'.
+
+ - linux_network_interface.yml : it is a workaround to make possible to pass the linux:network:interface configuration separatelly for each node.
+ This is because reclass.storage state works only with parameters:_param:* pillars and cannot be used
+ to add any other pillar data to parameters:* (for example, parameters:linux:network:interface).
+ So, linux network interface configuration is stored in the intermediate variable parameters:_param:linux_network_interfaces
+ for each node, and then included to the parameters:linux:network:interface using this file as a class attached
+ to each node by default.
+ - linux_system_codename_*.yml : A class with a single variable. Allows to specify the specific linux version using only node role.
+
+ - {# interfaces #} : symlink to the {# interfaces #} folder outside of the cookiecutter template directory, to not pass it's content to the
+ resulting model during the model rendering.
+
+ - {# roles #} : symlink to the {# roles #} folder outside of the cookiecutter template directory, to not pass it's content to the
+ resulting model during the model rendering.
+
+* {# interfaces #} : Interface role means the name of the file that will be included and rendered.
+ Contains *text* patterns of YAML file that are included to the init.yml under linux_network_interface: parameters
+ using Jinja.
+ Each pattern provides the mapping of the physical interfaces which have the same role on some logical networking objects
+ (OVS, bonds, bridges, ...). These networking objects provide the Underlay interfaces used for upcoming cluster architecture.
+
+* {# roles #} : Node roles mean the name of the files that will be included and rendered under the 'classes:' object.
+ Contains *text* patterns of YAML file that are included to the init.yml and must provide only the
+ list of the classes for the specific node.
+
+In the init.yml is defined a dict variable 'params' that is accessible from files in {# interfaces #} and {# roles #}.
+'params' may be used by Jinja expressions in these folders to generate some additional dynamic 'parameters:_param' pillars that cannot be specified
+as a fixed value in a class.
+
+If you need to specify a fixed values, please do the following:
+- add a new class file *.yml file next to the init.yml with the necessary *FIXED* parameters (example: linux_system_codename_xenial.yml)
+- add a node role to the {# roles #} directory that will include your environment.{{ cookiecutter._env_name }}.<class file from first step>
+- use the created node role in the inventory for required nodes
+
+
+Inventory examples
+------------------
+
+Inventory must include all the nodes, physical or virtual.
+'reclass_storage_name' is used for back compatibility until some parameters
+are still inherited from the cluster/system level of the reclass:storage pillars.
+
+Physical node example:
+```
+nodes:
+ kvm01.mcp11-ovs-dpdk.local:
+ reclass_storage_name: infra_kvm_node01
+ roles:
+ - infra_kvm
+ - linux_system_codename_xenial
+ interfaces:
+ enp3s0f0:
+ role: single_mgm
+ enp3s0f1:
+ role: bond0_ab_nondvr_vxlan_ctl_mesh
+```
+
+Virtual Control Plane node example:
+```
+nodes:
+ ctl01.mcp11-ovs-dpdk.local:
+ reclass_storage_name: openstack_control_node01
+ roles:
+ - openstack_control_leader
+ - linux_system_codename_xenial
+ interfaces:
+ ens3:
+ role: single_ctl
+```
diff --git "a/\173\043 interfaces \043\175/bond0_ab_contrail" "b/\173\043 interfaces \043\175/bond0_ab_contrail"
new file mode 100644
index 0000000..8de76d6
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_contrail"
@@ -0,0 +1,63 @@
+{#- Provides: #}
+{#- br_mesh (linux bridge) + tenant address #}
+{#- vhost0 , as a keepalived vip interface #}
+{#- Requirements: #}
+{#- _param:tenant_vlan #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+{#- _param:tenant_network_gateway #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ mtu: 9000
+ enabled: true
+ mode: active-backup
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+
+ {{- set_param('keepalived_vip_interface', 'vhost0') }}
+ vhost0:
+ mtu: 9000
+ address: ${_param:_esc}{_param:tenant_address}
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ gateway: ${_param:_esc}{_param:tenant_network_gateway}
+ enabled: true
+ proto: static
+ type: eth
+ pre_up_cmds:
+ - /usr/lib/contrail/if-vhost0
+ name_servers:
+ - ${_param:_esc}{_param:dns_server01}
+ - ${_param:_esc}{_param:dns_server02}
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ mtu: 9000
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ctl_contrail" "b/\173\043 interfaces \043\175/bond0_ab_ctl_contrail"
new file mode 100644
index 0000000..dfee7cd
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_ctl_contrail"
@@ -0,0 +1,88 @@
+{#- Provides: #}
+{#- br_ctl (linux bridge) + control address #}
+{#- vhost0 #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_vlan #}
+{#- _param:control_network_netmask #}
+{#- _param:tenant_vlan #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+{#- _param:tenant_network_gateway #}
+{#- _param:_param:dns_server01 #}
+{#- _param:_param:dns_server02 #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ mtu: 9000
+ enabled: true
+ mode: active-backup
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ bond0.control_vlan:
+ mtu: 9000
+ name: bond0.${_param:_esc}{_param:control_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+
+ vhost0:
+ mtu: 9000
+ address: ${_param:_esc}{_param:tenant_address}
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ gateway: ${_param:_esc}{_param:tenant_network_gateway}
+ enabled: true
+ proto: static
+ type: eth
+ pre_up_cmds:
+ - /usr/lib/contrail/if-vhost0
+ name_servers:
+ - ${_param:_esc}{_param:dns_server01}
+ - ${_param:_esc}{_param:dns_server02}
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ mtu: 9000
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git "a/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating" "b/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating"
new file mode 100644
index 0000000..a4f891d
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_dvr_vlan_ctl_prv_floating"
@@ -0,0 +1,65 @@
+{#- Tenant over VLAN. For gateway nodes and computes with dvr #}
+{#- Provides: #}
+{#- br_ctl (OVS bridge) + control address #}
+{#- br_prv (OVS bridge) #}
+{#- br_floating (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond0 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-floating
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-floating:
+ enabled: true
+ type: ovs_bridge
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ bridge: br-floating
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ ovs_options: tag=${_param:_esc}{_param:control_vlan}
+ proto: static
+ type: ovs_port
+ require_interfaces:
+ - br-floating
+ br-prv:
+ enabled: true
+ type: ovs_bridge
+ floating-to-prv:
+ enabled: true
+ type: ovs_port
+ port_type: patch
+ bridge: br-floating
+ peer: prv-to-floating
+ prv-to-floating:
+ enabled: true
+ type: ovs_port
+ port_type: patch
+ bridge: br-prv
+ peer: floating-to-prv
diff --git "a/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating" "b/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating"
new file mode 100644
index 0000000..265aba8
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_dvr_vxlan_ctl_mesh_floating"
@@ -0,0 +1,63 @@
+{#- Tenant over VXLAN. For gateway nodes and computes with dvr #}
+{#- Provides: #}
+{#- br_ctl (OVS bridge) + control address #}
+{#- br_mesh (OVS bridge) + tenant address #}
+{#- br_floating (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+{#- _param:tenant_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond0 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-floating
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-floating:
+ enabled: true
+ type: ovs_bridge
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ bridge: br-floating
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ ovs_options: tag=${_param:_esc}{_param:control_vlan}
+ proto: static
+ type: ovs_port
+ require_interfaces:
+ - br-floating
+ br-mesh:
+ enabled: true
+ type: ovs_port
+ bridge: br-floating
+ proto: static
+ ovs_options: tag=${_param:_esc}{_param:tenant_vlan}
+ address: ${_param:_esc}{_param:tenant_address}
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ require_interfaces:
+ - br-floating
diff --git "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv" "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv"
new file mode 100644
index 0000000..53cdb09
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vlan_ctl_prv"
@@ -0,0 +1,49 @@
+{#- Tenant over VLAN. For computes without dvr #}
+{#- Provides: #}
+{#- br_ctl (OVS bridge) + control address #}
+{#- br_prv (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond0 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-prv
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-prv:
+ enabled: true
+ type: ovs_bridge
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ bridge: br-prv
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ ovs_options: tag=${_param:_esc}{_param:control_vlan}
+ proto: static
+ type: ovs_port
+ require_interfaces:
+ - br-prv
diff --git "a/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh" "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh"
new file mode 100644
index 0000000..42dbfca
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_nondvr_vxlan_ctl_mesh"
@@ -0,0 +1,76 @@
+{#- Tenant over VXLAN. For computes without dvr #}
+{#- Provides: #}
+{#- br_ctl (linux bridge) + control address #}
+{#- br_mesh (linux bridge) + tenant address #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+{#- _param:tenant_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ bond0.control_vlan:
+ name: bond0.${_param:_esc}{_param:control_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
+
+ br_mesh:
+ address: ${_param:_esc}{_param:tenant_address}
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ enabled: true
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:tenant_vlan}
+ bond0.tenant_vlan:
+ name: bond0.${_param:_esc}{_param:tenant_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl"
new file mode 100644
index 0000000..d6bbd72
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl"
@@ -0,0 +1,53 @@
+{#- Control network with bond. For control plane nodes #}
+{#- Provides: #}
+{#- br_ctl (linux bridge) + control address #}
+{#- _param:keepalived_vip_interface = 'br_ctl' #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ require_interfaces:
+ - bond0.${_param:_esc}{_param:control_vlan}
+ bond0.control_vlan:
+ name: bond0.${_param:_esc}{_param:control_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - bond0
+ require_interfaces:
+ - bond0
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv"
new file mode 100644
index 0000000..3cba8de
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vlan_ctl_prv"
@@ -0,0 +1,49 @@
+{#- Tenant over VLAN. For gateway and compute nodes #}
+{#- Provides: #}
+{#- br_ctl (OVS bridge) + control address #}
+{#- br_prv (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond0 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-prv
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-prv:
+ enabled: true
+ type: ovs_bridge
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ bridge: br-prv
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ ovs_options: tag=${_param:_esc}{_param:control_vlan}
+ proto: static
+ type: ovs_port
+ require_interfaces:
+ - br-prv
diff --git "a/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh" "b/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh"
new file mode 100644
index 0000000..2aea73d
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond0_ab_ovs_vxlan_ctl_mesh"
@@ -0,0 +1,62 @@
+{#- Tenant over VXLAN. For gateway and compute nodes #}
+{#- Provides: #}
+{#- br_ctl (OVS bridge) + control address #}
+{#- br_mesh (OVS bridge) + tenant address #}
+{#- Requirements: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+{#- _param:tenant_vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond0 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond0:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-ten
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-ten:
+ enabled: true
+ type: ovs_bridge
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ bridge: br-ten
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ ovs_options: tag=${_param:_esc}{_param:control_vlan}
+ proto: static
+ type: ovs_port
+ require_interfaces:
+ - br-ten
+ br-mesh:
+ enabled: true
+ type: ovs_port
+ bridge: br-ten
+ proto: static
+ ovs_options: tag=${_param:_esc}{_param:tenant_vlan}
+ address: ${_param:_esc}{_param:tenant_address}
+ netmask: ${_param:_esc}{_param:tenant_network_netmask}
+ require_interfaces:
+ - br-ten
diff --git "a/\173\043 interfaces \043\175/bond1_ab_ovs_floating" "b/\173\043 interfaces \043\175/bond1_ab_ovs_floating"
new file mode 100644
index 0000000..9df5f46
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond1_ab_ovs_floating"
@@ -0,0 +1,38 @@
+{#- Floating on a separated bond interfaces. For gateway nodes and computes with dvr #}
+{#- Provides: #}
+{#- br_floating (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:?addr #}
+{#- _param:?mask #}
+{#- _param:?vlan #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ mtu: 9000
+ enabled: true
+ master: bond1 # ?
+ name: {{ interface_name }}
+ proto: manual
+ type: slave # ?
+ ipflush_onchange: true
+ {%- endfor %}
+ bond1:
+ enabled: true
+ mode: active-backup
+ ovs_bridge: br-floating
+ ovs_type: OVSPort
+ proto: manual
+ slaves: {{ ' '.join(interfaces.keys()) }}
+ type: bond
+ use_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ require_interfaces:
+ {%- for interface_name in interfaces.keys() %}
+ - {{ interface_name }}
+ {%- endfor %}
+ br-floating:
+ enabled: true
+ type: ovs_bridge
diff --git "a/\173\043 interfaces \043\175/bond2_dpdk_prv" "b/\173\043 interfaces \043\175/bond2_dpdk_prv"
new file mode 100644
index 0000000..39bc013
--- /dev/null
+++ "b/\173\043 interfaces \043\175/bond2_dpdk_prv"
@@ -0,0 +1,27 @@
+{#- Provides: #}
+{#- br-prv (OVS bridge) #}
+{#- Requirements: #}
+{#- _param:tenant_address #}
+{#- _param:tenant_netmask #}
+
+ # {{ interfaces_role }}
+ {%- for interface_name, interface in interfaces.items() %}
+ {{ interface_name }}:
+ bond: bonddpdk2
+ driver: igb_uio
+ enabled: true
+ n_rxq: 2
+ name: {{ interface_name }}
+ pci: '{{ interface['dpdk_pci'] }}'
+ type: dpdk_ovs_port
+ {%- endfor %}
+ bonddpdk2:
+ bridge: br-prv
+ enabled: true
+ mode: active-backup
+ type: dpdk_ovs_bond
+ br-prv:
+ address: ${_param:_esc}{_param:tenant_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:tenant_netmask}
+ type: dpdk_ovs_bridge
diff --git "a/\173\043 interfaces \043\175/readme.txt" "b/\173\043 interfaces \043\175/readme.txt"
new file mode 100644
index 0000000..cf80b5b
--- /dev/null
+++ "b/\173\043 interfaces \043\175/readme.txt"
@@ -0,0 +1,10 @@
+Patterns from this folder are used for two purposes:
+1. Configure the real node interfaces as specified in the inventory.
+2. Provide the following list of interfaces for the underlay level:
+ - br_mgm: Access from infrastructure management network / admin network / DHCP / PXE
+ - br_ctl: OpenStack control network for internal services
+ - br-prv: For tenant networks with VLAN segmentation
+ - br-ten: For tenant networks with VXLAN segmentation
+ - br-mesh: Endpoint for VXLAN tunnels that are used by br-ten
+ - br-floating: Connection to the floating network
+ - vhost0: for OpenContrail workloads
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_ctl" "b/\173\043 interfaces \043\175/single_ctl"
new file mode 100644
index 0000000..ce54ed7
--- /dev/null
+++ "b/\173\043 interfaces \043\175/single_ctl"
@@ -0,0 +1,31 @@
+{#- Control network. For control plane nodes #}
+{#- Provides: #}
+{#- br_ctl (linux bridge) + address #}
+{#- _param:keepalived_vip_interface = 'br_ctl' #}
+{#- Requires: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:dns_server01 #}
+{#- _param:dns_server02 #}
+
+ # {{ interfaces_role }}
+ {%- set interface_name = interfaces.keys()[0] %}
+ {{ interface_name }}:
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ br_ctl:
+ address: ${_param:_esc}{_param:single_address}
+ enabled: true
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ proto: static
+ type: bridge
+ name_servers:
+ - ${_param:_esc}{_param:dns_server01}
+ - ${_param:_esc}{_param:dns_server02}
+ use_interfaces:
+ - {{ interface_name }}
+ require_interfaces:
+ - {{ interface_name }}
diff --git "a/\173\043 interfaces \043\175/single_dhcp" "b/\173\043 interfaces \043\175/single_dhcp"
new file mode 100644
index 0000000..87315e0
--- /dev/null
+++ "b/\173\043 interfaces \043\175/single_dhcp"
@@ -0,0 +1,11 @@
+{#- Management (admin) network with DHCP #}
+{#- Provides: #}
+{#- <interface_name> + DHCP address #}
+
+ # {{ interfaces_role }}
+ {%- set interface_name = interfaces.keys()[0] %}
+ {{ interface_name }}:
+ enabled: true
+ type: eth
+ proto: dhcp
+ name: {{ interface_name }}
\ No newline at end of file
diff --git "a/\173\043 interfaces \043\175/single_mgm" "b/\173\043 interfaces \043\175/single_mgm"
new file mode 100644
index 0000000..a0de958
--- /dev/null
+++ "b/\173\043 interfaces \043\175/single_mgm"
@@ -0,0 +1,30 @@
+{#- Management (admin) network. For nodes where deploy address must be configured as static (at least cfg*) #}
+{#- Provides: #}
+{#- br_mgm (linux bridge) + address #}
+{#- Requires: #}
+{#- _param:deploy_address #}
+{#- _param:deploy_network_netmask #}
+{#- _param:deploy_network_gateway #}
+{#- _param:dns_server01 #}
+{#- _param:dns_server02 #}
+
+ # {{ interfaces_role }}
+ {%- set interface_name = interfaces.keys()[0] %}
+ {{ interface_name }}:
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ br_mgm:
+ address: ${_param:_esc}{_param:deploy_address}
+ netmask: ${_param:_esc}{_param:deploy_network_netmask} #lab03: 255.255.255.192
+ gateway: ${_param:_esc}{_param:deploy_network_gateway} #lab03: 172.16.49.1
+ enabled: true
+ name_servers:
+ - ${_param:_esc}{_param:dns_server01}
+ - ${_param:_esc}{_param:dns_server02}
+ proto: static
+ type: bridge
+ use_interfaces:
+ - {{ interface_name }}
diff --git "a/\173\043 interfaces \043\175/single_mgm_dhcp" "b/\173\043 interfaces \043\175/single_mgm_dhcp"
new file mode 100644
index 0000000..fd2bf66
--- /dev/null
+++ "b/\173\043 interfaces \043\175/single_mgm_dhcp"
@@ -0,0 +1,18 @@
+{#- Management (admin) network. For nodes where deploy address provided by DHCP server #}
+{#- Provides: #}
+{#- br_mgm (linux bridge) + DHCP address #}
+
+ # {{ interfaces_role }}
+ {%- set interface_name = interfaces.keys()[0] %}
+ {{ interface_name }}:
+ enabled: true
+ type: eth
+ proto: manual
+ ipflush_onchange: true
+ name: {{ interface_name }}
+ br_mgm:
+ enabled: true
+ proto: dhcp
+ type: bridge
+ use_interfaces:
+ - {{ interface_name }}
diff --git "a/\173\043 interfaces \043\175/single_vlan_ctl" "b/\173\043 interfaces \043\175/single_vlan_ctl"
new file mode 100644
index 0000000..2b899a2
--- /dev/null
+++ "b/\173\043 interfaces \043\175/single_vlan_ctl"
@@ -0,0 +1,41 @@
+{#- Control network. For control plane nodes #}
+{#- Provides: #}
+{#- br_ctl (linux bridge) + address #}
+{#- _param:keepalived_vip_interface = 'br_ctl' #}
+{#- Requires: #}
+{#- _param:single_address #}
+{#- _param:control_network_netmask #}
+{#- _param:control_vlan #}
+{#- _param:dns_server01 #}
+{#- _param:dns_server02 #}
+
+ # {{ interfaces_role }}
+ {%- set interface_name = interfaces.keys()[0] %}
+ {{ interface_name }}:
+ enabled: true
+ name: {{ interface_name }}
+ proto: manual
+ type: eth
+ ipflush_onchange: true
+ br_ctl:
+ enabled: true
+ address: ${_param:_esc}{_param:single_address}
+ netmask: ${_param:_esc}{_param:control_network_netmask}
+ proto: static
+ type: bridge
+ name_servers:
+ - ${_param:_esc}{_param:dns_server01}
+ - ${_param:_esc}{_param:dns_server02}
+ use_interfaces:
+ - {{ interface_name }}.${_param:_esc}{_param:control_vlan}
+ require_interfaces:
+ - {{ interface_name }}.${_param:_esc}{_param:control_vlan}
+ {{ interface_name }}.control_vlan:
+ name: {{ interface_name }}.${_param:_esc}{_param:control_vlan}
+ enabled: true
+ proto: manual
+ type: vlan
+ use_interfaces:
+ - {{ interface_name }}
+ require_interfaces:
+ - {{ interface_name }}
diff --git "a/\173\043 roles \043\175/_linux_network_interface" "b/\173\043 roles \043\175/_linux_network_interface"
new file mode 100644
index 0000000..9ab7824
--- /dev/null
+++ "b/\173\043 roles \043\175/_linux_network_interface"
@@ -0,0 +1,23 @@
+{#- Collect interface roles and params into the following dict:
+ # interface_role: # filename that will be included
+ # interface_name: # interface (eth0)
+ # interface_param1: value # optional parameters or empty dict
+ # interface_param2: value
+ # ...
+ #}
+{%- set interface_roles = {} %}
+{%- for interface_name, interface in node['interfaces'].items() %}
+ {%- if interface['role'] not in interface_roles %}
+ {%- set _ = interface_roles.update({interface['role']: {}}) %}
+ {%- endif %}
+ {%- set _ = interface_roles[interface['role']].update({interface_name: {}}) %}
+ {%- for param_name, param in interface.items() %}
+ {%- set _ = interface_roles[interface['role']][interface_name].update({param_name: param}) %}
+ {%- endfor %}
+{%- endfor %}
+{%- set _ = params.update({'linux_network_interfaces': "\n"}) %}
+{%- for interfaces_role, interfaces in interface_roles.items() %}
+ {%- import ("{# interfaces #}/" + interfaces_role) as interface with context %}
+ {%- set _ = params.update({'linux_network_interfaces': params['linux_network_interfaces'] + interface|string }) %}
+{%- endfor %}
+ - environment.{{ cookiecutter._env_name }}.linux_network_interface
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/_metadata_process" "b/\173\043 roles \043\175/_metadata_process"
new file mode 100644
index 0000000..5809398
--- /dev/null
+++ "b/\173\043 roles \043\175/_metadata_process"
@@ -0,0 +1,124 @@
+{#-
+1. Check if 'local_metadata' matches to something in 'global_metadata'.
+ If yes, fetch and process the data.
+ If no, initialize necessary data.
+ If partially intersects (keepalived roles for different clusters): add a fail-state warning to the YAML to avoid using the wrong config
+2. Set necessary 'params' using the 'local_metadata'
+3. Store the 'local_metadata' to the 'global_metadata' if required.
+4. Increment/decrement the 'global_metadata' objects if necessary (next IP address, next vrouter ID, master->slave, etc)
+
+global_metadata keep states across the nodes
+local_metadata keep states for the current node only
+
+Example of local_metadata and global_metadata runtime content:
+
+ local_metadata:
+ keepalived_vip_priority:
+ - openstack_control
+ - openstack_database
+ - openstack_message_queue
+ rabbitmq_cluster_role:
+ - openstack_message_queue
+
+ global_metadata:
+ keepalived_vip_priority: # Separate counters
+ openstack_control|openstack_database|openstack_message_queue: 254
+ cicd_control|infra_kvm: 254
+ keepalived_vip_virtual_router_id: # Common counter
+ __latest: 11
+ openstack_control|openstack_database|openstack_message_queue: 10
+ cicd_control|infra_kvm: 11
+ mysql_cluster_role:
+ openstack_database: master
+#}
+
+{%- macro stateful_roles_check(counter_name) %}
+{#- ####################################### -#}
+
+ {#- 1. Check that there is no intersections between different groups of roles for the <counter_name> #}
+ {%- for names, counter in global_metadata.get(counter_name, {}).items() %}
+ {%- set global_roles = names.split('|') %}
+ {%- for local_counter_role_name in local_metadata.get(counter_name, []) %}
+ {%- if local_counter_role_name in global_roles %}
+ {%- set adding_names = local_metadata.get(counter_name, [])|sort|join('|') %}
+ {%- if names != adding_names %}
+ {#- Found unexpected combination of roles, cause the template rendering exception #}
+ {%- include("======> NODE ROLES MAPPING ERROR! Please check the roles for the node '" + inventory_node_name + "' , metaparam '" + counter_name + "':\n======> Existing roles: " + names + "\n======> Adding roles: " + adding_names) %}
+ {%- endif %}
+ {%- endif %}
+ {%- endfor %}
+ {%- endfor %}
+{%- endmacro %}
+
+{%- macro stateful_counter(counter_name, counter_start, counter_end, counter_step, uniq_per_node=True) %}
+{#- ############################################################################# -#}
+{%- if counter_name in local_metadata %}
+ {{- stateful_roles_check(counter_name) }}
+
+ {%- if counter_name not in global_metadata %}
+ {%- set _ = global_metadata.update({counter_name: {}}) %}
+ {%- endif %}
+ {%- set counter_roles_name = local_metadata[counter_name]|sort|join('|') %}
+
+ {%- if uniq_per_node == True %}
+
+ {%- if counter_roles_name not in global_metadata[counter_name] %}
+ {#- Set default value for <counter_roles_name> = <counter_start> #}
+ {%- set _ = global_metadata[counter_name].update({counter_roles_name: counter_start}) %}
+ {%- else %}
+ {#- Increment or decrement value <counter_roles_name> #}
+ {%- set _ = global_metadata[counter_name].update({counter_roles_name: global_metadata[counter_name][counter_roles_name] + counter_step}) %}
+ {%- if global_metadata[counter_name][counter_roles_name] == counter_end %}
+ {# Cause a jinja render exception and make visible the message with correct counter_name #}
+ {%- include("======> VALUE_ERROR: " + counter_name + "=" + counter_end + " is out of bounds!" ) %}
+ {%- endif %}
+ {%- endif %}
+
+ {%- else %}
+
+ {%- if '__latest' not in global_metadata[counter_name] %}
+ {#- Set the value for __latest = <counter_start> #}
+ {%- set _ = global_metadata[counter_name].update({'__latest': counter_start}) %}
+ {%- endif %}
+ {%- if counter_roles_name not in global_metadata[counter_name] %}
+ {%- set _ = global_metadata[counter_name].update({'__latest': global_metadata[counter_name]['__latest'] + counter_step}) %}
+ {%- if global_metadata[counter_name]['__latest'] == counter_end %}
+ {# Cause a jinja render exception and make visible the message with correct counter_name #}
+ {%- include("======> VALUE_ERROR: " + counter_name + "=" + counter_end + " is out of bounds!" ) %}
+ {%- endif %}
+ {%- set _ = global_metadata[counter_name].update({counter_roles_name: global_metadata[counter_name]['__latest']}) %}
+ {%- endif %}
+
+ {%- endif %}
+ {%- set _ = params.update({counter_name: global_metadata[counter_name][counter_roles_name]}) %}
+{%- endif %}
+{%- endmacro %}
+
+{%- macro stateful_masterslave(masterslave_name, master_name='master', slave_name='slave') %}
+{#- ##################################################################################### -#}
+{%- if masterslave_name in local_metadata %}
+ {{- stateful_roles_check(masterslave_name) }}
+
+ {%- if masterslave_name not in global_metadata %}
+ {%- set _ = global_metadata.update({masterslave_name: {}}) %}
+ {%- endif %}
+ {%- set masterslave_roles_name = local_metadata[masterslave_name]|sort|join('|') %}
+
+ {%- if masterslave_roles_name not in global_metadata[masterslave_name] %}
+ {#- Set first value <masterslave_roles_name> = <master_name> #}
+ {%- set _ = global_metadata[masterslave_name].update({masterslave_roles_name: master_name}) %}
+ {%- else %}
+ {#- Set value <masterslave_roles_name> = <slave_name> #}
+ {%- set _ = global_metadata[masterslave_name].update({masterslave_roles_name: slave_name}) %}
+ {%- endif %}
+ {%- set _ = params.update({masterslave_name: global_metadata[masterslave_name][masterslave_roles_name]}) %}
+{%- endif %}
+{%- endmacro %}
+
+{{- stateful_counter('cicd_database_id', counter_start=1, counter_end=255, counter_step=1) }}
+{{- stateful_counter('opencontrail_database_id', counter_start=1, counter_end=255, counter_step=1) }}
+{{- stateful_counter('keepalived_vip_priority', counter_start=254, counter_end=1, counter_step=-1) }}
+{{- stateful_counter('keepalived_vip_virtual_router_id', counter_start=159, counter_end=250, counter_step=1, uniq_per_node=False) }}
+{{- stateful_masterslave('rabbitmq_cluster_role') }}
+{{- stateful_masterslave('mysql_cluster_role') }}
+{{- stateful_masterslave('redis_cluster_role') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/_overrides" "b/\173\043 roles \043\175/_overrides"
new file mode 100644
index 0000000..ce3e4b1
--- /dev/null
+++ "b/\173\043 roles \043\175/_overrides"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - environment.{{ cookiecutter._env_name }}.overrides
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/ceph_mon" "b/\173\043 roles \043\175/ceph_mon"
new file mode 100644
index 0000000..b07032f
--- /dev/null
+++ "b/\173\043 roles \043\175/ceph_mon"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.ceph.mon
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'ceph_mon') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'ceph_mon') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/cicd_control_leader" "b/\173\043 roles \043\175/cicd_control_leader"
new file mode 100644
index 0000000..8f92bdd
--- /dev/null
+++ "b/\173\043 roles \043\175/cicd_control_leader"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.cicd.control.leader
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'cicd_control') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'cicd_control') }}
+{{- register_metaparam('cicd_database_id', 'cicd_control') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/cicd_control_manager" "b/\173\043 roles \043\175/cicd_control_manager"
new file mode 100644
index 0000000..9028ddd
--- /dev/null
+++ "b/\173\043 roles \043\175/cicd_control_manager"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.cicd.control.manager
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'cicd_control') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'cicd_control') }}
+{{- register_metaparam('cicd_database_id', 'cicd_control') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/features_designate" "b/\173\043 roles \043\175/features_designate"
new file mode 100644
index 0000000..e295f2b
--- /dev/null
+++ "b/\173\043 roles \043\175/features_designate"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - environment.{{ cookiecutter._env_name }}.features.designate.system
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/features_designate_database" "b/\173\043 roles \043\175/features_designate_database"
new file mode 100644
index 0000000..e541620
--- /dev/null
+++ "b/\173\043 roles \043\175/features_designate_database"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - environment.{{ cookiecutter._env_name }}.features.designate.database
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/features_designate_keystone" "b/\173\043 roles \043\175/features_designate_keystone"
new file mode 100644
index 0000000..3fdc6e7
--- /dev/null
+++ "b/\173\043 roles \043\175/features_designate_keystone"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - environment.{{ cookiecutter._env_name }}.features.designate.keystone
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_config" "b/\173\043 roles \043\175/infra_config"
new file mode 100644
index 0000000..0bddd76
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_config"
@@ -0,0 +1,11 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.infra.config
+ - environment.{{ cookiecutter._env_name }}.reclass_datasource_local
+ - environment.{{ cookiecutter._env_name }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_idm" "b/\173\043 roles \043\175/infra_idm"
new file mode 100644
index 0000000..b9842d1
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_idm"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.infra.idm
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_kvm" "b/\173\043 roles \043\175/infra_kvm"
new file mode 100644
index 0000000..d0f8666
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_kvm"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.infra.kvm
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'infra_kvm') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'infra_kvm') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_maas" "b/\173\043 roles \043\175/infra_maas"
new file mode 100644
index 0000000..7c925d2
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_maas"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.infra.maas
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_proxy" "b/\173\043 roles \043\175/infra_proxy"
new file mode 100644
index 0000000..1bd8693
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_proxy"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.proxy
+ - cluster.${_param:cluster_name}.stacklight.proxy
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'infra_proxy') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'infra_proxy') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/infra_rsyslog" "b/\173\043 roles \043\175/infra_rsyslog"
new file mode 100644
index 0000000..3fcffa6
--- /dev/null
+++ "b/\173\043 roles \043\175/infra_rsyslog"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.infra.rsyslog
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/kubernetes_control" "b/\173\043 roles \043\175/kubernetes_control"
new file mode 100644
index 0000000..0af2378
--- /dev/null
+++ "b/\173\043 roles \043\175/kubernetes_control"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.kubernetes.control
+{{- set_param('keepalived_vip_interface', 'ens3') }}
+{{- register_metaparam('keepalived_vip_priority', 'kubernetes_control') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'kubernetes_control') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/linux_system_codename_centos" "b/\173\043 roles \043\175/linux_system_codename_centos"
new file mode 100644
index 0000000..2f199df
--- /dev/null
+++ "b/\173\043 roles \043\175/linux_system_codename_centos"
@@ -0,0 +1 @@
+{{- set_param('linux_system_codename', 'centos') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/linux_system_codename_trusty" "b/\173\043 roles \043\175/linux_system_codename_trusty"
new file mode 100644
index 0000000..997e3f5
--- /dev/null
+++ "b/\173\043 roles \043\175/linux_system_codename_trusty"
@@ -0,0 +1 @@
+{{- set_param('linux_system_codename', 'trusty') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/linux_system_codename_xenial" "b/\173\043 roles \043\175/linux_system_codename_xenial"
new file mode 100644
index 0000000..a473f56
--- /dev/null
+++ "b/\173\043 roles \043\175/linux_system_codename_xenial"
@@ -0,0 +1 @@
+{{- set_param('linux_system_codename', 'xenial') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/monitoring_service" "b/\173\043 roles \043\175/monitoring_service"
new file mode 100644
index 0000000..ff7de21
--- /dev/null
+++ "b/\173\043 roles \043\175/monitoring_service"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.monitoring.server
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/opencontrail_analytics" "b/\173\043 roles \043\175/opencontrail_analytics"
new file mode 100644
index 0000000..c8a8921
--- /dev/null
+++ "b/\173\043 roles \043\175/opencontrail_analytics"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.opencontrail.analytics
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('opencontrail_database_id', 'opencontrail_analytics') }}
+{{- register_metaparam('keepalived_vip_priority', 'opencontrail_analytics') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'opencontrail_analytics') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/opencontrail_control" "b/\173\043 roles \043\175/opencontrail_control"
new file mode 100644
index 0000000..e74a9cf
--- /dev/null
+++ "b/\173\043 roles \043\175/opencontrail_control"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.opencontrail.control
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('opencontrail_database_id', 'opencontrail_control') }}
+{{- register_metaparam('keepalived_vip_priority', 'opencontrail_control') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'opencontrail_control') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/opencontrail_gateway" "b/\173\043 roles \043\175/opencontrail_gateway"
new file mode 100644
index 0000000..a75b537
--- /dev/null
+++ "b/\173\043 roles \043\175/opencontrail_gateway"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.opencontrail.gateway
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/opencontrail_tor" "b/\173\043 roles \043\175/opencontrail_tor"
new file mode 100644
index 0000000..d42a19a
--- /dev/null
+++ "b/\173\043 roles \043\175/opencontrail_tor"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.opencontrail.tor
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'opencontrail_tor') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'opencontrail_tor') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_baremetal" "b/\173\043 roles \043\175/openstack_baremetal"
new file mode 100644
index 0000000..f6739e4
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_baremetal"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.baremetal
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_baremetal') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_baremetal') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_benchmark" "b/\173\043 roles \043\175/openstack_benchmark"
new file mode 100644
index 0000000..93b92aa
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_benchmark"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.benchmark
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_billing" "b/\173\043 roles \043\175/openstack_billing"
new file mode 100644
index 0000000..a78fae9
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_billing"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.billing
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_catalog" "b/\173\043 roles \043\175/openstack_catalog"
new file mode 100644
index 0000000..e4612af
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_catalog"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.catalog
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_catalog') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_catalog') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_compute" "b/\173\043 roles \043\175/openstack_compute"
new file mode 100644
index 0000000..6665b76
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_compute"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.compute
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_compute_dpdk" "b/\173\043 roles \043\175/openstack_compute_dpdk"
new file mode 100644
index 0000000..1585758
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_compute_dpdk"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.compute.dpdk
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_compute_sriov" "b/\173\043 roles \043\175/openstack_compute_sriov"
new file mode 100644
index 0000000..2e512c4
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_compute_sriov"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.compute.sriov
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_control" "b/\173\043 roles \043\175/openstack_control"
new file mode 100644
index 0000000..00a8c57
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_control"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.control
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_control') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_control') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_control_leader" "b/\173\043 roles \043\175/openstack_control_leader"
new file mode 100644
index 0000000..3a49d2a
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_control_leader"
@@ -0,0 +1,10 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ {%- include ("{# roles #}/" + 'openstack_control') %}
+ - cluster.${_param:cluster_name}.openstack.control_init
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_control_upgrade" "b/\173\043 roles \043\175/openstack_control_upgrade"
new file mode 100644
index 0000000..24bbddc
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_control_upgrade"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.upgrade
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_dashboard" "b/\173\043 roles \043\175/openstack_dashboard"
new file mode 100644
index 0000000..65751e9
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_dashboard"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.dashboard
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_database" "b/\173\043 roles \043\175/openstack_database"
new file mode 100644
index 0000000..5bc6aee
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_database"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.database
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('mysql_cluster_role', 'openstack_database') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_database') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_database') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_database_leader" "b/\173\043 roles \043\175/openstack_database_leader"
new file mode 100644
index 0000000..1f855fe
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_database_leader"
@@ -0,0 +1,10 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ {%- include ("{# roles #}/" + 'openstack_database') %}
+ - cluster.${_param:cluster_name}.openstack.database_init
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_dns" "b/\173\043 roles \043\175/openstack_dns"
new file mode 100644
index 0000000..07ee063
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_dns"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.dns
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_dns') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_dns') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_gateway" "b/\173\043 roles \043\175/openstack_gateway"
new file mode 100644
index 0000000..9521c1d
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_gateway"
@@ -0,0 +1,9 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.gateway
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_gateway_octavia" "b/\173\043 roles \043\175/openstack_gateway_octavia"
new file mode 100644
index 0000000..35edfae
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_gateway_octavia"
@@ -0,0 +1,10 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.gateway
+ - cluster.${_param:cluster_name}.openstack.octavia_manager
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_message_queue" "b/\173\043 roles \043\175/openstack_message_queue"
new file mode 100644
index 0000000..d59d3f1
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_message_queue"
@@ -0,0 +1,13 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.message_queue
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('rabbitmq_cluster_role', 'openstack_message_queue') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_message_queue') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_message_queue') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_proxy" "b/\173\043 roles \043\175/openstack_proxy"
new file mode 100644
index 0000000..f342287
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_proxy"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.proxy
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_proxy') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_proxy') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/openstack_telemetry" "b/\173\043 roles \043\175/openstack_telemetry"
new file mode 100644
index 0000000..02f8e2b
--- /dev/null
+++ "b/\173\043 roles \043\175/openstack_telemetry"
@@ -0,0 +1,12 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.openstack.telemetry
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'openstack_telemetry') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'openstack_telemetry') }}
diff --git "a/\173\043 roles \043\175/stacklight_log" "b/\173\043 roles \043\175/stacklight_log"
new file mode 100644
index 0000000..293effe
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_log"
@@ -0,0 +1,14 @@
+{#- For StackLight v1 and v2 #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.stacklight.log
+ - cluster.${_param:cluster_name}.stacklight.log_curator
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklight_log') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklight_log') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_log_leader_v1" "b/\173\043 roles \043\175/stacklight_log_leader_v1"
new file mode 100644
index 0000000..da974b3
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_log_leader_v1"
@@ -0,0 +1,11 @@
+{#- For StackLight v1 only #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ {%- include ("{# roles #}/" + 'stacklight_log') %}
+ - system.elasticsearch.client.single
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_log_leader_v2" "b/\173\043 roles \043\175/stacklight_log_leader_v2"
new file mode 100644
index 0000000..efa482e
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_log_leader_v2"
@@ -0,0 +1,12 @@
+{#- For StackLight v2 only #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ {%- include ("{# roles #}/" + 'stacklight_log') %}
+ - system.elasticsearch.client.single
+ - system.kibana.client.single
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_monitor" "b/\173\043 roles \043\175/stacklight_monitor"
new file mode 100644
index 0000000..59361cd
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_monitor"
@@ -0,0 +1,14 @@
+{#- For StackLight v1 only #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.stacklight.monitor
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('redis_cluster_role', 'stacklight_monitor') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklight_monitor') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklight_monitor') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_monitor_leader" "b/\173\043 roles \043\175/stacklight_monitor_leader"
new file mode 100644
index 0000000..8f7853d
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_monitor_leader"
@@ -0,0 +1,12 @@
+{#- For StackLight v1 only #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ {%- include ("{# roles #}/" + 'stacklight_monitor') %}
+ - system.grafana.client.single
+ - system.kibana.client.single
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_telemetry" "b/\173\043 roles \043\175/stacklight_telemetry"
new file mode 100644
index 0000000..b5b8344
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_telemetry"
@@ -0,0 +1,15 @@
+{#- For StackLight v1 and v2 #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.stacklight.telemetry
+ - service.galera.slave.cluster
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklight_telemetry') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklight_telemetry') }}
+{{- register_metaparam('mysql_cluster_role', 'stacklight_telemetry') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklight_telemetry_leader" "b/\173\043 roles \043\175/stacklight_telemetry_leader"
new file mode 100644
index 0000000..c439777
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklight_telemetry_leader"
@@ -0,0 +1,15 @@
+{#- For StackLight v1 and v2 #}
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - cluster.${_param:cluster_name}.stacklight.telemetry
+ - service.galera.master.cluster
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklight_telemetry') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklight_telemetry') }}
+{{- register_metaparam('mysql_cluster_role', 'stacklight_telemetry') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklightv2_server" "b/\173\043 roles \043\175/stacklightv2_server"
new file mode 100644
index 0000000..c6032d3
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklightv2_server"
@@ -0,0 +1,14 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - system.docker.swarm.manager
+ - cluster.${_param:cluster_name}.stacklight.server
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('redis_cluster_role', 'stacklightv2_server') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklightv2_server') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklightv2_server') }}
\ No newline at end of file
diff --git "a/\173\043 roles \043\175/stacklightv2_server_leader" "b/\173\043 roles \043\175/stacklightv2_server_leader"
new file mode 100644
index 0000000..a5acec2
--- /dev/null
+++ "b/\173\043 roles \043\175/stacklightv2_server_leader"
@@ -0,0 +1,15 @@
+{#-
+parameters:
+ reclass:
+ storage:
+ node:
+ <reclass_storage_node_name>:
+ classes:
+#}
+ - system.docker.swarm.master
+ - cluster.${_param:cluster_name}.stacklight.server
+ - cluster.${_param:cluster_name}.stacklight.client
+{{- set_param('keepalived_vip_interface', 'br_ctl') }}
+{{- register_metaparam('redis_cluster_role', 'stacklightv2_server') }}
+{{- register_metaparam('keepalived_vip_priority', 'stacklightv2_server') }}
+{{- register_metaparam('keepalived_vip_virtual_router_id', 'stacklightv2_server') }}
\ No newline at end of file
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