blob: 48b83971d1ad23688d99197d85ff18dc8ee5548f [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
Sergey Kolekonov41ffdfa2018-10-30 19:47:23 +000010- system.salt.minion.cert.k8s_server
Ales Komarekc12dd412017-06-27 16:24:42 +020011- system.reclass.storage.system.kubernetes_control_cluster
12- system.reclass.storage.system.opencontrail_control_cluster
Petr Michalecf05e3ea2017-08-21 17:33:16 +020013- cluster.k8s-ha-contrail
Ales Komarekc12dd412017-06-27 16:24:42 +020014parameters:
15 _param:
16 salt_master_base_environment: prd
17 reclass_data_repository: "https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab"
18 reclass_data_revision: master
19 reclass_config_master: ${_param:infra_config_deploy_address}
20 single_address: ${_param:infra_config_address}
vrovachev61bffdc2017-08-14 20:23:27 +040021 deploy_address: ${_param:infra_config_deploy_address}
Ales Komarekc12dd412017-06-27 16:24:42 +020022 linux_system_codename: xenial
23 salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/"
24 salt_master_host: ${_param:infra_config_deploy_address}
Adam Tengler0963f862017-07-04 15:46:06 +000025 salt:
26 master:
27 reactor:
28 reclass/minion/classify:
29 - salt://reclass/reactor/node_register.sls
Marek Celoud9749b272017-07-10 17:47:42 +020030 linux:
31 network:
32 interface:
33 ens4:
34 enabled: true
35 type: eth
36 proto: static
37 address: ${_param:single_address}
38 netmask: 255.255.255.0
Victor Ryzhenkin3e602a32018-04-04 02:43:53 +040039 pre_up_cmds:
40 - "iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE"
41 post_down_cmds:
42 - "iptables -t nat -F POSTROUTING"
43 system:
44 kernel:
45 sysctl:
46 net.ipv4.conf.ens3.forwarding: 1
47 net.ipv4.conf.ens3.send_redirects: 0
Ales Komarekc12dd412017-06-27 16:24:42 +020048 reclass:
49 storage:
Adam Tengler0963f862017-07-04 15:46:06 +000050 class_mapping:
51 common_node:
52 expression: all
53 node_param:
54 single_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000055 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000056 linux_system_codename:
57 value_template: <<node_os>>
58 salt_master_host:
59 value_template: <<node_master_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040060 deploy_address:
Tomáš Kukrál075ec9a2017-07-27 11:35:51 +020061 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000062 infra_config:
63 expression: <<node_hostname>>__startswith__cfg
64 cluster_param:
65 infra_config_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000066 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000067 infra_config_deploy_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000068 value_template: <<node_deploy_ip>>
Adam Tengler4f23d962017-07-04 19:54:59 +000069 cluster_domain:
70 value_template: <<node_domain>>
Adam Tengler0963f862017-07-04 15:46:06 +000071 kubernetes_control01:
72 expression: <<node_hostname>>__equals__ctl01
73 cluster_param:
74 kubernetes_control_node01_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000075 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040076 kubernetes_control_node01_deploy_address:
77 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000078 kubernetes_control02:
79 expression: <<node_hostname>>__equals__ctl02
80 cluster_param:
81 kubernetes_control_node02_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000082 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040083 kubernetes_control_node02_deploy_address:
84 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +000085 kubernetes_control03:
86 expression: <<node_hostname>>__equals__ctl03
87 cluster_param:
88 kubernetes_control_node03_address:
Adam Tenglerc6176502017-07-04 20:45:06 +000089 value_template: <<node_control_ip>>
vrovachev61bffdc2017-08-14 20:23:27 +040090 kubernetes_control_node03_deploy_address:
91 value_template: <<node_deploy_ip>>
Tomáš Kukrál81fd9a32017-07-26 16:24:52 +020092 etcd_control01:
93 expression: <<node_hostname>>__equals__ctl01
94 cluster_param:
95 etcd_control_node01_address:
96 value_template: <<node_deploy_ip>>
97 etcd_control02:
98 expression: <<node_hostname>>__equals__ctl02
99 cluster_param:
100 etcd_control_node02_address:
101 value_template: <<node_deploy_ip>>
102 etcd_control03:
103 expression: <<node_hostname>>__equals__ctl03
104 cluster_param:
105 etcd_control_node03_address:
106 value_template: <<node_deploy_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000107 opencontrail_control01:
108 expression: <<node_hostname>>__equals__ntw01
109 cluster_param:
110 opencontrail_control_node01_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000111 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000112 opencontrail_control02:
113 expression: <<node_hostname>>__equals__ntw02
114 cluster_param:
115 opencontrail_control_node02_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000116 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000117 opencontrail_control03:
118 expression: <<node_hostname>>__equals__ntw03
119 cluster_param:
120 opencontrail_control_node03_address:
Adam Tenglerc6176502017-07-04 20:45:06 +0000121 value_template: <<node_control_ip>>
Adam Tengler0963f862017-07-04 15:46:06 +0000122 kubernetes_compute:
123 expression: <<node_hostname>>__startswith__cmp
124 node_class:
125 value_template:
126 - cluster.<<node_cluster>>.kubernetes.compute
Ales Komarekc12dd412017-06-27 16:24:42 +0200127 node:
Ales Komarekc12dd412017-06-27 16:24:42 +0200128 opencontrail_control_node01:
129 params:
130 rabbitmq_cluster_role: master
131 opencontrail_control_node02:
132 params:
133 rabbitmq_cluster_role: slave
134 opencontrail_control_node03:
135 params:
136 rabbitmq_cluster_role: slave