Merge "Add possibility to set number of sequiential deploys"
This commit is contained in:
commit
6c5f69c844
@ -748,25 +748,7 @@ class FuelWebClient(object):
|
|||||||
attributes = self.client.get_cluster_attributes(cluster_id)
|
attributes = self.client.get_cluster_attributes(cluster_id)
|
||||||
return attributes['editable']['repo_setup']['repos']
|
return attributes['editable']['repo_setup']['repos']
|
||||||
|
|
||||||
@download_packages_json
|
def check_deploy_state(self, cluster_id, check_services=True):
|
||||||
@download_astute_yaml
|
|
||||||
@duration
|
|
||||||
@check_repos_management
|
|
||||||
@custom_repo
|
|
||||||
def deploy_cluster_wait(self, cluster_id, is_feature=False,
|
|
||||||
timeout=help_data.DEPLOYMENT_TIMEOUT, interval=30,
|
|
||||||
check_services=True):
|
|
||||||
if not is_feature:
|
|
||||||
logger.info('Deploy cluster %s', cluster_id)
|
|
||||||
task = self.deploy_cluster(cluster_id)
|
|
||||||
self.assert_task_success(task, interval=interval, timeout=timeout)
|
|
||||||
else:
|
|
||||||
logger.info('Provision nodes of a cluster %s', cluster_id)
|
|
||||||
task = self.client.provision_nodes(cluster_id)
|
|
||||||
self.assert_task_success(task, timeout=timeout, interval=interval)
|
|
||||||
logger.info('Deploy nodes of a cluster %s', cluster_id)
|
|
||||||
task = self.client.deploy_nodes(cluster_id)
|
|
||||||
self.assert_task_success(task, timeout=timeout, interval=interval)
|
|
||||||
if check_services:
|
if check_services:
|
||||||
self.assert_ha_services_ready(cluster_id)
|
self.assert_ha_services_ready(cluster_id)
|
||||||
self.assert_os_services_ready(cluster_id)
|
self.assert_os_services_ready(cluster_id)
|
||||||
@ -801,6 +783,32 @@ class FuelWebClient(object):
|
|||||||
logger.info('Node status: {}'.format(pretty_log(node_status,
|
logger.info('Node status: {}'.format(pretty_log(node_status,
|
||||||
indent=1)))
|
indent=1)))
|
||||||
|
|
||||||
|
@download_packages_json
|
||||||
|
@download_astute_yaml
|
||||||
|
@duration
|
||||||
|
@check_repos_management
|
||||||
|
@custom_repo
|
||||||
|
def deploy_cluster_wait(self, cluster_id, is_feature=False,
|
||||||
|
timeout=help_data.DEPLOYMENT_TIMEOUT, interval=30,
|
||||||
|
check_services=True):
|
||||||
|
if not is_feature and help_data.DEPLOYMENT_RETRIES == 1:
|
||||||
|
logger.info('Deploy cluster %s', cluster_id)
|
||||||
|
task = self.deploy_cluster(cluster_id)
|
||||||
|
self.assert_task_success(task, interval=interval, timeout=timeout)
|
||||||
|
self.check_deploy_state(cluster_id, check_services)
|
||||||
|
return
|
||||||
|
|
||||||
|
logger.info('Provision nodes of a cluster %s', cluster_id)
|
||||||
|
task = self.client.provision_nodes(cluster_id)
|
||||||
|
self.assert_task_success(task, timeout=timeout, interval=interval)
|
||||||
|
|
||||||
|
for retry_number in range(help_data.DEPLOYMENT_RETRIES):
|
||||||
|
logger.info('Deploy nodes of a cluster %s, run: %s',
|
||||||
|
cluster_id, str(retry_number + 1))
|
||||||
|
task = self.client.deploy_nodes(cluster_id)
|
||||||
|
self.assert_task_success(task, timeout=timeout, interval=interval)
|
||||||
|
self.check_deploy_state(cluster_id, check_services)
|
||||||
|
|
||||||
def deploy_cluster_wait_progress(self, cluster_id, progress,
|
def deploy_cluster_wait_progress(self, cluster_id, progress,
|
||||||
return_task=None):
|
return_task=None):
|
||||||
task = self.deploy_cluster(cluster_id)
|
task = self.deploy_cluster(cluster_id)
|
||||||
|
@ -83,6 +83,7 @@ DEPLOYMENT_MODE_SIMPLE = "multinode"
|
|||||||
DEPLOYMENT_MODE_HA = "ha_compact"
|
DEPLOYMENT_MODE_HA = "ha_compact"
|
||||||
DEPLOYMENT_MODE = os.environ.get("DEPLOYMENT_MODE", DEPLOYMENT_MODE_HA)
|
DEPLOYMENT_MODE = os.environ.get("DEPLOYMENT_MODE", DEPLOYMENT_MODE_HA)
|
||||||
DEPLOYMENT_TIMEOUT = int(os.environ.get("DEPLOYMENT_TIMEOUT", 7800))
|
DEPLOYMENT_TIMEOUT = int(os.environ.get("DEPLOYMENT_TIMEOUT", 7800))
|
||||||
|
DEPLOYMENT_RETRIES = int(os.environ.get("DEPLOYMENT_RETRIES", 1))
|
||||||
BOOTSTRAP_TIMEOUT = int(os.environ.get("BOOTSTRAP_TIMEOUT", 900))
|
BOOTSTRAP_TIMEOUT = int(os.environ.get("BOOTSTRAP_TIMEOUT", 900))
|
||||||
WAIT_FOR_PROVISIONING_TIMEOUT = int(os.environ.get(
|
WAIT_FOR_PROVISIONING_TIMEOUT = int(os.environ.get(
|
||||||
"WAIT_FOR_PROVISIONING_TIMEOUT", 1200))
|
"WAIT_FOR_PROVISIONING_TIMEOUT", 1200))
|
||||||
|
Loading…
Reference in New Issue
Block a user