move deploy node to infra1 and make a LB node

Sadly the log node does not have enough ram to run a full ansible run.
Ansible 2.x requires more ram than one would expect, especially when the
inventory gets large. this change moves the deploy node to infra1 as it
will already have the ram needed to run the playbooks. Additionally the
container storage for infra nodes was too small which forces builds into
error. The default storage for VMs has been set to 90GiB each and the
preseed will create a logical volume for VMs mounted at /var/lib/lxc.

While the limited ram works well for the VMs and within a running
deployment of OSA, ansible-playbook is subject to crash like so:

  An exception occurred during task execution. To see the full traceback,
  use -vvv. The error was: OSError: [Errno 12] Cannot allocate memory
  fatal: [infra1_cinder_api_container-b38b47ea]: FAILED! =>
  {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}

So infra nodes have had the memory constraint raised to 8GiB

Change-Id: I7175ea92f663dfef5966532cfc0b4beaadb9eb03
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-07-28 20:46:22 -05:00
parent 3f17e2b5db
commit 9abaeba8c8
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
9 changed files with 109 additions and 62 deletions

@ -19,7 +19,8 @@ source bootstrap.sh
source ansible-env.rc
ansible-playbook -i playbooks/inventory \
ansible-playbook -vv \
-i playbooks/inventory \
-e setup_host=${SETUP_HOST:-"true"} \
-e setup_pxeboot=${SETUP_PXEBOOT:-"true"} \
-e setup_dhcpd=${SETUP_DHCPD:-"true"} \
@ -28,7 +29,7 @@ ansible-playbook -i playbooks/inventory \
-e osa_branch=${OSA_BRANCH:-"master"} \
-e default_network=${DEFAULT_NETWORK:-"eth0"} \
-e default_image=${DEFAULT_IMAGE:-"ubuntu-16.04-amd64"} \
-e vm_disk_size=${VM_DISK_SIZE:-61440} \
-e vm_disk_size=${VM_DISK_SIZE:-92160} \
-e http_proxy=${http_proxy:-''} \
-e run_osa=${RUN_OSA:-"true"} \
-e pre_config_osa=${PRE_CONFIG_OSA:-"true"} \

@ -13,6 +13,28 @@
# 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
@ -35,7 +57,7 @@
- deploy-osa
- name: Setup cinder host volume
- name: Setup swift host volume
hosts: swift_hosts
gather_facts: false
tasks:

@ -103,28 +103,6 @@
- src: /root/.ssh/id_rsa.pub
dest: /root/.ssh/id_rsa.pub
- name: un-mount deleteme mount
mount:
name: "/deleteme"
state: unmounted
- name: remote deleteme mount
mount:
name: "/deleteme"
state: absent
- name: Remove deleteme dir
file:
path: "/deleteme"
state: absent
- name: Remove deleteme lv
lvol:
vg: vg00
lv: deleteme00
force: true
state: absent
vars_files:
- vars/main.yml
tags:

@ -13,6 +13,7 @@ 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
[pxe_hosts]
mnaio1
@ -24,7 +25,7 @@ mnaio1
mnaio1
[deploy_hosts]
log1
infra1
[swift_hosts]
swift1

