Convert vars in files to host_vars

This change allows the MNAIO to really be used as a stand alone kick
system which has the potential to be developed into a stand alone
project. At the very least this change improves playbook performance
by scoping variables.

The inventory has been converted into a typical Ansible inventory and
the "servers" used in the MNAIO are now simply host_vars
which will trigger specific VM builds when instructed to do so. This
gives the MNAIO the ability to serve as a stand alone kick system which
could be used for physical hosts as well as MNAIO testing all through
the same basic set of playbooks. Should a deployer want to use this with
physical servers they'd need to do nothing more than define their basic
inventory and where the the required pieces of infrastructure needed to
PXE boot their machines.

Change-Id: I6c47e02ecfbe8ee7533e77b11041785db485a1a9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-07-31 20:21:24 -05:00
parent a3d39c43cb
commit cfc76ded4a
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
35 changed files with 1191 additions and 825 deletions

View File

@ -148,8 +148,8 @@ To rekick all VMs, the following command can be used on the host machine to cycl
for VM_NAME in $(virsh list --all | awk '/running/ || /shut/ {print $2}'); do
virsh destroy "${VM_NAME}"
lvremove "/dev/mapper/vg01--${VM_NAME}"
lvcreate -L 60G vg01 -n "${VM_NAME}"
echo y | lvremove "/dev/mapper/vg01-${VM_NAME}"
lvcreate -L 92160M vg01 -n "${VM_NAME}"
virsh start "${VM_NAME}"
done

View File

@ -66,7 +66,5 @@
state: restarted
with_items: "{{ mnaio_dhcp_distro_packages }}"
vars_files:
- vars/main.yml
tags:
- deploy-dhcpd

View File

@ -13,102 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Setup cinder host volume
hosts: cinder_hosts:swift_hosts
gather_facts: false
tasks:
- name: un-mount deleteme mount
mount:
name: "/var/lib/lxc"
state: unmounted
- name: remote deleteme mount
mount:
name: "/var/lib/lxc"
state: absent
- name: Remove deleteme lv
lvol:
vg: vg00
lv: lxc00
force: true
state: absent
- name: Setup cinder host volume
hosts: cinder_hosts
gather_facts: false
tasks:
- name: Create cinder-volumes lv
lvol:
vg: vg00
lv: cinder-volumes00
size: 100%FREE
shrink: false
- name: Create data cinder-volumes group
lvg:
vg: cinder-volumes
pvs: "/dev/vg00/cinder-volumes00"
vars_files:
- vars/main.yml
tags:
- deploy-osa
- name: Setup swift host volume
hosts: swift_hosts
gather_facts: false
tasks:
- name: Remove deleteme lv
lvol:
vg: vg00
lv: "{{ item }}"
size: 4G
with_items:
- disk1
- disk2
- disk3
- name: Format swift drives
filesystem:
fstype: xfs
dev: "/dev/vg00/{{ item }}"
with_items:
- disk1
- disk2
- disk3
- name: Create drive directories
file:
path: "/srv/{{ item }}"
state: directory
owner: "root"
group: "root"
mode: "0755"
with_items:
- disk1
- disk2
- disk3
- name: Mount swift drives
mount:
name: "/srv/{{ item }}"
src: "/dev/mapper/vg00-{{ item }}"
fstype: xfs
state: mounted
with_items:
- disk1
- disk2
- disk3
vars_files:
- vars/main.yml
tags:
- deploy-osa
- name: Setup deploy host
hosts: deploy_hosts
gather_facts: "{{ gather_facts | default(true) }}"
@ -219,7 +123,5 @@
when:
- run_osa | default(true) | bool
vars_files:
- vars/main.yml
tags:
- deploy-osa

View File

@ -187,35 +187,46 @@
group: root
with_items:
- src: basic-interface.cfg
dest: basic-interface.cfg
dest: "basic-{{ ansible_os_family | lower }}-interface.cfg"
dir: networking
- src: vm-post-install-script.sh.j2
dest: "vm-post-install-{{ ansible_os_family | lower }}-script.sh"
dir: scripts
- name: network scripts for an MNAIO
template:
src: "mnaio/{{ ansible_os_family | lower }}/{{ item.src }}"
dest: /var/www/pxe/{{ item.dir }}/{{ item.dest }}
mode: "0644"
owner: root
group: root
when:
- groups['mnaio_hosts'] | default([]) | length > 0
with_items:
- src: mnaio-bridges.cfg.j2
dest: mnaio-bridges.cfg
dir: networking
- src: mnaio-post-install-script.sh.j2
dest: mnaio-post-install-script.sh
dir: scripts
- src: vm-post-install-script.sh.j2
dest: vm-post-install-script.sh
dir: scripts
- name: network scripts for servers
template:
src: "pxe/{{ ansible_os_family | lower }}/vm-bridges.cfg.j2"
dest: /var/www/pxe/networking/{{ item.server_hostname }}-bridges.cfg
dest: /var/www/pxe/networking/{{ hostvars[item]['server_hostname'] }}-bridges.cfg
mode: "0644"
owner: root
group: root
with_items: "{{ servers }}"
with_items: "{{ groups['pxe_servers'] }}"
- name: tftp configs for servers
template:
src: "pxe/tftp/pxelinux.cfg.macaddr.j2"
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ item.server_mac_address | replace(':', '-') }}"
dest: "/var/lib/tftpboot/pxelinux.cfg/01-{{ hostvars[item]['server_mac_address'] | replace(':', '-') }}"
mode: "0644"
owner: root
group: root
with_items: "{{ servers }}"
with_items: "{{ groups['pxe_servers'] }}"
- name: Preseeds for pxe mnaio
template:
@ -290,7 +301,5 @@
state: restarted
enabled: yes
vars_files:
- vars/main.yml
tags:
- deploy-pxe

