259 Commits

Author SHA1 Message Date
Mark Goddard
a0f49cbd5c Stop using KOLLA_BASE_PATH to set base_path
This is part of an effort to use environment variables for configuration of
paths on the local ansible control host, and ansible variables for
configuration of paths on remote hosts (seed, seed-hypervisor, overcloud). The
base_path variable is used to set sensible defaults for image_cache_path,
source_checkout_path and virtualenv_path.
2017-09-18 21:40:01 +01:00
Mark Goddard
4acbf52867 Untangle configuration of kolla and kolla-ansible
Kolla (container images) and kolla-ansible (container deployment) are
separate concerns, and should be treated as such. Configuration
variables have been added for kolla-ansible which were previously shared
between the two projects:

kolla_venv -> kolla_ansible_venv
kolla_ctl_install_type -> kolla_ansible_ctl_install_type

Also, we introduce specific variables for the source code repository
checkout paths, which were previously both based on
source_checkout_path:

kolla_source_path
kolla_ansible_source_path

These changes help us to cleanly separate the configuration of paths on
the local (Ansible control) host, from those on the managed (target)
hosts. This is important because the local paths may be specific to the
environment in which the user is running kayobe, but the remote paths
are relatively fixed and specific to the cluster.
2017-09-18 14:21:52 +01:00
Mark Goddard
0c03d18626 Add kayobe overcloud host upgrade
This command performs necessary changes on the host to prepare the control
plane for an upgrade.

Currently this performs a workaround for issue #14, RabbitMQ upgrade failure.

We clear stale entries from /etc/hosts on the overcloud hosts and from the
rabbitmq containers, which allows the upgrade to complete successfully. The
source of the stale entries is currently unknown.
2017-09-18 13:04:27 +01:00
Mark Goddard
2e21ee018b Fix singleplatform-eng.users role entry in requirements.yml 2017-09-14 19:24:13 +01:00
Mark Goddard
c7197f9f36 Use vars: to pass variables to roles included via an include_role task
Passing variables inline with the role name appears not to work.
2017-09-14 14:43:42 +01:00
Mark Goddard
2529d207ed Fix some 'issues' raised by ansible-lint 2017-09-14 14:43:42 +01:00
Mark Goddard
2b59ef4f9c Merge pull request #13 from stackhpc/ubuntu
Add support for Ubuntu control hosts
2017-09-12 16:57:34 +01:00
Mark Goddard
b788737d15 Remove recurse argument from source_checkout_path creation
This should not be necessary, as all subdirectories are created by the
same user.
2017-09-12 11:33:32 +00:00
Mark Goddard
dcdb9f7e96 Use become when creating image cache directory for seed VM 2017-09-11 10:29:13 +00:00
Mark Goddard
a62ad6b0d3 Allow switch ports to be excluded from NGS trunk port list
Currently we use the switch interface descriptions in the
switch_interface_config variable with the
kolla_neutron_ml2_generic_switch_trunk_port_hosts variable to generate a list
of ports for each switch that should be added as trunk ports to all networks.

This change allows switch interfaces to be given an 'ngs_trunk_port' boolean
field which can be used to exclude matching interfaces from the list. This
may be useful in cases where a host has multiple interfaces but only some
should be added as trunk ports.
2017-09-11 10:29:13 +00:00
Mark Goddard
1216fec5e3 Use the singleplatform-eng.users role to create the kayobe ansible user 2017-09-11 10:29:13 +00:00
Mark Goddard
287acd1f92 Support configuration of user accounts
User accounts are configured during the following commands:

kayobe seed hypervisor host configure
kayobe seed host configure
kayobe overcloud host configure

The users are defined by the following variables:

seed_hypervisor_users
seed_users
controller_users
monitoring_users

The format required is described in the singleplatform-eng.users role
on Galaxy.

