Skip to content

Commit

Permalink
Launch the test VM off a hugepages-enabled flavor
Browse files Browse the repository at this point in the history
Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Nov 5, 2024
1 parent 4475903 commit 9e49026
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs_dev/assemblies/development_environment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ To use Wallaby content instead, run the following:
[,bash]
----
cd ~/install_yamls/devsetup
make standalone
EDPM_CONFIGURE_HUGEPAGES=false make standalone <1>
----
<1> To configure the host for a simplistic hugepages setup, set `EDPM_CONFIGURE_HUGEPAGES=true`.

To deploy using TLS everywhere enabled, instead run:

Expand Down Expand Up @@ -229,9 +230,11 @@ Create a test VM instance with a test volume attachement:
[,bash]
----
cd ~/data-plane-adoption
EDPM_CONFIGURE_HUGEPAGES=false <1>
OS_CLOUD_IP=192.168.122.100 OS_CLOUD_NAME=standalone \
bash tests/roles/development_environment/files/pre_launch.bash
----
<1> To configure a flavor with hugepages set `EDPM_CONFIGURE_HUGEPAGES=true`.

This also creates a test Cinder volume, a backup from it, and a snapshot of it.

Expand Down
1 change: 1 addition & 0 deletions tests/roles/development_environment/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ edpm_privatekey_path: ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa
run_pre_adoption_validation: true
os_cloud_name: standalone
source_osp_ssh_user: root
use_hugepages: false
# override var for openstack command to use on the source cloud
openstack_command: >-
ssh -i {{ edpm_privatekey_path }} -o StrictHostKeyChecking=no {{ source_osp_ssh_user }}@{{ standalone_ip | default(edpm_node_ip) }} OS_CLOUD={{ os_cloud_name }} openstack
6 changes: 5 additions & 1 deletion tests/roles/development_environment/files/pre_launch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ ${BASH_ALIASES[openstack]} image show cirros || \
${BASH_ALIASES[openstack]} image create --container-format bare --disk-format $DISK_FORMAT cirros < /tmp/$RAW

# Create flavor
HPARGS=" "
if [ "${EDPM_CONFIGURE_HUGEPAGES:-false}" = "true" ] ; then
HPARGS="set huge_pages --property hw:mem_page_size=2MB"
fi
${BASH_ALIASES[openstack]} flavor show m1.small || \
${BASH_ALIASES[openstack]} flavor create --ram 512 --vcpus 1 --disk 1 --ephemeral 1 m1.small
${BASH_ALIASES[openstack]} flavor create $HPARGS --ram 512 --vcpus 1 --disk 1 --ephemeral 1 m1.small

# Create networks
${BASH_ALIASES[openstack]} network show private || ${BASH_ALIASES[openstack]} network create private --share
Expand Down
1 change: 1 addition & 0 deletions tests/roles/development_environment/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
cmd: |
{{ shell_header }}
export OPENSTACK_COMMAND="{{ openstack_command }}"
export EDPM_CONFIGURE_HUGEPAGES="{{ use_hugepages | string | lower }}"
{{ lookup('ansible.builtin.file', prelaunch_test_instance_script) }}
- name: creates Barbican secret
Expand Down

0 comments on commit 9e49026

Please sign in to comment.