View File

@ -32,36 +32,44 @@
- name: Create VM LV
lvol:
vg: vg01
lv: "{{ item.server_hostname }}"
lv: "{{ hostvars[item]['server_hostname'] }}"
size: "{{ default_vm_storage }}"
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: Create the VM template
template:
src: kvm/kvm-vm.xml
dest: "/etc/libvirt/qemu/{{ item.server_hostname }}.xml"
dest: "/etc/libvirt/qemu/{{ hostvars[item]['server_hostname'] }}.xml"
mode: 0644
owner: root
group: root
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: Define the VM
command: "virsh define /etc/libvirt/qemu/{{ item.server_hostname }}.xml"
command: "virsh define /etc/libvirt/qemu/{{ hostvars[item]['server_hostname'] }}.xml"
failed_when: false
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: Create the VM
command: "virsh create /etc/libvirt/qemu/{{ item.server_hostname }}.xml"
command: "virsh create /etc/libvirt/qemu/{{ hostvars[item]['server_hostname'] }}.xml"
failed_when: false
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
- name: Start the VM
command: "virsh start {{ item.server_hostname }}"
command: "virsh start {{ hostvars[item]['server_hostname'] }}"
failed_when: false
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
vars_files:
- vars/main.yml
tags:
- deploy-vms
@ -70,14 +78,14 @@
hosts: localhost
gather_facts: false
tasks:
- name: Servers group
- name: VM Servers group
add_host:
name: "{{ item.server_vm_fixed_addr }}"
name: "{{ hostvars[item]['server_vm_fixed_addr'] }}"
groups: vm_servers
with_items: "{{ servers }}"
when:
- hostvars[item]['server_vm'] | default(false) | bool
with_items: "{{ groups['pxe_servers'] }}"
vars_files:
- vars/main.yml
tags:
- deploy-vms
@ -86,11 +94,16 @@
hosts: vm_servers
gather_facts: false
pre_tasks:
- name: Wait for container connectivity
wait_for_connection:
- name: Wait for connectivity 1
local_action:
module: wait_for
host: "{{ ansible_host }}"
connect_timeout: 5
port: 22
sleep: 10
timeout: 1200
state: started
search_regex: OpenSSH
tasks:
- name: copy host keys
copy:
@ -103,7 +116,100 @@
- src: /root/.ssh/id_rsa.pub
dest: /root/.ssh/id_rsa.pub
vars_files:
- vars/main.yml
tags:
- deploy-vms
- deploy-vms
- name: Setup cinder host volume
hosts: cinder_hosts:swift_hosts
gather_facts: false
tasks:
- name: un-mount deleteme mount
mount:
name: "/var/lib/lxc"
state: unmounted
- name: remote deleteme mount
mount:
name: "/var/lib/lxc"
state: absent
- name: Remove deleteme lv
lvol:
vg: vg00
lv: lxc00
force: true
state: absent
tags:
- deploy-vms
- name: Setup cinder host volume
hosts: cinder_hosts
gather_facts: false
tasks:
- name: Create cinder-volumes lv
lvol:
vg: vg00
lv: cinder-volumes00
size: "100%FREE"
shrink: false
- name: Create data cinder-volumes group
lvg:
vg: cinder-volumes
pvs: "/dev/vg00/cinder-volumes00"
tags:
- deploy-vms
- name: Setup swift host volume
hosts: swift_hosts
gather_facts: false
tasks:
- name: Remove deleteme lv
lvol:
vg: vg00
lv: "{{ item }}"
size: 4G
with_items:
- disk1
- disk2
- disk3
- name: Format swift drives
filesystem:
fstype: xfs
dev: "/dev/vg00/{{ item }}"
with_items:
- disk1
- disk2
- disk3
- name: Create drive directories
file:
path: "/srv/{{ item }}"
state: directory
owner: "root"
group: "root"
mode: "0755"
with_items:
- disk1
- disk2
- disk3
- name: Mount swift drives
mount:
name: "/srv/{{ item }}"
src: "/dev/mapper/vg00-{{ item }}"
fstype: xfs
state: mounted
with_items:
- disk1
- disk2
- disk3
tags:
- deploy-vms

