Make lampstack work in config drive environments

Currently, the lampstack workload assumes that either you're using the
nova metadata service or that config drive is enabled globally in
your nova.conf file: there's no option to enable it on a per-environment
basis.  This patch adds the ability to specify whether config_drive
should be used or not in the app_env variables, with a default value
set to "no" (which means that the new variable isn't required and that
if a user doesn't set it, he or she will get the same behavior as before
this patch).

Change-Id: I717bf5a37f98da79141af70df90feb7fd7b3f8c7
This commit is contained in:
Mark T. Voelker 2016-10-14 12:00:22 -04:00
parent f426660f75
commit ad24dc3e86
2 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,7 @@ You may create one such file per cloud for your tests.
stack_size: 4,
volume_size: 2,
block_device_name: "/dev/vdb",
config_drive: no,
wp_theme: "https://downloads.wordpress.org/theme/iribbon.2.0.65.zip",
wp_posts: "http://wpcandy.s3.amazonaws.com/resources/postsxml.zip"
}

View File

@ -78,6 +78,7 @@
network: "{{ app_env.private_net_name }}"
auto_ip: yes
userdata: "{{ lookup('file', 'templates/userdata.j2') }}"
config_drive: "{{ app_env.config_drive | default('no') }}"
security_groups: lampstack_sg
meta:
hostname: database
@ -110,6 +111,7 @@
network: "{{ app_env.private_net_name }}"
auto_ip: yes
userdata: "{{ lookup('file', 'templates/userdata.j2') }}"
config_drive: "{{ app_env.config_drive | default('no') }}"
security_groups: lampstack_sg
meta:
hostname: balancer
@ -153,6 +155,7 @@
network: "{{ app_env.private_net_name }}"
auto_ip: yes
userdata: "{{ lookup('file', 'templates/userdata.j2') }}"
config_drive: "{{ app_env.config_drive | default('no') }}"
security_groups: lampstack_sg
meta:
hostname: apache-{{ item }}