Add CLI commands to reconfigure and upgrade the overcloud services

kayobe overcloud service reconfigure maps to kolla's reconfigure command.
kayobe overcloud service upgrade maps to kolla's upgrade command.
This commit is contained in:
Mark Goddard 2017-04-05 14:22:48 +01:00
parent 3b5d71d399
commit 3fd26401e0
2 changed files with 34 additions and 0 deletions

View File

@ -378,6 +378,38 @@ class OvercloudServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
self.run_kayobe_playbooks(parsed_args, playbooks)
class OvercloudServiceReconfigure(KollaAnsibleMixin, KayobeAnsibleMixin,
Command):
"""Reconfigure the overcloud services."""
def take_action(self, parsed_args):
self.app.LOG.debug("Reconfiguring overcloud services")
playbooks = _build_playbook_list("kolla-ansible", "kolla-openstack",
"swift-setup")
self.run_kayobe_playbooks(parsed_args, playbooks)
for command in ["prechecks", "reconfigure"]:
self.run_kolla_ansible_overcloud(parsed_args, command)
# FIXME: Fudge to work around incorrect configuration path.
extra_vars = {"node_config_directory": parsed_args.kolla_config_path}
self.run_kolla_ansible_overcloud(parsed_args, "post-deploy",
extra_vars=extra_vars)
# Create an environment file for accessing the public API as the admin
# user.
playbooks = _build_playbook_list("public-openrc")
self.run_kayobe_playbooks(parsed_args, playbooks)
class OvercloudServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Upgrade the overcloud services."""
def take_action(self, parsed_args):
self.app.LOG.debug("Upgrading overcloud services")
playbooks = _build_playbook_list("kolla-ansible", "kolla-openstack")
self.run_kayobe_playbooks(parsed_args, playbooks)
for command in ["prechecks", "upgrade"]:
self.run_kolla_ansible_overcloud(parsed_args, command)
class OvercloudContainerImagePull(KollaAnsibleMixin, Command):
"""Pull the overcloud container images from a registry."""

View File

@ -50,6 +50,8 @@ setup(
'overcloud_post_configure = kayobe.cli.commands:OvercloudPostConfigure',
'overcloud_provision = kayobe.cli.commands:OvercloudProvision',
'overcloud_service_deploy = kayobe.cli.commands:OvercloudServiceDeploy',
'overcloud_service_reconfigure = kayobe.cli.commands:OvercloudServiceReconfigure',
'overcloud_service_upgrade = kayobe.cli.commands:OvercloudServiceUpgrade',
'physical_network_configure = kayobe.cli.commands:PhysicalNetworkConfigure',
'playbook_run = kayobe.cli.commands:PlaybookRun',
'seed_container_image_build = kayobe.cli.commands:SeedContainerImageBuild',