inventory group as config/action target

Registered by bjolo

Problem Description:

Throughout the kolla code, target selection is based on individual hosts or on container types. For smaller deployments and as default options this tends to be enough and work great. However, as the installation grows, operators need to be able to divide into more inventory groups and base selection on group level. This can be done in the inventory file, however for this to have any meaning and be scalable, this construct should be reflected in the deploy/upgrade and configure actions as well.

Proposed Change:

Desired solution is that operator should be able to define various hostgroups and be able to use that hostgroup as targets throughout kolla.

Sources
 - Ansible inventory file
 - Ansible dynamic inventory with various sources
  ○ Host aggregates are retrieved from the deployed cloud
  ○ Other

Example

As it is today, the config override system allows for operator to modify all containers per service type, or override per host and service. This does not scale very well for hundreds of compute nodes divided into a few different compute groups. It should be possible to do config override on group level. Large operators most likely have multiple groups of compute nodes for various reasons like:
 - Hw generations and type of CPU
 - Host aggregates
 - Support multiple hypervisors
 - Other config restrictions like HPC with no overcommit on CPU&memory, and generic with high overcommit ratios

Today the default structure in inventory file only specify one compute group
[compute]
Node-1
Node-2

This can be changed by operator to have multiple compute groups
[compute:children]
Compute-group-1
Compute-group-2

[compute-group-1]
Node-1
Node-2

[compute-group-2]
Node-3
Node-4

If we could use the group level as override target, it would allow for operations like below

Config override context:
/etc/kolla/config/nova/compute-group-1/nova.conf
/etc/kolla/config/nova/compute-group-2/nova.conf
/etc/kolla/config/neutron/compute-group-1/l3-agent.ini
Kolla-ansible reconfigure compute-group-1

Image selection
Compute-group-1_nova_libvirt_tag: 3.0.0.1234
Compute-group-2_nova_libvirt_tag: 3.0.0.4567

Execution mgmt context based on host and node group instead of container type
Kolla-ansible deploy compute-group-1
Kolla-ansible upgrade compute-group-1

Ansible does have some support for groups and groups_names
http://docs.ansible.com/ansible/latest/playbooks_variables.html#magic-variables-and-how-to-access-information-about-other-hosts

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
bjolo
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Discussed this briefly in Denver, inc0 seemed to reckon this is already possible with our current mechanisms. There may be some tweaks required, suggest bringing up at the next meeting to see if we can make it happen. (pbourke)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.