View File

@ -37,11 +37,11 @@ shared-network all-networks {
{% endfor %}
group {
{% for item in servers %}
host {{ item.server_hostname }} {
hardware ethernet {{ item.server_mac_address }};
fixed-address {{ item.server_vm_fixed_addr }};
option host-name "{{ item.server_hostname }}";
{% for item in groups['pxe_servers'] %}
host {{ hostvars[item]['server_hostname'] }} {
hardware ethernet {{ hostvars[item]['server_mac_address'] }};
fixed-address {{ hostvars[item]['server_vm_fixed_addr'] }};
option host-name "{{ hostvars[item]['server_hostname'] }}";
}
{% endfor %}

View File

@ -0,0 +1,66 @@
---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
default_interface: "{{ default_network | default('eth0') }}"
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
default_vm_storage: "{{ vm_disk_size | default(92160) }}"
default_os_families:
ubuntu-16.04-amd64: debian
ubuntu-14.04-amd64: debian
default_ubuntu_mirror_proxy: 'http://10.0.2.1:3142/'
default_ubuntu_mirror_hostname: archive.ubuntu.com
default_ubuntu_mirror_directory: /ubuntu
# IP address, or domain name of the TFTP server
tftp_server: "{{ ansible_host }}"
# tftp_ssh_key: '' # user defined ssh key, used to access the host
tftp_port: 69
# Default ISO images
images:
ubuntu-16.04-amd64:
image_type: debian
image_iso_url: "http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso"
image_name: "ubuntu-16.04.2-server-amd64.iso"
image_short_name: "ubuntu-16.04.2-server-amd64"
image_default_boot: "ubuntu-16.04.2-server-amd64/amd64/boot-screens/menu.cfg"
image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789"
image_kernel: "ubuntu-16.04.2-server-amd64/amd64/linux"
image_initrd: "ubuntu-16.04.2-server-amd64/amd64/initrd.gz"
image_netboot: "ubuntu-16.04.2-server-amd64/install/netboot/ubuntu-installer"
image_preseeds:
mnaio:
url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed"
template_name: "mnaio.preseed"
vm:
url: "tftp://{{ tftp_server }}/preseed/vm.preseed"
template_name: "vm.preseed"
ubuntu-14.04-amd64:
image_type: debian
image_iso_url: "http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso"
image_name: "ubuntu-14.04.5-server-amd64.iso"
image_short_name: "ubuntu-14.04.5-server-amd64"
image_default_boot: "ubuntu-14.04.5-server-amd64/amd64/boot-screens/menu.cfg"
image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789"
image_kernel: "ubuntu-14.04.5-server-amd64/amd64/linux"
image_initrd: "ubuntu-14.04.5-server-amd64/amd64/initrd.gz"
image_netboot: "ubuntu-14.04.5-server-amd64/install/netboot/ubuntu-installer"
image_preseeds:
mnaio:
url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed"
template_name: "mnaio.preseed"
vm:
url: "tftp://{{ tftp_server }}/preseed/vm.preseed"
template_name: "vm.preseed"

View File

@ -0,0 +1,28 @@
---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
dhcp_default_lease_time: 21600 # Default lease time
dhcp_max_lease_time: 43200 # Max lease time
tftp_boot_path: /pxelinux.0 # Path of where to boot from first
# - List of DHCP Subnets - These are iterated though and each will be created
dhcp_list:
- netmask: 255.255.255.0 # Netmask
gateway: 10.0.2.1 # Gateway
dns: 8.8.8.8 # DNS
subnet: 10.0.2.0 # Subnet mask
default_lease_time: 21600 # Subnet Default lease time - The default is used if this is not defined
max_lease_time: 43200 # Subnet Max lease time - The default is used if this is not defined
tftp_boot_path: /pxelinux.0 # Path for tftp of where to boot from first - The default is used if this is not defined
tftp_server: "{{ tftp_server }}" # The server hosting the TFTP server - The default is used if this is not defined
dhcp_default_domain_name: openstackci.local

View File

@ -0,0 +1,83 @@
---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# mnaio_data_disk: 'sdc' # str - not required, set this to define a given data disk if no data disk
# is defined the largest unpartitioned disk will be used.
mnaio_host_networks:
dhcp:
iface: 'vm-br-dhcp' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.2.1/22' # str - not required, must be in CIDR format
iface_port: none # str - required, physical port used within a host bridge
mgmt:
iface: 'vm-br-eth1'
inet_type: 'static'
address: '10.0.236.1/22'
iface_port: none
flat:
iface: 'vm-br-eth2'
inet_type: 'static'
address: '10.0.248.1/22'
iface_port: none
vlan:
iface: 'vm-br-eth3'
inet_type: 'manual'
iface_port: none
vxlan:
iface: 'vm-br-eth4'
inet_type: 'manual'
address: '10.0.240.1/22'
iface_port: none
storage:
iface: 'vm-br-eth5'
inet_type: 'manual'
address: '10.0.244.1/22'
iface_port: none
mnaio_host_iptables_rules:
- table: filter
chain: INPUT
protocol: tcp
match: tcp
destination_port: 67
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 67
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 53
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 53
jump: ACCEPT
- table: filter
chain: FORWARD
in_interface: vm-br-dhcp
jump: ACCEPT
- table: filter
chain: FORWARD
out_interface: vm-br-dhcp
jump: ACCEPT
- table: nat
chain: POSTROUTING
out_interface: "{{ masquerade_interface | default(default_interface) }}"
jump: MASQUERADE

View File

@ -0,0 +1,16 @@
---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
pxelinux_url: "https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz"
pxelinux_name: "syslinux-6.03.tar.gz"
pxelinux_short_name: "syslinux-6.03"

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'cinder1'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.130'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:07'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.107/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.107/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.107/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.107/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'cinder2'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.131'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:08'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.108/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.108/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.108/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.108/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'compute1'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.120'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:05'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.105/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.105/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.105/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.105/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'compute2'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.121'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:06'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.106/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.106/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.106/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.106/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}" # str - Set the ansible os family
server_hostname: 'example-host1' # str - required, hostname of server
server_vm: true # bool - not required, used to specify a host is to become a VM
server_vm_ram: 8192 # int - not required, used to specify ram when provisioning a VM
server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM
server_vm_fixed_addr: '10.0.2.200' # str - not required, used to specify fixed address when using internal DHCPD
server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM
server_image: "{{ default_vm_image }}" # str - required, image name
server_default_interface: 'eth0' # str - required, default interface
server_mac_address: '52:54:00:bd:80:20' # str - required, mac address of default interface
server_preseed_ks: 'vm' # str - required, name of preseed/kickstart file
server_extra_options: '' # str - not required, added kernel options
server_networks: # dict - required, hash of networks, can be empty, key is used to name the networks.
dhcp:
iface: 'eth0' # str - required, interface name
inet_type: 'dhcp' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-dhcp # str - not Required, used to specify an integration networks interface when provisioning a VM
mgmt:
iface: 'eth1' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.236.200/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth1 # str - not Required, used to specify an integration networks interface when provisioning a VM
flat:
iface: 'eth2' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.248.200/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth2 # str - not Required, used to specify an integration networks interface when provisioning a VM
vlan:
iface: 'eth3' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM
vxlan:
iface: 'eth4' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.240.200/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth4 # str - not Required, used to specify an integration networks interface when provisioning a VM
storage:
iface: 'eth5' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.244.200/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'infra1' # str - required, hostname of server
server_vm: true # bool - not required, used to specify a host is to become a VM
server_vm_ram: 8192 # int - not required, used to specify ram when provisioning a VM
server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM
server_vm_fixed_addr: '10.0.2.100' # str - not required, used to specify fixed address when using internal DHCPD
server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM
server_image: "{{ default_vm_image }}" # str - required, image name
server_default_interface: 'eth0' # str - required, default interface
server_mac_address: '52:54:00:bd:80:00' # str - required, mac address of default interface
server_preseed_ks: 'vm' # str - required, name of preseed/kickstart file
server_extra_options: '' # str - not required, added kernel options
server_networks: # dict - required, hash of networks, can be empty, key is used to name the networks.
dhcp:
iface: 'eth0' # str - required, interface name
inet_type: 'dhcp' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-dhcp # str - not Required, used to specify an integration networks interface when provisioning a VM
mgmt:
iface: 'eth1' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.236.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth1 # str - not Required, used to specify an integration networks interface when provisioning a VM
flat:
iface: 'eth2' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.248.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth2 # str - not Required, used to specify an integration networks interface when provisioning a VM
vlan:
iface: 'eth3' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM
vxlan:
iface: 'eth4' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.240.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth4 # str - not Required, used to specify an integration networks interface when provisioning a VM
storage:
iface: 'eth5' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.244.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'infra2'
server_vm: true
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.101'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:01'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.101/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.101/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.101/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.101/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'infra3'
server_vm: true
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.102'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:02'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.102/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.102/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.102/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.102/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'loadbalancer1'
server_vm: true
server_vm_ram: 1024
server_vm_vcpus: 1
server_vm_fixed_addr: '10.0.2.142'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:12'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.112/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.112/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.112/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.112/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'logging1'
server_vm: true
server_vm_ram: 1024
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.110'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:03'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.103/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.103/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.103/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.103/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'swift1'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:09'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.109/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.109/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.109/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.109/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'swift2'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:10'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.110/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.110/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.110/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.110/22'
vm_int_iface: vm-br-eth5

View File

@ -0,0 +1,58 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in witing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_os_family: "{{ images[default_vm_image]['image_type'] }}"
server_hostname: 'swift3'
server_vm: true
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.141'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:11'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.111/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.111/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.111/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.111/22'
vm_int_iface: vm-br-eth5

View File

@ -1,50 +1,84 @@
################################## ALL HOSTS ##################################
[all]
localhost ansible_connection=local
mnaio1 ansible_host=10.0.2.1
# Local host
localhost ansible_connection=local
infra1 ansible_host=10.0.236.100
infra2 ansible_host=10.0.236.101
infra3 ansible_host=10.0.236.102
log1 ansible_host=10.0.236.103
compute1 ansible_host=10.0.236.105
compute2 ansible_host=10.0.236.106
cinder1 ansible_host=10.0.236.107
cinder2 ansible_host=10.0.236.108
swift1 ansible_host=10.0.236.109
swift2 ansible_host=10.0.236.110
swift3 ansible_host=10.0.236.111
loadbalancer1 ansible_host=10.0.236.112
# MNAIO host
mnaio1 ansible_host=10.0.2.1 ansible_connection=local
[pxe_hosts]
mnaio1
# MNAIO VMs
infra1 ansible_host=10.0.236.100
infra2 ansible_host=10.0.236.101
infra3 ansible_host=10.0.236.102
cinder2 ansible_host=10.0.236.108
logging1 ansible_host=10.0.236.103
compute1 ansible_host=10.0.236.105
compute2 ansible_host=10.0.236.106
cinder1 ansible_host=10.0.236.107
swift1 ansible_host=10.0.236.109
swift2 ansible_host=10.0.236.110
swift3 ansible_host=10.0.236.111
loadbalancer1 ansible_host=10.0.236.112
[dhcp_hosts]
mnaio1
################################# MNAIO HOSTS #################################
# The group "vm_hosts" is used to define all host machines that will be running
# traditional virtualization using KVM.
[vm_hosts]
mnaio1
################################## PXE HOSTS ##################################
# The group "mnaio_hosts" is used to define all host machines that will serve
# the purpose of running an MNAIO test environment.
[mnaio_hosts]
mnaio1
# The group "pxe_hosts" is used to setup all systems that will be responsible
# for PXE boot. This will install all of the needed capabilities to TFTP serve
# system images.
[pxe_hosts]
mnaio1
# The group "dhcp_hosts" is used to setup all systems that will be responsible
# for DHCP. This is not required as external DHCP could be used.
[dhcp_hosts]
mnaio1
# The group "pxe_servers" is used to create PXE specific configurations for
# each host machines.
[pxe_servers]
cinder1
cinder2
compute1
compute2
infra1
infra2
infra3
loadbalancer1
logging1
swift1
swift2
swift3
################################## OSA HOSTS ##################################
# The group "deploy_hosts" is used to define where an OSA deployment will
# originate from.
[deploy_hosts]
infra1
############################### OSA MNAIO HOSTS ###############################
# The group "swift_hosts" is used in the MNAIO setup to create the basic drive
# setup needed for a swift deployment.
[swift_hosts]
swift1
swift2
swift3
# The group "cinder_hosts" is used in the MNAIO setup to create the basic drive
# setup needed for a cinder LVM deployment.
[cinder_hosts]
cinder1
cinder2
[openstack_hosts]
infra1
infra2
infra3
log1
compute1
compute2
cinder2
cinder1
swift1
swift2
swift3

View File

@ -1,10 +1,10 @@
<domain type='kvm'>
<name>{{ item.server_hostname }}</name>
<memory unit='MiB'>{{ item.server_vm_ram }}</memory>
<currentMemory unit='MiB'>{{ item.server_vm_ram }}</currentMemory>
{% set _vcpus_threads = ((item.server_vm_vcpus | int) // 2) %}
<name>{{ hostvars[item]['server_hostname'] }}</name>
<memory unit='MiB'>{{ hostvars[item]['server_vm_ram'] }}</memory>
<currentMemory unit='MiB'>{{ hostvars[item]['server_vm_ram'] }}</currentMemory>
{% set _vcpus_threads = ((hostvars[item]['server_vm_vcpus'] | int) // 2) %}
{% set vcpus_threads = (_vcpus_threads | int) == 0 | ternary('1', _vcpus_threads) %}
{% set vcpus = (item.server_vm_vcpus | int) * (vcpus_threads | int) %}
{% set vcpus = (hostvars[item]['server_vm_vcpus'] | int) * (vcpus_threads | int) %}
<vcpu placement='static' current='{{ vcpus | int }}'>{{ vcpus | int }}</vcpu>
<resource>
<partition>/machine</partition>
@ -18,7 +18,7 @@
<apic/>
</features>
<cpu mode='host-model'>
<topology sockets='1' cores='{{ item.server_vm_vcpus | int }}' threads='{{ vcpus_threads | int }}'/>
<topology sockets='1' cores='{{ hostvars[item]["server_vm_vcpus"] | int }}' threads='{{ vcpus_threads | int }}'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
@ -36,7 +36,7 @@
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/vg01/{{ item.server_hostname }}'/>
<source dev='/dev/vg01/{{ hostvars[item]["server_hostname"] }}'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
<boot order='1'/>
@ -49,10 +49,10 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</controller>
{% for _key, _value in item.server_networks.items()|sort(attribute='1.iface') %}
{% for _key, _value in hostvars[item]['server_networks'].items()|sort(attribute='1.iface') %}
<interface type='network'>
{% if _key == item.server_vm_primary_network %}
<mac address='{{ item.server_mac_address }}'/>
{% if _key == hostvars[item]['server_vm_primary_network'] %}
<mac address='{{ hostvars[item]["server_mac_address"] }}'/>
<boot order='2'/>
{% endif %}
<source network='{{ _value.vm_int_iface }}'/>
@ -98,4 +98,4 @@
</rng>
</devices>
</domain>
</domain>

View File

@ -12,4 +12,4 @@ chmod 0700 /root/.ssh
echo "{{ tftp_ssh_key }}" >> /root/.ssh/authorized_keys
wget --no-proxy http://{{ tftp_server }}/networking/mnaio-bridges.cfg -O /etc/network/interfaces.d/mnaio-bridges.cfg
wget --no-proxy http://{{ tftp_server }}/networking/basic-interface.cfg -O /etc/network/interfaces
wget --no-proxy http://{{ tftp_server }}/networking/basic-debian-interface.cfg -O /etc/network/interfaces

View File

@ -87,7 +87,7 @@ global_overrides:
### Anchors
###
log_block: &log_block
log1:
logging1:
ip: 10.0.236.103
infra_block: &infra_block

View File

@ -4,4 +4,4 @@
auto lo
iface lo inet loopback
source /etc/network/interfaces.d/*.cfg
source /etc/network/interfaces.d/*.cfg

View File

@ -1,6 +1,7 @@
# Physical interface, could be bond. This only needs to be set once
{% set server_networks = hostvars[item]['server_networks'] %}
{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %}
{% for key, value in server_networks.items()|sort(attribute='1.iface') %}
{% if value.iface is defined %}
auto {{ value.iface }}
iface {{ value.iface }} inet manual
@ -8,7 +9,7 @@ iface {{ value.iface }} inet manual
{% endfor %}
{% for key, value in item.server_networks.items()|sort(attribute='1.iface') %}
{% for key, value in server_networks.items()|sort(attribute='1.iface') %}
auto br-{{ key }}
iface br-{{ key }} inet {{ value.inet_type }}
bridge_stp off

View File

@ -12,7 +12,7 @@ chmod 0700 /root/.ssh
echo "{{ tftp_ssh_key }}" >> /root/.ssh/authorized_keys
wget --no-proxy http://{{ tftp_server }}/networking/$(cat /etc/hostname)-bridges.cfg -O /etc/network/interfaces.d/vm-bridges.cfg
wget --no-proxy http://{{ tftp_server }}/networking/basic-interface.cfg -O /etc/network/interfaces
wget --no-proxy http://{{ tftp_server }}/networking/basic-debian-interface.cfg -O /etc/network/interfaces
cat > /etc/network/if-up.d/post-up-rules <<EOF
#!/usr/bin/env bash

View File

@ -219,7 +219,7 @@ d-i grub-installer/only_debian boolean true
# Post Install
d-i preseed/late_command string \
in-target bash -c "wget --no-proxy http://{{ tftp_server }}/scripts/vm-post-install-script.sh -O /opt/vm-post-install-script.sh"; \
in-target bash -c "wget --no-proxy http://{{ tftp_server }}/scripts/vm-post-install-debian-script.sh -O /opt/vm-post-install-script.sh"; \
in-target bash -c 'chmod +x /opt/vm-post-install-script.sh'; \
in-target bash -c '/opt/vm-post-install-script.sh'
# Finish

View File

@ -1,9 +1,11 @@
{% set image_properties = images[item.server_image] %}
{% set server_vars = hostvars[item] %}
{% set image_properties = images[server_vars['server_image']] %}
default linux
prompt 0
timeout 1
label linux
kernel {{ image_properties['image_kernel'] }}
{% if image_properties['image_type'] == 'debian' %}
append hostname={{ item.server_hostname }} {{ image_properties['image_kernel_options'] }} initrd={{ image_properties['image_initrd'] }} preseed/url={{ image_properties['image_preseeds'][item.server_preseed_ks]['url'] }} preseed/interactive=false netcfg/choose_interface={{ item.server_default_interface }} {{ item.server_extra_options | default('') }}
append hostname={{ server_vars['server_hostname'] }} {{ image_properties['image_kernel_options'] }} initrd={{ image_properties['image_initrd'] }} preseed/url={{ image_properties['image_preseeds'][server_vars['server_preseed_ks']]['url'] }} preseed/interactive=false netcfg/choose_interface={{ server_vars['server_default_interface'] }} {{ server_vars['server_extra_options'] | default('') }}
{% endif %}

View File

@ -14,7 +14,7 @@
# limitations under the License.
- name: Gather facts
hosts: localhost
hosts: mnaio_hosts
gather_facts: "{{ gather_facts | default(true) }}"
pre_tasks:
- name: Gather variables for each operating system
@ -121,7 +121,7 @@
- name: Drop host network interfaces
template:
src: "pxe/{{ ansible_os_family | lower }}/mnaio-bridges.cfg.j2"
src: "mnaio/{{ ansible_os_family | lower }}/mnaio-bridges.cfg.j2"
dest: /etc/network/interfaces.d/mnaio-bridges.cfg
mode: "0644"
owner: root
@ -277,7 +277,5 @@
state: restarted
enabled: yes
vars_files:
- vars/main.yml
tags:
- setup-host

View File

@ -1,631 +0,0 @@
---
############### DEFAULTS ###############
default_interface: "{{ default_network | default('eth0') }}"
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
default_vm_storage: "{{ vm_disk_size | default(92160) }}"
default_ubuntu_mirror_proxy: 'http://10.0.2.1:3142/'
default_ubuntu_mirror_hostname: archive.ubuntu.com
default_ubuntu_mirror_directory: /ubuntu
############### DEFAULTS ###############
############### MNAIO ###############
# mnaio_data_disk: 'sdc' # str - not required, set this to define a given data disk if no data disk
# is defined the largest unpartitioned disk will be used.
mnaio_host_networks:
dhcp:
iface: 'vm-br-dhcp' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.2.1/22' # str - not required, must be in CIDR format
iface_port: none # str - required, physical port used within a host bridge
mgmt:
iface: 'vm-br-eth1'
inet_type: 'static'
address: '10.0.236.1/22'
iface_port: none
flat:
iface: 'vm-br-eth2'
inet_type: 'static'
address: '10.0.248.1/22'
iface_port: none
vlan:
iface: 'vm-br-eth3'
inet_type: 'manual'
iface_port: none
vxlan:
iface: 'vm-br-eth4'
inet_type: 'manual'
address: '10.0.240.1/22'
iface_port: none
storage:
iface: 'vm-br-eth5'
inet_type: 'manual'
address: '10.0.244.1/22'
iface_port: none
mnaio_host_iptables_rules:
- table: filter
chain: INPUT
protocol: tcp
match: tcp
destination_port: 67
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 67
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 53
jump: ACCEPT
- table: filter
chain: INPUT
protocol: udp
match: udp
destination_port: 53
jump: ACCEPT
- table: filter
chain: FORWARD
in_interface: vm-br-dhcp
jump: ACCEPT
- table: filter
chain: FORWARD
out_interface: vm-br-dhcp
jump: ACCEPT
- table: nat
chain: POSTROUTING
out_interface: "{{ masquerade_interface | default(default_interface) }}"
jump: MASQUERADE
############### MNAIO ###############
############### PXE ###############
tftp_port: 69
tftp_boot_dir: "/var/lib/tftpboot"
tftp_server: "{{ ansible_host }}" # IP address, or domain name of the TFTP server
# tftp_ssh_key: '' # user defined ssh key, used to access the host
# Default ISO images
images:
ubuntu-16.04-amd64:
image_type: debian
image_iso_url: "http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso"
image_name: "ubuntu-16.04.2-server-amd64.iso"
image_short_name: "ubuntu-16.04.2-server-amd64"
image_default_boot: "ubuntu-16.04.2-server-amd64/amd64/boot-screens/menu.cfg"
image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789"
image_kernel: "ubuntu-16.04.2-server-amd64/amd64/linux"
image_initrd: "ubuntu-16.04.2-server-amd64/amd64/initrd.gz"
image_netboot: "ubuntu-16.04.2-server-amd64/install/netboot/ubuntu-installer"
image_preseeds:
mnaio:
url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed"
template_name: "mnaio.preseed"
vm:
url: "tftp://{{ tftp_server }}/preseed/vm.preseed"
template_name: "vm.preseed"
ubuntu-14.04-amd64:
image_type: debian
image_iso_url: "http://releases.ubuntu.com/14.04.5/ubuntu-14.04.5-server-amd64.iso"
image_name: "ubuntu-14.04.5-server-amd64.iso"
image_short_name: "ubuntu-14.04.5-server-amd64"
image_default_boot: "ubuntu-14.04.5-server-amd64/amd64/boot-screens/menu.cfg"
image_kernel_options: "biosdevname=0 net.ifnames=0 auto=true priority=critical vga=789"
image_kernel: "ubuntu-14.04.5-server-amd64/amd64/linux"
image_initrd: "ubuntu-14.04.5-server-amd64/amd64/initrd.gz"
image_netboot: "ubuntu-14.04.5-server-amd64/install/netboot/ubuntu-installer"
image_preseeds:
mnaio:
url: "tftp://{{ tftp_server }}/preseed/mnaio.preseed"
template_name: "mnaio.preseed"
vm:
url: "tftp://{{ tftp_server }}/preseed/vm.preseed"
template_name: "vm.preseed"
pxelinux_url: "https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz"
pxelinux_name: "syslinux-6.03.tar.gz"
pxelinux_short_name: "syslinux-6.03"
############### PXE ###############
############### SERVERS ###############
# List of servers to create specific mac address bound boot entries.
servers:
- server_hostname: 'infra1' # str - required, hostname of server
server_vm_ram: 8192 # int - not required, used to specify ram when provisioning a VM
server_vm_vcpus: 4 # int - not required, used to specify vcpus when provisioning a VM
server_vm_fixed_addr: '10.0.2.100' # str - not required, used to specify fixed address when using internal DHCPD
server_vm_primary_network: 'dhcp' # str - not required, primary network used to kick the VM
server_image: "{{ default_vm_image }}" # str - required, image name
server_default_interface: 'eth0' # str - required, default interface
server_mac_address: '52:54:00:bd:80:00' # str - required, mac address of default interface
server_preseed_ks: 'vm' # str - required, name of preseed/kickstart file
server_extra_options: '' # str - not required, added kernel options
server_networks: # dict - required, hash of networks, can be empty, key is used to name the networks.
dhcp:
iface: 'eth0' # str - required, interface name
inet_type: 'dhcp' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-dhcp # str - not Required, used to specify an integration networks interface when provisioning a VM
mgmt:
iface: 'eth1' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.236.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth1 # str - not Required, used to specify an integration networks interface when provisioning a VM
flat:
iface: 'eth2' # str - required, interface name
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
address: '10.0.248.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth2 # str - not Required, used to specify an integration networks interface when provisioning a VM
vlan:
iface: 'eth3' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM
vxlan:
iface: 'eth4' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.240.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth4 # str - not Required, used to specify an integration networks interface when provisioning a VM
storage:
iface: 'eth5' # str - required, interface name
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
address: '10.0.244.100/22' # str - not required, must be in CIDR format
vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM
- server_hostname: 'infra2'
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.101'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:01'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.101/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.101/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.101/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.101/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'infra3'
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.102'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:02'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.102/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.102/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.102/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.102/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'logging1'
server_vm_ram: 1024
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.110'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:03'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.103/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.103/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.103/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.103/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'compute1'
server_vm_ram: 2048
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.120'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:05'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.105/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.105/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.105/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.105/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'compute2'
server_vm_ram: 2048
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.121'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:06'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.106/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.106/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.106/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.106/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'cinder1'
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.130'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:07'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.107/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.107/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.107/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.107/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'cinder2'
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.131'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:08'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.108/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.108/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.108/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.108/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'swift1'
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:09'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.109/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.109/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.109/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.109/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'swift2'
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.140'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:10'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.110/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.110/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.110/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.110/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'swift3'
server_vm_ram: 2048
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.141'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:11'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.111/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.111/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.111/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.111/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'loadbalancer1'
server_vm_ram: 1024
server_vm_vcpus: 1
server_vm_fixed_addr: '10.0.2.142'
server_vm_primary_network: 'dhcp'
server_image: "{{ default_vm_image }}"
server_default_interface: 'eth0'
server_mac_address: '52:54:00:bd:80:12'
server_preseed_ks: 'vm'
server_extra_options: ''
server_networks:
dhcp:
iface: 'eth0'
inet_type: 'dhcp'
vm_int_iface: vm-br-dhcp
mgmt:
iface: 'eth1'
inet_type: 'static'
address: '10.0.236.112/22'
vm_int_iface: vm-br-eth1
flat:
iface: 'eth2'
inet_type: 'static'
address: '10.0.248.112/22'
vm_int_iface: vm-br-eth2
vlan:
iface: 'eth3'
inet_type: 'manual'
vm_int_iface: vm-br-eth3
vxlan:
iface: 'eth4'
inet_type: 'static'
address: '10.0.240.112/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'static'
address: '10.0.244.112/22'
vm_int_iface: vm-br-eth5
############### SERVERS ###############
############### DHCP ###############
dhcp_default_lease_time: 21600 # Default lease time
dhcp_max_lease_time: 43200 # Max lease time
tftp_boot_path: /pxelinux.0 # Path of where to boot from first
# - List of DHCP Subnets - These are iterated though and each will be created
dhcp_list:
- netmask: 255.255.255.0 # Netmask
gateway: 10.0.2.1 # Gateway
dns: 8.8.8.8 # DNS
subnet: 10.0.2.0 # Subnet mask
default_lease_time: 21600 # Subnet Default lease time - The default is used if this is not defined
max_lease_time: 43200 # Subnet Max lease time - The default is used if this is not defined
tftp_boot_path: /pxelinux.0 # Path for tftp of where to boot from first - The default is used if this is not defined
tftp_server: "{{ tftp_server }}" # The server hosting the TFTP server - The default is used if this is not defined
dhcp_default_domain_name: openstackci.local
############### DHCP ###############
############### KVM ###############
############### KVM ###############