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:
@@ -983,8 +983,8 @@ Provisioning tempest config
|
|||||||
**CONFIG_PROVISION_TEMPEST_REPO_REVISION**
|
**CONFIG_PROVISION_TEMPEST_REPO_REVISION**
|
||||||
Revision (branch) of the Integration Test Suite git repository.
|
Revision (branch) of the Integration Test Suite git repository.
|
||||||
|
|
||||||
**CONFIG_TEMPEST_HOST**
|
**CONFIG_RUN_TEMPEST**
|
||||||
Host to deploy Tempest on. On multinode installs defaults to first host in CONFIG_NETWORK_HOSTS.
|
Specify 'y' to run Tempest smoke test as last step of installation.
|
||||||
|
|
||||||
Provisioning all-in-one ovs bridge config
|
Provisioning all-in-one ovs bridge config
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
@@ -18,9 +18,6 @@ Plugin responsible for post-installation configuration
|
|||||||
|
|
||||||
from packstack.installer import utils
|
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 --------------
|
# ------------- Postscript Packstack Plugin Initialization --------------
|
||||||
|
|
||||||
@@ -39,18 +36,22 @@ def initConfig(controller):
|
|||||||
|
|
||||||
|
|
||||||
def initSequences(controller):
|
def initSequences(controller):
|
||||||
postscript_steps = [
|
config = controller.CONF
|
||||||
{'title': 'Adding post install manifest entries',
|
postscript_steps = []
|
||||||
'functions': [create_manifest]}
|
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", [], [],
|
controller.addSequence("Running post install scripts", [], [],
|
||||||
postscript_steps)
|
postscript_steps)
|
||||||
|
|
||||||
|
|
||||||
# -------------------------- step functions --------------------------
|
# -------------------------- step functions --------------------------
|
||||||
|
|
||||||
def create_manifest(config, messages):
|
def run_tempest(config, messages):
|
||||||
for hostname in filtered_hosts(config):
|
print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST'])
|
||||||
manifestfile = "%s_postscript.pp" % hostname
|
server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST'])
|
||||||
manifestdata = getManifestTemplate("postscript")
|
server.append('/var/lib/tempest/run_tempest.sh -V -s')
|
||||||
appendManifestFile(manifestfile, manifestdata, 'postscript')
|
server.execute()
|
@@ -21,7 +21,6 @@ from packstack.installer import utils
|
|||||||
from packstack.installer import validators
|
from packstack.installer import validators
|
||||||
from packstack.installer import processors
|
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.documentation import update_params_usage
|
||||||
from packstack.modules.ospluginutils import appendManifestFile
|
from packstack.modules.ospluginutils import appendManifestFile
|
||||||
from packstack.modules.ospluginutils import getManifestTemplate
|
from packstack.modules.ospluginutils import getManifestTemplate
|
||||||
@@ -41,8 +40,12 @@ DEMO_IMAGE_FORMAT = 'qcow2'
|
|||||||
|
|
||||||
def initConfig(controller):
|
def initConfig(controller):
|
||||||
|
|
||||||
def process_provision(param, process_args=None):
|
def process_tempest(param, param_name, config=None):
|
||||||
return param if is_all_in_one(controller.CONF) else 'n'
|
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 = {
|
conf_params = {
|
||||||
"PROVISION_INIT": [
|
"PROVISION_INIT": [
|
||||||
@@ -143,7 +146,8 @@ def initConfig(controller):
|
|||||||
"PROMPT": "Enter the host where to deploy Tempest",
|
"PROMPT": "Enter the host where to deploy Tempest",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ssh],
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": "",
|
||||||
|
"PROCESSORS": [process_tempest],
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": True,
|
"LOOSE_VALIDATION": True,
|
||||||
"CONF_NAME": "CONFIG_TEMPEST_HOST",
|
"CONF_NAME": "CONFIG_TEMPEST_HOST",
|
||||||
@@ -214,6 +218,18 @@ def initConfig(controller):
|
|||||||
"USE_DEFAULT": False,
|
"USE_DEFAULT": False,
|
||||||
"NEED_CONFIRM": False,
|
"NEED_CONFIRM": False,
|
||||||
"CONDITION": 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": [
|
"PROVISION_OVS_BRIDGE": [
|
||||||
@@ -330,7 +346,7 @@ def create_bridge_manifest(config, messages):
|
|||||||
for host in utils.split_hosts(config['CONFIG_NETWORK_HOSTS']):
|
for host in utils.split_hosts(config['CONFIG_NETWORK_HOSTS']):
|
||||||
manifest_file = '{}_provision_bridge.pp'.format(host)
|
manifest_file = '{}_provision_bridge.pp'.format(host)
|
||||||
manifest_data = getManifestTemplate("provision_bridge")
|
manifest_data = getManifestTemplate("provision_bridge")
|
||||||
appendManifestFile(manifest_file, manifest_data, 'provision')
|
appendManifestFile(manifest_file, manifest_data, 'bridge')
|
||||||
|
|
||||||
|
|
||||||
def create_storage_manifest(config, messages):
|
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'))
|
$swift_available = str2bool(hiera('CONFIG_SWIFT_INSTALL'))
|
||||||
$configure_tempest = str2bool(hiera('CONFIG_PROVISION_TEMPEST'))
|
$configure_tempest = str2bool(hiera('CONFIG_PROVISION_TEMPEST'))
|
||||||
|
|
||||||
|
# on standalone install we depend on this package
|
||||||
|
package {'python-openstackclient':
|
||||||
|
before => Class['::tempest'],
|
||||||
|
}
|
||||||
|
|
||||||
class { '::tempest':
|
class { '::tempest':
|
||||||
admin_username => $admin_username,
|
admin_username => $admin_username,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
|
Reference in New Issue
Block a user