@ -2,9 +2,10 @@
<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) %}
{% set vcpus = (item.server_vm_vcpus | int) * vcpus_threads %}
<vcpu placement='static' current='{{ vcpus }}'>{{ vcpus }}</vcpu>
{% set _vcpus_threads = ((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) %}
<vcpu placement='static' current='{{ vcpus | int }}'>{{ vcpus | int }}</vcpu>
<resource>
<partition>/machine</partition>
</resource>
@ -17,7 +18,7 @@
<apic/>
</features>
<cpu mode='host-model'>
<topology sockets='1' cores='{{ item.server_vm_vcpus }}' threads='{{ vcpus_threads }}'/>
<topology sockets='1' cores='{{ item.server_vm_vcpus | int }}' threads='{{ vcpus_threads | int }}'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>

@ -12,8 +12,8 @@ used_ips:
- "10.0.248.0,10.0.248.200"
global_overrides:
internal_lb_vip_address: "10.0.2.110"
external_lb_vip_address: "10.0.236.103"
internal_lb_vip_address: "10.0.236.112"
external_lb_vip_address: "10.0.2.142"
tunnel_bridge: "br-vxlan"
management_bridge: "br-mgmt"
provider_networks:
@ -140,6 +140,11 @@ swift_block: &swift_block
swift1:
ip: 10.0.236.111
loadbalancer_block: &loadbalancer_block
loadbalancer1:
ip: 10.0.236.112
###
### Infrastructure
###
@ -153,9 +158,9 @@ repo-infra_hosts: *infra_block
# rsyslog server
log_hosts: *log_block
# load balancer
haproxy_hosts: *log_block
haproxy_hosts: *loadbalancer_block
###
### OpenStack

@ -112,34 +112,34 @@ d-i partman-auto/choose_recipe select custompartitioning
d-i partman-auto/expert_recipe string \
custompartitioning :: \
1 1 1 free \
$gptonly{ } \
$primary{ } \
$bios_boot{ } \
$gptonly{ } \
$primary{ } \
$bios_boot{ } \
method{ biosgrub } \
. \
256 1 512 raid \
$gptonly{ } \
$lvmignore{ } \
$primary{ } \
$bootable{ } \
$gptonly{ } \
$lvmignore{ } \
$primary{ } \
$bootable{ } \
method{ raid } \
raidid{ 1 } \
. \
204800 1 -1 raid \
$gptonly{ } \
$lvmignore{ } \
$gptonly{ } \
$lvmignore{ } \
method{ raid } \
raidid{ 2 } \
. \
1024 512 400% linux-swap \
$defaultignore{ } \
$lvmok{ } \
$defaultignore{ } \
$lvmok{ } \
method{ swap } \
format{ } \
. \
16384 5000 100% ext4 \
$defaultignore{ } \
$lvmok{ } \
$defaultignore{ } \
$lvmok{ } \
method{ format } \
format{ } \
use_filesystem{ } \
@ -147,8 +147,8 @@ d-i partman-auto/expert_recipe string \
mountpoint{ / } \
. \
81920 1000 100% ext4 \
$defaultignore{ } \
$lvmok{ } \
$defaultignore{ } \
$lvmok{ } \
lv_name{ openstack00 } \
method{ format } \
format{ } \
@ -158,8 +158,8 @@ d-i partman-auto/expert_recipe string \
mountpoint{ /openstack } \
. \
81920 1000 100% btrfs \
$defaultignore{ } \
$lvmok{ } \
$defaultignore{ } \
$lvmok{ } \
lv_name{ machines00 } \
method{ format } \
format{ } \

@ -115,7 +115,7 @@ d-i partman-auto/expert_recipe string \
device{ /dev/vda2 } \
vg_name{ vg00 } \
. \
1024 1 4096 linux-swap \
2048 1 4096 linux-swap \
$lvmok{ } in_vg{ vg00 } \
lv_name{ swap00 } \
method{ swap } format{ } \
@ -136,7 +136,7 @@ d-i partman-auto/expert_recipe string \
label{ openstack } \
mountpoint{ /openstack } \
. \
8192 1 16384 btrfs \
4096 1 8192 btrfs \
$lvmok{ } in_vg{ vg00 } \
lv_name{ machines00 } \
method{ format } format{ } \
@ -144,13 +144,13 @@ d-i partman-auto/expert_recipe string \
label{ machines } \
mountpoint{ /var/lib/machines } \
. \
1024 1 1024000 ext4 \
8192 1 10240000 ext4 \
$lvmok{ } in_vg{ vg00 } \
lv_name{ deleteme00 } \
lv_name{ lxc00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ deleteme } \
mountpoint{ /deleteme } \
label{ lxc } \
mountpoint{ /var/lib/lxc } \
. \
# This makes partman automatically partition without confirmation, provided

@ -2,7 +2,7 @@
############### DEFAULTS ###############
default_interface: "{{ default_network | default('eth0') }}"
default_vm_image: "{{ default_image | default('ubuntu-16.04-amd64') }}"
default_vm_storage: "{{ vm_disk_size | default(61440) }}"
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
@ -138,7 +138,7 @@ pxelinux_short_name: "syslinux-6.03"
# List of servers to create specific mac address bound boot entries.
servers:
- server_hostname: 'infra1' # str - required, hostname of server
server_vm_ram: 6144 # int - not required, used to specify ram when provisioning 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
@ -177,7 +177,7 @@ servers:
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: 6144
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.101'
server_vm_primary_network: 'dhcp'
@ -216,7 +216,7 @@ servers:
address: '10.0.244.101/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'infra3'
server_vm_ram: 6144
server_vm_ram: 8192
server_vm_vcpus: 4
server_vm_fixed_addr: '10.0.2.102'
server_vm_primary_network: 'dhcp'
@ -255,7 +255,7 @@ servers:
address: '10.0.244.102/22'
vm_int_iface: vm-br-eth5
- server_hostname: 'logging1'
server_vm_ram: 2048
server_vm_ram: 1024
server_vm_vcpus: 2
server_vm_fixed_addr: '10.0.2.110'
server_vm_primary_network: 'dhcp'
@ -566,6 +566,45 @@ servers:
inet_type: 'manual'
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: 'manual'
address: '10.0.240.112/22'
vm_int_iface: vm-br-eth4
storage:
iface: 'eth5'
inet_type: 'manual'
address: '10.0.244.112/22'
vm_int_iface: vm-br-eth5
############### SERVERS ###############