Merge "Update mnaio to allow deployers to use nspawn"

This commit is contained in:
Zuul 2018-02-15 12:24:46 +00:00 committed by Gerrit Code Review
commit d16deb8cb2
4 changed files with 35 additions and 0 deletions

View File

@ -24,6 +24,8 @@ default_ubuntu_mirror_proxy: 'http://10.0.2.1:3142/'
default_ubuntu_mirror_hostname: archive.ubuntu.com
default_ubuntu_mirror_directory: /ubuntu
default_container_tech: "{{ container_tech | default('lxc') }}"
ipxe_kernel_url: "{{ ipxe_kernel_url | default('http://boot.ipxe.org/ipxe.lkrn') }}"
# IP address, or domain name of the TFTP server

View File

@ -91,6 +91,7 @@ cinder_block: &cinder_block
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
cinder_backends:
limit_container_types: cinder_volume
lvm:
@ -105,6 +106,8 @@ compute_block: &compute_block
{% for host in groups['compute_hosts'] %}
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
{% endfor %}
@ -112,6 +115,8 @@ infra_block: &infra_block
{% for host in groups['infra_hosts'] %}
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
{% endfor %}
@ -119,6 +124,8 @@ loadbalancer_block: &loadbalancer_block
{% for host in groups['loadbalancer_hosts'] %}
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
{% endfor %}
@ -126,6 +133,8 @@ log_block: &log_block
{% for host in groups['log_hosts'] %}
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
{% endfor %}
@ -133,6 +142,8 @@ swift_block: &swift_block
{% for host in groups['swift_hosts'] %}
{{ hostvars[host]['server_hostname'] }}:
ip: {{ hostvars[host]['server_networks']['mgmt']['address'].split('/')[0] }}
container_vars:
container_tech: "{{ default_container_tech }}"
{% endfor %}

View File

@ -135,6 +135,16 @@ d-i partman-auto/expert_recipe string \
label{ openstack } \
mountpoint{ /openstack } \
. \
{% if default_container_tech == 'nspawn' %}
8192 1 24576 btrfs \
$lvmok{ } in_vg{ vg00 } \
lv_name{ machines00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ btrfs } \
label{ machines } \
mountpoint{ /var/lib/machines } \
. \
{% elif default_container_tech == 'lxc' %}
4096 1 8192 btrfs \
$lvmok{ } in_vg{ vg00 } \
lv_name{ machines00 } \
@ -151,6 +161,7 @@ d-i partman-auto/expert_recipe string \
label{ lxc } \
mountpoint{ /var/lib/lxc } \
. \
{% endif %}
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.

View File

@ -135,6 +135,16 @@ d-i partman-auto/expert_recipe string \
label{ openstack } \
mountpoint{ /openstack } \
. \
{% if default_container_tech == 'nspawn' %}
8192 1 24576 btrfs \
$lvmok{ } in_vg{ vmvg00 } \
lv_name{ machines00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ btrfs } \
label{ machines } \
mountpoint{ /var/lib/machines } \
. \
{% elif default_container_tech == 'lxc' %}
4096 1 8192 btrfs \
$lvmok{ } in_vg{ vmvg00 } \
lv_name{ machines00 } \
@ -151,6 +161,7 @@ d-i partman-auto/expert_recipe string \
label{ lxc } \
mountpoint{ /var/lib/lxc } \
. \
{% endif %}
# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.