Any additional control plane hosts not in the controllers or monitoring
groups should define a 'users' variable.
2017-09-11 10:29:13 +00:00
Mark Goddard
b0e199c1fc Support the netmiko_juniper driver for Junipers in genericswitch 2017-09-11 10:29:13 +00:00
Mark Goddard
3e460676b3 Use hosts in the network group for default NGS trunk ports
Neutron network services are now mapped to hosts in the network group,
so it is these hosts that should be added as trunk ports to VLAN networks
by the networking-generic-switch neutron ML2 mechanism driver, rather
than the controllers.
2017-09-11 10:29:13 +00:00
Mark Goddard
b6dc893b0d Use controller sysctl parameters as the defaults for monitoring hosts 2017-09-11 10:29:13 +00:00
Mark Goddard
b153fa1c4e Advertise internal ironic API to nodes during provisioning
Previously a URL based on the provisioning network IP was being advertised to
nodes during provisioning. The issue here is that the API server might not be
listening on the provisioning network. Instead we advertise the internal network
endpoint and assume that if any routes are required to enable this then they
have been created elsewhere.
2017-09-11 10:29:13 +00:00
Mark Goddard
a27e0740fa Pass though host variables from kayobe to kolla-ansible inventory
By default this includes:

* ansible_host
* ansible_port
* ansible_ssh_private_key_file
2017-09-07 20:44:05 +01:00
Mark Goddard
c576e4d486 Add support for Ubuntu control hosts
This enables the user to use an Ubuntu machine to manage the cloud. The
remote cloud hosts must still run CentOS.
2017-09-07 19:42:43 +01:00
Mark Goddard
7b50904441 Fix check for SELinux status in kolla-ansible role
When SELinux python module is not installed on the host (in this
instance the control host), ansible sets the ansible_selinux fact to
False. Also, the item to check is status rather than mode.
2017-09-07 19:42:43 +01:00
Stig Telfer
6221cb2daf Merge pull request #9 from oneswig/glance-extended-config
Add support for a free-form configuration directory for glance
2017-09-04 11:21:11 +01:00
Stig Telfer
2e98f97207 Add support for a free-form configuration directory for glance 2017-09-02 22:13:14 +01:00
Mark Goddard
5c6d85adfa Add network configuration for gateways in provisioning and inspection networks
These allow us to use different gateways for compute nodes on the inspection
and provisioning networks than on the control plane hosts also accessing these
networks.
2017-09-01 18:22:42 +00:00
Mark Goddard
5304c0a489 Add a data store for ironic inspector introspection data
In environments without Swift we are currently unable to store hardware
introspection data. The inspection_store container runs an nginx server
that supports a restricted Swift-like HTTP API using WebDAV that supports
upload and retrieval of introspection data.
2017-09-01 18:21:10 +00:00
Mark Goddard
316d16c0ec Add support for configuration of sysctl parameters
These are group-specific, and configured via the following variables:

controller_sysctl_parameters
monitoring_sysctl_parameters
seed_sysctl_parameters
seed_hypervisor_parameters
2017-08-31 17:43:18 +00:00
Mark Goddard
fa69ee2775 Send default gateway DHCP option during workload inspection
This allows us to access an inspector API that is not on the provisioning network.
2017-08-30 16:48:30 +00:00
Mark Goddard
61ffac59e5 Use provisioning network to access TFTP server during workload inspection 2017-08-30 16:47:20 +00:00
Mark Goddard
5cf205502d Decompose overcloud inventory file into top level, components, and services
This allows a deployer to customise their inventory at various levels, by
providing a custom inventory template for one or more of the sections of the
inventory.

* Top level groups define the roles of hosts, e.g. controller or compute.
* Components define groups of services, e.g. nova or ironic.
* Services define single containers, e.g. nova-compute or ironic-api.
2017-08-30 11:02:33 +00:00
Mark Goddard
7b02fe89d8 Determine overcloud_groups variable more intelligently
We can use the keys of overcloud_group_hosts_map and overcloud_group_default to
make a reasonable estimate of the overcloud groups.
2017-08-30 10:01:14 +00:00
Mark Goddard
3466fd78b4 Add network group, move neutron and load balancing services to it
In many cases network services will be provided by controllers, but
this allows these services to be separated.
2017-08-29 13:41:15 +00:00
Mark Goddard
f0b409e484 Add <type>_network_interfaces for controllers, monitoring, seed, seed-hypervisor
This allows for the full set of interfaces to be overridden by setting one
of these variables, rather than simply extending the default list via
<type>_extra_network_interfaces.
2017-08-29 13:41:15 +00:00
Mark Goddard
4544e67bd0 Add ansible_host and ansible_user definitions for seed-hypervisor
These are required for SSH access to the seed-hypervisor.
2017-08-29 13:41:15 +00:00
Mark Goddard
6580c08140 Changes to MichaelRigart.interfaces role now merged upstream 2017-08-29 13:12:47 +00:00
Mark Goddard
1d9e8fc976 Separate the external network into external and public
Previously, the external network carried both public API traffic and
neutron external network traffic. In some cases is it useful to separate
these networks. The public network now carries the public API traffic,
leaving the external network to carry neutron external network traffic
alone. For backwards compatibility, the public network defaults to the
external network.
2017-08-29 13:12:47 +00:00
Mark Goddard
e5cec6aed3 Add support for setting bmc_type=intel for Intel BMCs 2017-08-29 13:12:47 +00:00
Mark Goddard
bd4c76aaf0 Fix incorrect ansible module in overcloud-ipa-images.yml 2017-08-23 16:48:18 +01:00
Mark Goddard
1c1d92b4db Add command to save overcloud introspection data
The CLI command is:

kayobe overcloud introspection data save [--output-dir <dir>] [--output-format <format>]

This command will save introspection data collected by the seed host's ironic
inspector service to the control host for analysis.
2017-08-22 18:35:47 +00:00
Mark Goddard
4cdf792032 Perform all host network configuration in a single pass
The MichaelRigart.interfaces role has now been updated to support more complex
network topologies, including VLAN subinterfaces of bridges, and bridges with
a bonded interface as a port.
2017-08-22 18:35:47 +00:00
Mark Goddard
b24db07b35 Explicitly set IP=0.0.0.0 on interfaces with no IP address
This will remove any existing IP address from the interface.
2017-08-22 15:12:06 +00:00
Mark Goddard
112e36a7fd Fix serialisation of ip-allocation role
This keyword should be applied to the play, not the role, otherwise it doesn't
work.
2017-08-22 15:12:05 +00:00
Mark Goddard
7d7dc486a4 Fix destroy of opensm and docker-registry containers
Now also removes docker volumes
2017-08-22 15:12:05 +00:00
Mark Goddard
e5f889baaa Don't pull opensm or docker-registry images when disabled or destroying 2017-08-22 15:12:05 +00:00
Mark Goddard
f17f82a0fc Improve configuration of IPA collectors and benchmarks
Rather than specifying kernel command line arguments directly, configuration of
IPA introspection data collectors and benchmarks is now possible by extending
lists of collector (ipa_collect_extra) and benchmark (ipa_benchmark_extra)
names.  LLDP collection is now controlled via a flag, ipa_collect_lldp.
Additional kernel arguments may be passed via ipa_kernel_options_extra.
2017-08-22 15:12:05 +00:00
Mark Goddard
5d6658b353 Improve ironic deployment image build for overcloud
Overcloud deployment images can now be built via:

kayobe overcloud deployment image build

This should be done prior to running kayobe overcloud service deploy.
In order to build IPA images, the ipa_build_images variable should be
set to True. In this case, these images will be used by the overcloud's
ironic inspector service during hardware inspection, and by ironic
during provisioning.
2017-08-22 15:12:05 +00:00
Mark Goddard
ebb81e49f1 Add command to build IPA deployment images for the seed
The CLI command is:

kayobe seed deployment image build

This command will build Ironic Python Agent (IPA) kernel and ramdisk images
using the Diskimage Builder (DIB) ironic-agent element. The built images will
be copied to the appropriate location in the bifrost_deploy container on the
seed.

This allows us to build a customised image with site- or hardware- specific
extensions.
2017-08-22 15:12:05 +00:00
Mark Goddard
20a8436d0f Don't install bifrost into local virtualenv
Bifrost is no longer required to be installed locally.
2017-08-16 15:22:54 +00:00
Mark Goddard
aa334068c2 Add stackhpc.os-images role to role dependencies 2017-08-15 14:58:54 +00:00
Mark Goddard
1e7502000e Work around issue with delegate_to not respecting ansible_user
When using delegate_to with an IP address, ansible does use the corresponding
host in the inventory, and so not respect the ansible_user variable of the
delegate host. Here we revert to using the delegate host's inventory hostname,
and force ansible to respect the ansible_host variable of that host by setting
the variable in the task explicitly.
2017-08-15 14:58:54 +00:00
Mark Goddard
1de4e88de0 Fix syntax for inclusion of openstackclient role 2017-08-14 18:48:53 +01:00
Mark Goddard
8182d7f1fe Remove unnecessary comma from JunOS switch config
This was being appended to port descriptions.
2017-08-10 16:40:26 +00:00
Mark Goddard
9b694aadff Fix typo in junos switch provider for SSH private key file
This prevented a user from using their own username and SSH key to
configure a switch.
2017-08-10 10:35:05 +00:00