General improvements
* added ip alias for interfaces * Update settings and improve vm performance * Change the VG name in VMs. The VG name was changed so that the volume which is being used by VMs can be mounted on a physical host, and not conflict, with standard volume group naming. This is usful when a VM is DOA and a deployer wants to disect the instance. Change-Id: If4d10165fe08f82400772ca88f8490b01bad5cf8 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
eb5debbdbb
commit
c678e83275
@ -59,10 +59,14 @@
|
|||||||
command: cat /root/.ssh/id_rsa.pub
|
command: cat /root/.ssh/id_rsa.pub
|
||||||
register: public_key_get
|
register: public_key_get
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- tftp_ssh_key is undefined
|
||||||
|
|
||||||
- name: Set key facts
|
- name: Set key facts
|
||||||
set_fact:
|
set_fact:
|
||||||
tftp_ssh_key: "{{ public_key_get.stdout }}"
|
tftp_ssh_key: "{{ public_key_get.stdout }}"
|
||||||
|
when:
|
||||||
|
- tftp_ssh_key is undefined
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Drop NGINX config
|
- name: Drop NGINX config
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: VM Servers group
|
- name: VM Servers group
|
||||||
add_host:
|
add_host:
|
||||||
name: "{{ hostvars[item]['server_vm_fixed_addr'] }}"
|
name: "{{ item }}"
|
||||||
groups: vm_servers
|
groups: vm_servers
|
||||||
when:
|
when:
|
||||||
- hostvars[item]['server_vm'] | default(false) | bool
|
- hostvars[item]['server_vm'] | default(false) | bool
|
||||||
@ -115,9 +115,9 @@
|
|||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
with_items:
|
with_items:
|
||||||
- src: /root/.ssh/id_rsa
|
- src: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa"
|
||||||
dest: /root/.ssh/id_rsa
|
dest: /root/.ssh/id_rsa
|
||||||
- src: /root/.ssh/id_rsa.pub
|
- src: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
|
||||||
dest: /root/.ssh/id_rsa.pub
|
dest: /root/.ssh/id_rsa.pub
|
||||||
|
|
||||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||||
@ -142,7 +142,7 @@
|
|||||||
|
|
||||||
- name: Remove deleteme lv
|
- name: Remove deleteme lv
|
||||||
lvol:
|
lvol:
|
||||||
vg: vg00
|
vg: vmvg00
|
||||||
lv: lxc00
|
lv: lxc00
|
||||||
force: true
|
force: true
|
||||||
state: absent
|
state: absent
|
||||||
@ -159,7 +159,7 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Create cinder-volumes lv
|
- name: Create cinder-volumes lv
|
||||||
lvol:
|
lvol:
|
||||||
vg: vg00
|
vg: vmvg00
|
||||||
lv: cinder-volumes00
|
lv: cinder-volumes00
|
||||||
size: "100%FREE"
|
size: "100%FREE"
|
||||||
shrink: false
|
shrink: false
|
||||||
@ -167,7 +167,7 @@
|
|||||||
- name: Create data cinder-volumes group
|
- name: Create data cinder-volumes group
|
||||||
lvg:
|
lvg:
|
||||||
vg: cinder-volumes
|
vg: cinder-volumes
|
||||||
pvs: "/dev/vg00/cinder-volumes00"
|
pvs: "/dev/vmvg00/cinder-volumes00"
|
||||||
|
|
||||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||||
|
|
||||||
@ -181,7 +181,7 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Remove deleteme lv
|
- name: Remove deleteme lv
|
||||||
lvol:
|
lvol:
|
||||||
vg: vg00
|
vg: vmvg00
|
||||||
lv: "{{ item }}"
|
lv: "{{ item }}"
|
||||||
size: 4G
|
size: 4G
|
||||||
with_items:
|
with_items:
|
||||||
@ -192,7 +192,7 @@
|
|||||||
- name: Format swift drives
|
- name: Format swift drives
|
||||||
filesystem:
|
filesystem:
|
||||||
fstype: xfs
|
fstype: xfs
|
||||||
dev: "/dev/vg00/{{ item }}"
|
dev: "/dev/vmvg00/{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- disk1
|
- disk1
|
||||||
- disk2
|
- disk2
|
||||||
@ -213,7 +213,7 @@
|
|||||||
- name: Mount swift drives
|
- name: Mount swift drives
|
||||||
mount:
|
mount:
|
||||||
name: "/srv/{{ item }}"
|
name: "/srv/{{ item }}"
|
||||||
src: "/dev/mapper/vg00-{{ item }}"
|
src: "/dev/mapper/vmvg00-{{ item }}"
|
||||||
fstype: xfs
|
fstype: xfs
|
||||||
state: mounted
|
state: mounted
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
default_interface: "{{ default_network | default('eth0') }}"
|
default_interface: "{{ default_network | default('eth0') }}"
|
||||||
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
|
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
|
||||||
default_vm_storage: "{{ vm_disk_size | default(92160) }}"
|
default_vm_storage: "{{ vm_disk_size | default(92160) }}"
|
||||||
|
default_acng_bind_address: 0.0.0.0
|
||||||
default_os_families:
|
default_os_families:
|
||||||
ubuntu-16.04-amd64: debian
|
ubuntu-16.04-amd64: debian
|
||||||
ubuntu-14.04-amd64: debian
|
ubuntu-14.04-amd64: debian
|
||||||
@ -24,7 +24,7 @@ default_ubuntu_mirror_hostname: archive.ubuntu.com
|
|||||||
default_ubuntu_mirror_directory: /ubuntu
|
default_ubuntu_mirror_directory: /ubuntu
|
||||||
|
|
||||||
# IP address, or domain name of the TFTP server
|
# IP address, or domain name of the TFTP server
|
||||||
tftp_server: "{{ ansible_host }}"
|
tftp_server: "{{ hostvars[groups['pxe_hosts'][0]]['ansible_host'] | default(ansible_host) }}"
|
||||||
# tftp_ssh_key: '' # user defined ssh key, used to access the host
|
# tftp_ssh_key: '' # user defined ssh key, used to access the host
|
||||||
tftp_port: 69
|
tftp_port: 69
|
||||||
|
|
||||||
@ -74,6 +74,8 @@ mnaio_host_networks:
|
|||||||
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
|
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
|
||||||
address: '10.0.2.1/22' # str - not required, must be in CIDR format
|
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
|
iface_port: none # str - required, physical port used within a host bridge
|
||||||
|
address_aliases: # list - not required, items must be sting and in CIDR format
|
||||||
|
- '10.0.2.2/22'
|
||||||
mgmt:
|
mgmt:
|
||||||
iface: 'vm-br-eth1'
|
iface: 'vm-br-eth1'
|
||||||
inet_type: 'static'
|
inet_type: 'static'
|
||||||
@ -90,11 +92,11 @@ mnaio_host_networks:
|
|||||||
iface_port: none
|
iface_port: none
|
||||||
vxlan:
|
vxlan:
|
||||||
iface: 'vm-br-eth4'
|
iface: 'vm-br-eth4'
|
||||||
inet_type: 'manual'
|
inet_type: 'static'
|
||||||
address: '10.0.240.1/22'
|
address: '10.0.240.1/22'
|
||||||
iface_port: none
|
iface_port: none
|
||||||
storage:
|
storage:
|
||||||
iface: 'vm-br-eth5'
|
iface: 'vm-br-eth5'
|
||||||
inet_type: 'manual'
|
inet_type: 'static'
|
||||||
address: '10.0.244.1/22'
|
address: '10.0.244.1/22'
|
||||||
iface_port: none
|
iface_port: none
|
||||||
|
@ -48,11 +48,11 @@ server_networks: # dict - required, hash of networks, can
|
|||||||
vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM
|
vm_int_iface: vm-br-eth3 # str - not Required, used to specify an integration networks interface when provisioning a VM
|
||||||
vxlan:
|
vxlan:
|
||||||
iface: 'eth4' # str - required, interface name
|
iface: 'eth4' # str - required, interface name
|
||||||
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
|
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
|
||||||
address: '10.0.240.100/22' # str - not required, must be in CIDR format
|
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
|
vm_int_iface: vm-br-eth4 # str - not Required, used to specify an integration networks interface when provisioning a VM
|
||||||
storage:
|
storage:
|
||||||
iface: 'eth5' # str - required, interface name
|
iface: 'eth5' # str - required, interface name
|
||||||
inet_type: 'manual' # str - required, iface type [static, dhcp, manual]
|
inet_type: 'static' # str - required, iface type [static, dhcp, manual]
|
||||||
address: '10.0.244.100/22' # str - not required, must be in CIDR format
|
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
|
vm_int_iface: vm-br-eth5 # str - not Required, used to specify an integration networks interface when provisioning a VM
|
||||||
|
@ -15,8 +15,17 @@ iface {{ value.iface }} inet {{ value.inet_type }}
|
|||||||
bridge_fd 0
|
bridge_fd 0
|
||||||
bridge_ports {{ value.iface_port }}
|
bridge_ports {{ value.iface_port }}
|
||||||
offload-sg off
|
offload-sg off
|
||||||
{% if value.address is defined %}
|
{% if value.address is defined %}
|
||||||
address {{ value.address }}
|
address {{ value.address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if value.address_aliases is defined %}
|
||||||
|
{% for addr in value.address_aliases %}
|
||||||
|
auto {{ value.iface }}
|
||||||
|
iface {{ value.iface }} inet static
|
||||||
|
address {{ addr }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
CacheDir: /var/www/pkg-cache
|
CacheDir: /var/www/pkg-cache
|
||||||
LogDir: /var/log/apt-cacher-ng
|
LogDir: /var/log/apt-cacher-ng
|
||||||
Port: 3142
|
Port: 3142
|
||||||
BindAddress: 10.0.2.1
|
BindAddress: {{ default_acng_bind_address }}
|
||||||
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
|
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
|
||||||
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
|
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
|
||||||
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol # Debian Volatile Archives
|
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol # Debian Volatile Archives
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Use the following option to add additional boot parameters for the
|
# Use the following option to add additional boot parameters for the
|
||||||
# installed system (if supported by the bootloader installer).
|
# installed system (if supported by the bootloader installer).
|
||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0
|
d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 elevator=cfq
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
d-i netcfg/choose_interface select eth0
|
d-i netcfg/choose_interface select eth0
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Use the following option to add additional boot parameters for the
|
# Use the following option to add additional boot parameters for the
|
||||||
# installed system (if supported by the bootloader installer).
|
# installed system (if supported by the bootloader installer).
|
||||||
# Note: options passed to the installer will be added automatically.
|
# Note: options passed to the installer will be added automatically.
|
||||||
d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0
|
d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 elevator=noop
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
d-i netcfg/choose_interface select eth0
|
d-i netcfg/choose_interface select eth0
|
||||||
@ -96,7 +96,7 @@ d-i partman-auto/disk string /dev/vda
|
|||||||
# For LVM partitioning, you can select how much of the volume group to use
|
# For LVM partitioning, you can select how much of the volume group to use
|
||||||
# for logical volumes.
|
# for logical volumes.
|
||||||
d-i partman-auto-lvm/guided_size string max
|
d-i partman-auto-lvm/guided_size string max
|
||||||
d-i partman-auto-lvm/new_vg_name string vg00
|
d-i partman-auto-lvm/new_vg_name string vmvg00
|
||||||
|
|
||||||
d-i partman-auto/choose_recipe select custompartitioning
|
d-i partman-auto/choose_recipe select custompartitioning
|
||||||
d-i partman-auto/expert_recipe string \
|
d-i partman-auto/expert_recipe string \
|
||||||
@ -113,15 +113,15 @@ d-i partman-auto/expert_recipe string \
|
|||||||
$primary{ } \
|
$primary{ } \
|
||||||
method{ lvm } \
|
method{ lvm } \
|
||||||
device{ /dev/vda2 } \
|
device{ /dev/vda2 } \
|
||||||
vg_name{ vg00 } \
|
vg_name{ vmvg00 } \
|
||||||
. \
|
. \
|
||||||
2048 1 4096 linux-swap \
|
2048 1 4096 linux-swap \
|
||||||
$lvmok{ } in_vg{ vg00 } \
|
$lvmok{ } in_vg{ vmvg00 } \
|
||||||
lv_name{ swap00 } \
|
lv_name{ swap00 } \
|
||||||
method{ swap } format{ } \
|
method{ swap } format{ } \
|
||||||
. \
|
. \
|
||||||
8192 1 16384 ext4 \
|
8192 1 16384 ext4 \
|
||||||
$lvmok{ } in_vg{ vg00 } \
|
$lvmok{ } in_vg{ vmvg00 } \
|
||||||
lv_name{ root00 } \
|
lv_name{ root00 } \
|
||||||
method{ format } format{ } \
|
method{ format } format{ } \
|
||||||
use_filesystem{ } filesystem{ ext4 } \
|
use_filesystem{ } filesystem{ ext4 } \
|
||||||
@ -129,7 +129,7 @@ d-i partman-auto/expert_recipe string \
|
|||||||
mountpoint{ / } \
|
mountpoint{ / } \
|
||||||
. \
|
. \
|
||||||
16384 1 16384 ext4 \
|
16384 1 16384 ext4 \
|
||||||
$lvmok{ } in_vg{ vg00 } \
|
$lvmok{ } in_vg{ vmvg00 } \
|
||||||
lv_name{ openstack00 } \
|
lv_name{ openstack00 } \
|
||||||
method{ format } format{ } \
|
method{ format } format{ } \
|
||||||
use_filesystem{ } filesystem{ ext4 } \
|
use_filesystem{ } filesystem{ ext4 } \
|
||||||
@ -137,7 +137,7 @@ d-i partman-auto/expert_recipe string \
|
|||||||
mountpoint{ /openstack } \
|
mountpoint{ /openstack } \
|
||||||
. \
|
. \
|
||||||
4096 1 8192 btrfs \
|
4096 1 8192 btrfs \
|
||||||
$lvmok{ } in_vg{ vg00 } \
|
$lvmok{ } in_vg{ vmvg00 } \
|
||||||
lv_name{ machines00 } \
|
lv_name{ machines00 } \
|
||||||
method{ format } format{ } \
|
method{ format } format{ } \
|
||||||
use_filesystem{ } filesystem{ btrfs } \
|
use_filesystem{ } filesystem{ btrfs } \
|
||||||
@ -145,7 +145,7 @@ d-i partman-auto/expert_recipe string \
|
|||||||
mountpoint{ /var/lib/machines } \
|
mountpoint{ /var/lib/machines } \
|
||||||
. \
|
. \
|
||||||
8192 1 10240000 ext4 \
|
8192 1 10240000 ext4 \
|
||||||
$lvmok{ } in_vg{ vg00 } \
|
$lvmok{ } in_vg{ vmvg00 } \
|
||||||
lv_name{ lxc00 } \
|
lv_name{ lxc00 } \
|
||||||
method{ format } format{ } \
|
method{ format } format{ } \
|
||||||
use_filesystem{ } filesystem{ ext4 } \
|
use_filesystem{ } filesystem{ ext4 } \
|
||||||
|
Loading…
Reference in New Issue
Block a user