/
openstack-service-config.yml
146 lines (137 loc) · 3.75 KB
/
openstack-service-config.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
# This file contains data that controls the post-deployment configuration
# of OpenStack by the Ansible playbook openstack-service-setup.yml
# Define a set of VM flavors to be created
vm_flavors:
- name: m1.micro
ram: 256
vcpus: 1
disk: 1
swap: 0
ephemeral: 0
- name: m1.tiny
ram: 512
vcpus: 1
disk: 1
swap: 0
ephemeral: 0
- name: m1.mini
ram: 1024
vcpus: 2
disk: 3
swap: 0
ephemeral: 0
- name: m1.small
ram: 2048
vcpus: 3
disk: 12
swap: 4
ephemeral: 4
- name: m1.medium
ram: 4096
vcpus: 6
disk: 60
swap: 4
ephemeral: 20
- name: m1.large
ram: 8192
vcpus: 12
disk: 300
swap: 4
ephemeral: 150
- name: m1.xlarge
ram: 16384
vcpus: 24
disk: 600
swap: 4
ephemeral: 256
- name: m1.heavy
ram: 32768
vcpus: 48
disk: 1200
swap: 4
ephemeral: 256
# Create shared networks and subnets:
provider_net_name: GATEWAY_NET
provider_net_cidr: 10.0.248.0/22
provider_dns_server: "{{ DNS_NAMESERVER | default('8.8.8.8') }}"
provider_subnet_name: "{{ provider_net_name }}_SUBNET"
private_net_name: PRIVATE_NET
private_net_cidr: 192.168.0.0/24
private_subnet_name: "{{ private_net_name }}_SUBNET"
networks:
- name: "{{ provider_net_name }}"
shared: true
external: true
network_type: flat
physical_network: flat
- name: "{{ private_net_name }}"
shared: true
external: true
network_type: vxlan
segmentation_id: 101
networks_ovn:
- name: "{{ provider_net_name }}"
shared: true
external: true
network_type: flat
physical_network: flat
- name: "{{ private_net_name }}"
shared: true
external: true
network_type: geneve
segmentation_id: 101
subnets:
- name: "{{ provider_subnet_name }}"
network_name: "{{ provider_net_name }}"
ip_version: 4
cidr: "{{ provider_net_cidr }}"
gateway_ip: "{{ provider_net_cidr | ipaddr('1') | ipaddr('address') }}"
enable_dhcp: "{{ enable_provider_net_dhcp | default(false) | bool }}"
allocation_pool_start: "{{ provider_net_cidr | ipaddr('201') | ipaddr('address') }}"
allocation_pool_end: "{{ provider_net_cidr | ipaddr('255') | ipaddr('address') }}"
dns_nameservers:
- "{{ provider_dns_server }}"
- name: "{{ private_subnet_name }}"
network_name: "{{ private_net_name }}"
ip_version: 4
cidr: "{{ private_net_cidr }}"
gateway_ip: "{{ private_net_cidr | ipaddr('1') | ipaddr('address') }}"
enable_dhcp: true
allocation_pool_start: "{{ private_net_cidr | ipaddr('10') | ipaddr('address') }}"
allocation_pool_end: "{{ private_net_cidr | ipaddr('254') | ipaddr('address') }}"
router_name: GATEWAY_NET_ROUTER
security_group_name: gateway_security
port_name: gateway_port
# Neutron security group setup
security_group_rules:
- name: Allow ICMP
protocol: icmp
direction: ingress
- name: Allow all TCP
protocol: tcp
direction: ingress
port_min: 1
port_max: 65535
- name: Allow all UDP
protocol: udp
direction: ingress
port_min: 1
port_max: 65535
# Create some default images
images:
- name: Ubuntu 18.04 LTS
format: qcow2
url: https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
- name: Ubuntu 20.04 LTS
format: qcow2
url: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
- name: CentOS 9 Stream
format: qcow2
url: https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20220112.1.x86_64.qcow2
- name: Debian 10 Latest
format: qcow2
url: https://cdimage.debian.org/cdimage/openstack/current-10/debian-10-openstack-amd64.qcow2
- name: Cirros-0.5.2
format: qcow2
url: http://download.cirros-cloud.net/0.5.2/cirros-0.5.2-x86_64-disk.img