Separate configuration of host OS from service deployment

This commit is contained in:
Mark Goddard 2017-03-06 14:46:17 +00:00
parent f57f06c1e0
commit 474e48b433
4 changed files with 36 additions and 23 deletions

View File

@ -112,9 +112,13 @@ address of the VM.
At this point the seed services need to be deployed on the seed VM. These
services include Docker and the Kolla `bifrost-deploy` container. This command
will also build the image to be used to deploy the overcloud nodes using Disk
Image Builder (DIB). To deploy the seed services:
Image Builder (DIB). To configure the seed host OS:
(kayobe-venv) $ kayobe seed deploy
(kayobe-venv) $ kayobe seed host configure
To deploy the seed services in containers:
(kayobe-venv) $ kayobe seed service deploy
After this command has completed the seed services will be active. For SSH
access to the seed VM, first determine the seed VM's IP address:
@ -143,10 +147,14 @@ the seed. An inventory of servers should be configured using the
(kayobe-venv) $ kayobe overcloud provision
After this command has completed the overcloud nodes have should been
provisioned with an OS image. To deploy the overcloud services:
After this command has completed the overcloud nodes should have been
provisioned with an OS image. To configure the overcloud hosts' OS:
(kayobe-venv) $ kayobe overcloud deploy
(kayobe-venv) $ kayobe overcloud host configure
To deploy the overcloud services in containers:
(kayobe-venv) $ kayobe overcloud service deploy
Once this command has completed the overcloud nodes should have OpenStack
services running in Docker containers. Kolla writes out an environment file

View File

@ -129,15 +129,11 @@ class SeedVMProvision(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
ansible.run_playbook(parsed_args, "ansible/seed-vm.yml")
class SeedDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Deploy the seed node services."""
class SeedHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Configure the seed node host OS."""
def take_action(self, parsed_args):
self.app.LOG.debug("Deploying seed services")
self._configure_os(parsed_args)
self._deploy_bifrost(parsed_args)
def _configure_os(self, parsed_args):
self.app.LOG.debug("Configuring seed host OS")
ansible_user = ansible.config_dump(parsed_args, host="seed",
var_name="kayobe_ansible_user")
playbooks = ["ansible/%s.yml" % playbook for playbook in
@ -150,13 +146,19 @@ class SeedDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"kolla-host", "docker"]
ansible.run_playbooks(parsed_args, playbooks, limit="seed")
def _deploy_bifrost(self, parsed_args):
class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Deploy the seed services."""
def take_action(self, parsed_args):
self.app.LOG.debug("Deploying seed services")
ansible.run_playbook(parsed_args, "ansible/kolla-bifrost.yml")
# FIXME: Do this via configuration.
extra_vars = {"kolla_install_type": "source",
"docker_namespace": "stackhpc"}
kolla_ansible.run_seed(parsed_args, "deploy-bifrost",
extra_vars=extra_vars)
ansible.run_playbook(parsed_args, "ansible/seed-introspection-rules.yml")
class OvercloudProvision(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
@ -179,15 +181,11 @@ class OvercloudProvision(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
kolla_ansible.run_seed(parsed_args, "deploy-servers")
class OvercloudDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Deploy the overcloud services."""
class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Configure the overcloud host OS."""
def take_action(self, parsed_args):
self.app.LOG.debug("Deploying overcloud services")
self._configure_os(parsed_args)
self._deploy_services(parsed_args)
def _configure_os(self, parsed_args):
self.app.LOG.debug("Configuring overcloud host OS")
ansible_user = ansible.config_dump(parsed_args, host="controllers[0]",
var_name="kayobe_ansible_user")
playbooks = ["ansible/%s.yml" % playbook for playbook in
@ -200,7 +198,12 @@ class OvercloudDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"kolla-host", "docker"]
ansible.run_playbooks(parsed_args, playbooks, limit="controllers")
def _deploy_services(self, parsed_args):
class OvercloudServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, Command):
"""Deploy the overcloud services."""
def take_action(self, parsed_args):
self.app.LOG.debug("Deploying overcloud services")
playbooks = ["ansible/%s.yml" % playbook for playbook in
"kolla-openstack", "swift-setup"]
ansible.run_playbooks(parsed_args, playbooks)

View File

@ -39,10 +39,12 @@ setup(
'control_host_bootstrap = kayobe.cli.commands:ControlHostBootstrap',
'configuration_dump = kayobe.cli.commands:ConfigurationDump',
'kolla_ansible_run = kayobe.cli.commands:KollaAnsibleRun',
'overcloud_deploy = kayobe.cli.commands:OvercloudDeploy',
'overcloud_host_configure = kayobe.cli.commands:OvercloudHostConfigure',
'overcloud_service_deploy = kayobe.cli.commands:OvercloudServiceDeploy',
'overcloud_provision = kayobe.cli.commands:OvercloudProvision',
'playbook_run = kayobe.cli.commands:PlaybookRun',
'seed_deploy = kayobe.cli.commands:SeedDeploy',
'seed_host_configure = kayobe.cli.commands:SeedHostConfigure',
'seed_service_deploy = kayobe.cli.commands:SeedServiceDeploy',
'seed_vm_provision = kayobe.cli.commands:SeedVMProvision',
],
},