3e4ab106c1f3eeca7193027292477f89ff8c84bc
[pharos.git] / config / installers / daisy / pod_config.yaml.j2
1 ##############################################################################
2 # Copyright (c) 2017 ZTE Corporation and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 ---
11
12 adapter: {{ conf['jumphost']['remote_params']['type'] }}
13 hosts:
14   {%- set nodes_num = conf['nodes'] | length -%}
15   {%- if nodes_num == 5 %}
16   - name: 'controller01'
17     roles:
18       - 'CONTROLLER_LB'
19     ipmi_ip: {{ conf['nodes'][0]['remote_management']['address'] }}
20     ipmi_user: {{ conf['nodes'][0]['remote_management']['user'] }}
21     ipmi_pass: {{ conf['nodes'][0]['remote_management']['pass'] }}
22     mac_addresses:{% for nic in conf['nodes'][0]['interfaces'] %}
23       - {{ nic['mac_address'] }}{% endfor %}
24   - name: 'controller02'
25     roles:
26       - 'CONTROLLER_LB'
27     ipmi_ip: {{ conf['nodes'][1]['remote_management']['address'] }}
28     ipmi_user: {{ conf['nodes'][1]['remote_management']['user'] }}
29     ipmi_pass: {{ conf['nodes'][1]['remote_management']['pass'] }}
30     mac_addresses:{% for nic in conf['nodes'][1]['interfaces'] %}
31       - {{ nic['mac_address'] }}{% endfor %}
32   - name: 'controller03'
33     roles:
34       - 'CONTROLLER_LB'
35     ipmi_ip: {{ conf['nodes'][2]['remote_management']['address'] }}
36     ipmi_user: {{ conf['nodes'][2]['remote_management']['user'] }}
37     ipmi_pass: {{ conf['nodes'][2]['remote_management']['pass'] }}
38     mac_addresses:{% for nic in conf['nodes'][2]['interfaces'] %}
39       - {{ nic['mac_address'] }}{% endfor %}
40   - name: 'computer01'
41     roles:
42       - 'COMPUTER'
43     ipmi_ip: {{ conf['nodes'][3]['remote_management']['address'] }}
44     ipmi_user: {{ conf['nodes'][3]['remote_management']['user'] }}
45     ipmi_pass: {{ conf['nodes'][3]['remote_management']['pass'] }}
46     mac_addresses:{% for nic in conf['nodes'][3]['interfaces'] %}
47       - {{ nic['mac_address'] }}{% endfor %}
48   - name: 'computer02'
49     roles:
50       - 'COMPUTER'
51     ipmi_ip: {{ conf['nodes'][4]['remote_management']['address'] }}
52     ipmi_user: {{ conf['nodes'][4]['remote_management']['user'] }}
53     ipmi_pass: {{ conf['nodes'][4]['remote_management']['pass'] }}
54     mac_addresses:{% for nic in conf['nodes'][4]['interfaces'] %}
55       - {{ nic['mac_address'] }}{% endfor %}
56   {%- endif %}
57   {%- if nodes_num == 3 %}
58   - name: 'controller01'
59     roles:
60       - 'CONTROLLER_LB'
61     ipmi_ip: {{ conf['nodes'][0]['remote_management']['address'] }}
62     ipmi_user: {{ conf['nodes'][0]['remote_management']['user'] }}
63     ipmi_pass: {{ conf['nodes'][0]['remote_management']['pass'] }}
64     mac_addresses:{% for nic in conf['nodes'][0]['interfaces'] %}
65       - {{ nic['mac_address'] }}{% endfor %}
66   - name: 'computer01'
67     roles:
68       - 'COMPUTER'
69     ipmi_ip: {{ conf['nodes'][1]['remote_management']['address'] }}
70     ipmi_user: {{ conf['nodes'][1]['remote_management']['user'] }}
71     ipmi_pass: {{ conf['nodes'][1]['remote_management']['pass'] }}
72     mac_addresses:{% for nic in conf['nodes'][1]['interfaces'] %}
73       - {{ nic['mac_address'] }}{% endfor %}
74   - name: 'computer02'
75     roles:
76       - 'COMPUTER'
77     ipmi_ip: {{ conf['nodes'][2]['remote_management']['address'] }}
78     ipmi_user: {{ conf['nodes'][2]['remote_management']['user'] }}
79     ipmi_pass: {{ conf['nodes'][2]['remote_management']['pass'] }}
80     mac_addresses:{% for nic in conf['nodes'][2]['interfaces'] %}
81       - {{ nic['mac_address'] }}{% endfor %}
82   {%- endif %}
83 disks:
84   daisy: 50
85 daisy_passwd: 'r00tme'
86 {% if 'fixed_ips' in conf['jumphost'] -%}
87 daisy_gateway: {{ conf['jumphost']['fixed_ips']['admin'] }}
88 {%- else -%}
89 daisy_gateway: {{ conf['jumphost']['interfaces'][0]['address'][0] }}
90 {%- endif %}
91 ceph_disk_name: '/dev/sdb'