From 1ece2ac0603d789ec650245639c356aef9d616c4 Mon Sep 17 00:00:00 2001 From: Shannon Mitchell Date: Mon, 19 Feb 2018 10:06:58 -0600 Subject: [PATCH] Adds ability to modify vcpu count and add custom ansible params. This change allows someone to modify the vcpu count settings similar to how the ram is currently done. It also allows for custom ansible parameters via an MNAIO_ANSIBLE_PARAMETERS var to add custom ansible parameters for the vpcu overrides as well as other settings. Change-Id: I3c1fa7b55a87931eff586c0e983bb9b8c6f34fc3 Closes-Bug: 1750402 --- multi-node-aio/build.sh | 1 + multi-node-aio/playbooks/host_vars/cinder1.yml | 2 +- multi-node-aio/playbooks/host_vars/cinder2.yml | 2 +- multi-node-aio/playbooks/host_vars/compute1.yml | 2 +- multi-node-aio/playbooks/host_vars/compute2.yml | 2 +- multi-node-aio/playbooks/host_vars/infra1.yml | 2 +- multi-node-aio/playbooks/host_vars/infra2.yml | 2 +- multi-node-aio/playbooks/host_vars/infra3.yml | 2 +- multi-node-aio/playbooks/host_vars/loadbalancer1.yml | 2 +- multi-node-aio/playbooks/host_vars/logging1.yml | 2 +- multi-node-aio/playbooks/host_vars/swift1.yml | 2 +- multi-node-aio/playbooks/host_vars/swift2.yml | 2 +- multi-node-aio/playbooks/host_vars/swift3.yml | 2 +- 13 files changed, 13 insertions(+), 12 deletions(-) diff --git a/multi-node-aio/build.sh b/multi-node-aio/build.sh index a447a558..a12e8c76 100755 --- a/multi-node-aio/build.sh +++ b/multi-node-aio/build.sh @@ -52,5 +52,6 @@ ansible-playbook -vv \ -e container_tech=${CONTAINER_TECH-"lxc"} \ -e ipxe_kernel_url=${IPXE_KERNEL_URL:-"http://boot.ipxe.org/ipxe.lkrn"} \ -e ipxe_path_url=${IPXE_PATH_URL:-""} \ + ${MNAIO_ANSIBLE_PARAMETERS:-""} \ --force-handlers \ playbooks/site.yml diff --git a/multi-node-aio/playbooks/host_vars/cinder1.yml b/multi-node-aio/playbooks/host_vars/cinder1.yml index 6a8e0cd4..c8276c4d 100644 --- a/multi-node-aio/playbooks/host_vars/cinder1.yml +++ b/multi-node-aio/playbooks/host_vars/cinder1.yml @@ -19,7 +19,7 @@ server_hostname: 'cinder1' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ cinder_vm_server_ram | default(2048) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ cinder_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.130' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/cinder2.yml b/multi-node-aio/playbooks/host_vars/cinder2.yml index 34c72ba1..60edea40 100644 --- a/multi-node-aio/playbooks/host_vars/cinder2.yml +++ b/multi-node-aio/playbooks/host_vars/cinder2.yml @@ -19,7 +19,7 @@ server_hostname: 'cinder2' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ cinder_vm_server_ram | default(2048) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ cinder_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.131' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/compute1.yml b/multi-node-aio/playbooks/host_vars/compute1.yml index 48418799..e5cbb180 100644 --- a/multi-node-aio/playbooks/host_vars/compute1.yml +++ b/multi-node-aio/playbooks/host_vars/compute1.yml @@ -19,7 +19,7 @@ server_hostname: 'compute1' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ compute_vm_server_ram | default(8192) }}' -server_vm_vcpus: 4 +server_vm_vcpus: '{{ compute_vm_server_vcpus | default(4) }}' server_vm_fixed_addr: '10.0.2.120' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/compute2.yml b/multi-node-aio/playbooks/host_vars/compute2.yml index 1e2f2ab4..26150b6a 100644 --- a/multi-node-aio/playbooks/host_vars/compute2.yml +++ b/multi-node-aio/playbooks/host_vars/compute2.yml @@ -19,7 +19,7 @@ server_hostname: 'compute2' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ compute_vm_server_ram | default(8192) }}' -server_vm_vcpus: 4 +server_vm_vcpus: '{{ compute_vm_server_vcpus | default(4) }}' server_vm_fixed_addr: '10.0.2.121' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/infra1.yml b/multi-node-aio/playbooks/host_vars/infra1.yml index 1ec5245f..58900182 100644 --- a/multi-node-aio/playbooks/host_vars/infra1.yml +++ b/multi-node-aio/playbooks/host_vars/infra1.yml @@ -19,7 +19,7 @@ server_hostname: 'infra1' # str - required, h server_domain_name: 'openstack.local' # str - required, domain name of server server_vm: true # bool - not required, used to specify a host is to become a VM server_vm_ram: '{{ infra_vm_server_ram | default(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_vcpus: '{{ infra_vm_server_vcpus | default(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 diff --git a/multi-node-aio/playbooks/host_vars/infra2.yml b/multi-node-aio/playbooks/host_vars/infra2.yml index 461134ee..8c0bde26 100644 --- a/multi-node-aio/playbooks/host_vars/infra2.yml +++ b/multi-node-aio/playbooks/host_vars/infra2.yml @@ -19,7 +19,7 @@ server_hostname: 'infra2' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ infra_vm_server_ram | default(8192) }}' -server_vm_vcpus: 4 +server_vm_vcpus: '{{ infra_vm_server_vcpus | default(4) }}' server_vm_fixed_addr: '10.0.2.101' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/infra3.yml b/multi-node-aio/playbooks/host_vars/infra3.yml index da666065..c553d62e 100644 --- a/multi-node-aio/playbooks/host_vars/infra3.yml +++ b/multi-node-aio/playbooks/host_vars/infra3.yml @@ -19,7 +19,7 @@ server_hostname: 'infra3' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ infra_vm_server_ram | default(8192) }}' -server_vm_vcpus: 4 +server_vm_vcpus: '{{ infra_vm_server_vcpus | default(4) }}' server_vm_fixed_addr: '10.0.2.102' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/loadbalancer1.yml b/multi-node-aio/playbooks/host_vars/loadbalancer1.yml index 7afcff99..bfe1867a 100644 --- a/multi-node-aio/playbooks/host_vars/loadbalancer1.yml +++ b/multi-node-aio/playbooks/host_vars/loadbalancer1.yml @@ -19,7 +19,7 @@ server_hostname: 'loadbalancer1' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ loadbalancer_vm_server_ram | default(1024) }}' -server_vm_vcpus: 1 +server_vm_vcpus: '{{ loadbalancer_vm_server_vcpus | default(1) }}' server_vm_fixed_addr: '10.0.2.150' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/logging1.yml b/multi-node-aio/playbooks/host_vars/logging1.yml index d8075f42..0d372170 100644 --- a/multi-node-aio/playbooks/host_vars/logging1.yml +++ b/multi-node-aio/playbooks/host_vars/logging1.yml @@ -19,7 +19,7 @@ server_hostname: 'logging1' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ logging_vm_server_ram | default(1024) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ loadbalancer_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.110' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/swift1.yml b/multi-node-aio/playbooks/host_vars/swift1.yml index ed147ef1..48690527 100644 --- a/multi-node-aio/playbooks/host_vars/swift1.yml +++ b/multi-node-aio/playbooks/host_vars/swift1.yml @@ -19,7 +19,7 @@ server_hostname: 'swift1' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ swift_vm_server_ram | default(1024) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ swift_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.140' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/swift2.yml b/multi-node-aio/playbooks/host_vars/swift2.yml index 1108886c..e9f80fde 100644 --- a/multi-node-aio/playbooks/host_vars/swift2.yml +++ b/multi-node-aio/playbooks/host_vars/swift2.yml @@ -19,7 +19,7 @@ server_hostname: 'swift2' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ swift_vm_server_ram | default(1024) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ swift_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.141' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}" diff --git a/multi-node-aio/playbooks/host_vars/swift3.yml b/multi-node-aio/playbooks/host_vars/swift3.yml index f53130be..46fd951c 100644 --- a/multi-node-aio/playbooks/host_vars/swift3.yml +++ b/multi-node-aio/playbooks/host_vars/swift3.yml @@ -19,7 +19,7 @@ server_hostname: 'swift3' server_domain_name: 'openstack.local' server_vm: true server_vm_ram: '{{ swift_vm_server_ram | default(1024) }}' -server_vm_vcpus: 2 +server_vm_vcpus: '{{ swift_vm_server_vcpus | default(2) }}' server_vm_fixed_addr: '10.0.2.142' server_vm_primary_network: 'dhcp' server_image: "{{ default_vm_image }}"