blob: 9fa261e2ef63390a4fc6657f83e9f54d604c9486 [file] [log] [blame]
Ales Komarekc12dd412017-06-27 16:24:42 +02001classes:
Victor Ryzhenkin3e602a32018-04-04 02:43:53 +04002- system.linux.system.single
azvyagintsev2859f0e2018-06-11 17:45:47 +03003- system.linux.system.repo.mcp.apt_mirantis.ubuntu
Martin Polreicha0addcc2018-06-25 11:32:52 +02004- system.linux.system.repo.mcp.apt_mirantis.saltstack
Ales Komarekc12dd412017-06-27 16:24:42 +02005- system.openssh.client.lab
6- system.salt.master.pkg
Ales Komarekc12dd412017-06-27 16:24:42 +02007- system.salt.master.api
8- system.reclass.storage.salt
Victor Ryzhenkin3e602a32018-04-04 02:43:53 +04009- system.salt.minion.ca.salt_master
Ales Komarekc12dd412017-06-27 16:24:42 +020010- system.reclass.storage.system.kubernetes_control_cluster
11- system.reclass.storage.system.opencontrail_control_cluster
Petr Michalecf05e3ea2017-08-21 17:33:16 +020012- cluster.k8s-ha-contrail
Ales Komarekc12dd412017-06-27 16:24:42 +020013parameters:
14 _param:
15 salt_master_base_environment: prd
16 reclass_data_repository: "https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab"
17 reclass_data_revision: master
18 reclass_config_master: ${_param:infra_config_deploy_address}
19 single_address: ${_param:infra_config_address}
vrovachev61bffdc2017-08-14 20:23:27 +040020 deploy_address: ${_param:infra_config_deploy_address}
Ales Komarekc12dd412017-06-27 16:24:42 +020021 linux_system_codename: xenial
22 salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/"
23 salt_master_host: ${_param:infra_config_deploy_address}
Adam Tengler0963f862017-07-04 15:46:06 +000024 salt:
25 master:
26 reactor:
27 reclass/minion/classify:
28 - salt://reclass/reactor/node_register.sls
Marek Celoud9749b272017-07-10 17:47:42 +020029 linux:
30 network:
31 interface:
32 ens4:
33 enabled: true
34 type: eth
35 proto: static
36 address: ${_param:single_address}
37 netmask: 255.255.255.0
Victor Ryzhenkin3e602a32018-04-04 02:43:53 +040038 pre_up_cmds:
39 - "iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE"
40 post_down_cmds:
41 - "iptables -t nat -F POSTROUTING"
42 system:
43 kernel:
44 sysctl:
45 net.ipv4.conf.ens3.forwarding: 1
46 net.ipv4.conf.ens3.send_redirects: 0
Ales Komarekc12dd412017-06-27 16:24:42 +020047 reclass:
48 storage:
Adam Tengler0963f862017-07-04 15:46:06 +000049 class_mapping:
50 common_node:
51 expression: all
52 node_param:
53 single_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000054 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000055 linux_system_codename:
56 value_template: <<node_os>>
57 salt_master_host:
58 value_template: <<node_master_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040059 deploy_address:
Tomáš Kukrál075ec9a2017-07-27 11:35:51 +020060 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000061 infra_config:
62 expression: <<node_hostname>>__startswith__cfg
63 cluster_param:
64 infra_config_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000065 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000066 infra_config_deploy_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000067 value_template: <<node_deploy_ip>>
Adam Tengler4f23d962017-07-04 19:54:59 +000068 cluster_domain:
69 value_template: <<node_domain>>
Adam Tengler0963f862017-07-04 15:46:06 +000070 kubernetes_control01:
71 expression: <<node_hostname>>__equals__ctl01
72 cluster_param:
73 kubernetes_control_node01_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000074 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040075 kubernetes_control_node01_deploy_address:
76 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000077 kubernetes_control02:
78 expression: <<node_hostname>>__equals__ctl02
79 cluster_param:
80 kubernetes_control_node02_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000081 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040082 kubernetes_control_node02_deploy_address:
83 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000084 kubernetes_control03:
85 expression: <<node_hostname>>__equals__ctl03
86 cluster_param:
87 kubernetes_control_node03_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000088 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040089 kubernetes_control_node03_deploy_address:
90 value_template: <<node_deploy_ip>>
Tomáš Kukrál81fd9a32017-07-26 16:24:52 +020091 etcd_control01:
92 expression: <<node_hostname>>__equals__ctl01
93 cluster_param:
94 etcd_control_node01_address:
95 value_template: <<node_deploy_ip>>
96 etcd_control02:
97 expression: <<node_hostname>>__equals__ctl02
98 cluster_param:
99 etcd_control_node02_address:
100 value_template: <<node_deploy_ip>>
101 etcd_control03:
102 expression: <<node_hostname>>__equals__ctl03
103 cluster_param:
104 etcd_control_node03_address:
105 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000106 opencontrail_control01:
107 expression: <<node_hostname>>__equals__ntw01
108 cluster_param:
109 opencontrail_control_node01_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000110 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000111 opencontrail_control02:
112 expression: <<node_hostname>>__equals__ntw02
113 cluster_param:
114 opencontrail_control_node02_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000115 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000116 opencontrail_control03:
117 expression: <<node_hostname>>__equals__ntw03
118 cluster_param:
119 opencontrail_control_node03_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000120 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000121 kubernetes_compute:
122 expression: <<node_hostname>>__startswith__cmp
123 node_class:
124 value_template:
125 - cluster.<<node_cluster>>.kubernetes.compute
Ales Komarekc12dd412017-06-27 16:24:42 +0200126 node:
Ales Komarekc12dd412017-06-27 16:24:42 +0200127 opencontrail_control_node01:
128 params:
129 rabbitmq_cluster_role: master
130 opencontrail_control_node02:
131 params:
132 rabbitmq_cluster_role: slave
133 opencontrail_control_node03:
134 params:
135 rabbitmq_cluster_role: slave