forked from openshift-metal3/dev-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvm_setup_vars.yml
65 lines (60 loc) · 2.53 KB
/
vm_setup_vars.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Here we put the ansible vars to override some defaults in the vm-setup
# playbooks/roles, ref https://github.com/metal3-io/metal3-dev-env
# Currently this is required because of hard-coded node-name expectations in the
# openshift-installer terraform templates
ironic_prefix: "{{ ironic_prefix }}"
# We enable more memory and masters in dev-scripts compared to the minimal setup
# in metal3-dev-env
num_masters: 3
num_workers: 1
flavors:
master:
memory: "{{ lookup('env', 'MASTER_MEMORY') | default('16384', true) }}"
disk: "{{ lookup('env', 'MASTER_DISK') | default('20', true) }}"
vcpu: "{{ lookup('env', 'MASTER_VCPU') | default('8', true) }}"
extradisks: false
worker:
memory: "{{ lookup('env', 'WORKER_MEMORY') | default('8192', true) }}"
disk: "{{ lookup('env', 'WORKER_DISK') | default('20', true) }}"
vcpu: "{{ lookup('env', 'WORKER_VCPU') | default('4', true) }}"
extradisks: false
# For OpenShift we create some additional DNS records for the API/DNS VIPs
baremetal_network_cidr_v4: "{{ lookup('env', 'EXTERNAL_SUBNET_V4') }}"
baremetal_network_cidr_v6: "{{ lookup('env', 'EXTERNAL_SUBNET_V6') }}"
baremetal_network_cidr: "{{ baremetal_network_cidr_v4 | default(baremetal_network_cidr_v6, true) }}"
dns_extrahosts:
- ip: "{{ baremetal_network_cidr | nthhost(5) }}"
hostnames:
- "api"
- ip: "{{ baremetal_network_cidr | nthhost(2) }}"
hostnames:
- "ns1"
- ip: "{{ baremetal_network_cidr | nthhost(1) }}"
hostnames:
- "virthost"
networks:
- name: "{{ provisioning_network_name }}"
bridge: "{{ provisioning_network_name }}"
forward_mode: bridge
- name: "{{ baremetal_network_name }}"
bridge: "{{ baremetal_network_name }}"
forward_mode: "{{ 'bridge' if lookup('env', 'MANAGE_BR_BRIDGE') == 'n' else 'nat' }}"
address_v4: "{{ baremetal_network_cidr_v4|nthhost(1)|default('', true) }}"
netmask_v4: "{{ baremetal_network_cidr_v4|ipaddr('netmask') }}"
address_v6: "{{ baremetal_network_cidr_v6|nthhost(1)|default('', true) }}"
prefix_v6: "{{ baremetal_network_cidr_v6|ipaddr('prefix') }}"
dhcp_range_v4:
- "{{ baremetal_network_cidr_v4|nthhost(20) }}"
- "{{ baremetal_network_cidr_v4|nthhost(60) }}"
dhcp_range_v6:
- "{{ baremetal_network_cidr_v6|nthhost(20) }}"
- "{{ baremetal_network_cidr_v6|nthhost(60) }}"
nat_port_range:
- 1024
- 65535
domain: "{{ cluster_domain }}"
dns:
hosts: "{{dns_extrahosts | default([])}}"
forwarders:
- domain: "apps.{{ cluster_domain }}"
addr: "127.0.0.1"