From 75ac413026248dd7837c77a07ba5364db6119a53 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Tue, 8 Sep 2015 17:18:57 -0400 Subject: [PATCH] Allow Test VM RAM setting to be tunable Due to the debian + simple-init image size, which is not a small image, we need to support having slightly larger guest VMs in order to allow for the image to be downloaded to the guest VM. Add tunable setting, and default the image build test job to create a VM with 4096 MB of RAM instead of 3072 MB. Change-Id: Ifdccb32035fa91fe8d8200c3090973c34d453801 --- playbooks/roles/bifrost-create-vm-nodes/README.md | 6 ++++++ playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml | 1 + playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml | 1 + scripts/test-bifrost-build-images.sh | 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-create-vm-nodes/README.md b/playbooks/roles/bifrost-create-vm-nodes/README.md index 785ee432b..8a691da1c 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/README.md +++ b/playbooks/roles/bifrost-create-vm-nodes/README.md @@ -18,6 +18,12 @@ Role Variables baremetal_csv_file: "/tmp/baremetal.csv" +test_vm_memory_size: Tunable setting to allow a user to define a specific + amount of RAM to allocate to guest/test VMs. Defaults + to "3072". Note: if this setting is modified between + test runs, you may need to undefine the test virtual + machine(s) that were previously created. + Dependencies ------------ diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml index 3a5a37d6a..88891df7f 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/main.yml @@ -1,3 +1,4 @@ --- # defaults file for bifrost-create-vm-nodes baremetal_csv_file: "/tmp/baremetal.csv" +test_vm_memory_size: "3072" diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index d02db8677..954089152 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -41,6 +41,7 @@ script: create_vm_nodes-for-role.sh environment: NODEOUTPUT: "{{baremetal_csv_file}}" + VM_RAM: "{{ test_vm_memory_size }}" register: task_create_vm_nodes ignore_errors: yes delegate_to: localhost diff --git a/scripts/test-bifrost-build-images.sh b/scripts/test-bifrost-build-images.sh index 87a92812c..262294ec3 100755 --- a/scripts/test-bifrost-build-images.sh +++ b/scripts/test-bifrost-build-images.sh @@ -24,7 +24,8 @@ ansible-playbook -vvvv -i inventory/localhost test-bifrost-create-vm.yaml --synt ansible-playbook -vvvv -i inventory/localhost test-bifrost-dynamic.yaml --syntax-check --list-tasks # Create the test VM -ansible-playbook -vvvv -i inventory/localhost test-bifrost-create-vm.yaml +ansible-playbook -vvvv -i inventory/localhost test-bifrost-create-vm.yaml \ + -e test_vm_memory_size="4096" set +e