Add posibility to run tempest as one of the steps
We add config option CONFIG_RUN_TEMPEST and we'll run tempest smoke test after running puppet in postscript. Change-Id: Iaedf300da50a1eedb11c94686617a0c95c812184
This commit is contained in:
parent
8514064307
commit
3c034fdc11
|
@ -983,8 +983,8 @@ Provisioning tempest config
|
|||
**CONFIG_PROVISION_TEMPEST_REPO_REVISION**
|
||||
Revision (branch) of the Integration Test Suite git repository.
|
||||
|
||||
**CONFIG_TEMPEST_HOST**
|
||||
Host to deploy Tempest on. On multinode installs defaults to first host in CONFIG_NETWORK_HOSTS.
|
||||
**CONFIG_RUN_TEMPEST**
|
||||
Specify 'y' to run Tempest smoke test as last step of installation.
|
||||
|
||||
Provisioning all-in-one ovs bridge config
|
||||
-----------------------------------------
|
||||
|
|
|
@ -18,9 +18,6 @@ Plugin responsible for post-installation configuration
|
|||
|
||||
from packstack.installer import utils
|
||||
|
||||
from packstack.modules.common import filtered_hosts
|
||||
from packstack.modules.ospluginutils import appendManifestFile
|
||||
from packstack.modules.ospluginutils import getManifestTemplate
|
||||
|
||||
# ------------- Postscript Packstack Plugin Initialization --------------
|
||||
|
||||
|
@ -39,18 +36,22 @@ def initConfig(controller):
|
|||
|
||||
|
||||
def initSequences(controller):
|
||||
postscript_steps = [
|
||||
{'title': 'Adding post install manifest entries',
|
||||
'functions': [create_manifest]}
|
||||
]
|
||||
config = controller.CONF
|
||||
postscript_steps = []
|
||||
if (config['CONFIG_PROVISION_TEMPEST'] == "y" and
|
||||
config['CONFIG_RUN_TEMPEST'] == "y"):
|
||||
postscript_steps.append(
|
||||
{'title': 'Running Tempest',
|
||||
'functions': [run_tempest]}
|
||||
)
|
||||
controller.addSequence("Running post install scripts", [], [],
|
||||
postscript_steps)
|
||||
|
||||
|
||||
# -------------------------- step functions --------------------------
|
||||
|
||||
def create_manifest(config, messages):
|
||||
for hostname in filtered_hosts(config):
|
||||
manifestfile = "%s_postscript.pp" % hostname
|
||||
manifestdata = getManifestTemplate("postscript")
|
||||
appendManifestFile(manifestfile, manifestdata, 'postscript')
|
||||
def run_tempest(config, messages):
|
||||
print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST'])
|
||||
server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST'])
|
||||
server.append('/var/lib/tempest/run_tempest.sh -V -s')
|
||||
server.execute()
|
|
@ -21,7 +21,6 @@ from packstack.installer import utils
|
|||
from packstack.installer import validators
|
||||
from packstack.installer import processors
|
||||
|
||||
from packstack.modules.common import is_all_in_one
|
||||
from packstack.modules.documentation import update_params_usage
|
||||
from packstack.modules.ospluginutils import appendManifestFile
|
||||
from packstack.modules.ospluginutils import getManifestTemplate
|
||||
|
@ -41,8 +40,12 @@ DEMO_IMAGE_FORMAT = 'qcow2'
|
|||
|
||||
def initConfig(controller):
|
||||
|
||||
def process_provision(param, process_args=None):
|
||||
return param if is_all_in_one(controller.CONF) else 'n'
|
||||
def process_tempest(param, param_name, config=None):
|
||||
if param == "":
|
||||
# In case of multinode installs by default we deploy
|
||||
# Tempest on network node
|
||||
return config['CONFIG_NETWORK_HOSTS'].split(',')[0]
|
||||
return param
|
||||
|
||||
conf_params = {
|
||||
"PROVISION_INIT": [
|
||||
|
@ -143,7 +146,8 @@ def initConfig(controller):
|
|||
"PROMPT": "Enter the host where to deploy Tempest",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_ssh],
|
||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||
"DEFAULT_VALUE": "",
|
||||
"PROCESSORS": [process_tempest],
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_TEMPEST_HOST",
|
||||
|
@ -214,6 +218,18 @@ def initConfig(controller):
|
|||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "run-tempest",
|
||||
"PROMPT": ("Do you wish to run "),
|
||||
"OPTION_LIST": ["y", "n"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"DEFAULT_VALUE": "n",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_RUN_TEMPEST",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
],
|
||||
|
||||
"PROVISION_OVS_BRIDGE": [
|
||||
|
@ -330,7 +346,7 @@ def create_bridge_manifest(config, messages):
|
|||
for host in utils.split_hosts(config['CONFIG_NETWORK_HOSTS']):
|
||||
manifest_file = '{}_provision_bridge.pp'.format(host)
|
||||
manifest_data = getManifestTemplate("provision_bridge")
|
||||
appendManifestFile(manifest_file, manifest_data, 'provision')
|
||||
appendManifestFile(manifest_file, manifest_data, 'bridge')
|
||||
|
||||
|
||||
def create_storage_manifest(config, messages):
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
exec { 'update-selinux-policy':
|
||||
path => '/usr/bin/',
|
||||
command => 'yum update -y selinux-policy-targeted',
|
||||
}
|
|
@ -67,6 +67,11 @@ $heat_available = str2bool(hiera('CONFIG_HEAT_INSTALL'))
|
|||
$swift_available = str2bool(hiera('CONFIG_SWIFT_INSTALL'))
|
||||
$configure_tempest = str2bool(hiera('CONFIG_PROVISION_TEMPEST'))
|
||||
|
||||
# on standalone install we depend on this package
|
||||
package {'python-openstackclient':
|
||||
before => Class['::tempest'],
|
||||
}
|
||||
|
||||
class { '::tempest':
|
||||
admin_username => $admin_username,
|
||||
admin_password => $admin_password,
|
||||
|
|
Loading…
Reference in New Issue