Decouple the hard requirement on neutron-lbaas

Registered by hongbin on 2016-05-03

Neutron LBaaS is only required on HA setup or the k8s external load balancer feature, otherwise, it is not required. We need to decouple from neutron-lbaas to overcome an adoption challenge reported in Austin design summit: https://etherpad.openstack.org/p/newton-magnum-adoption-challenges

Blueprint information

Status:
Complete
Approver:
hongbin
Priority:
High
Drafter:
hongbin
Direction:
Approved
Assignee:
Drago
Definition:
New
Series goal:
Accepted for newton
Implementation:
Implemented
Milestone target:
None
Started by
Drago on 2016-07-20
Completed by
Adrian Otto on 2016-10-28

Related branches

Sprints

Whiteboard

2016-06-02 adrian_otto: we discussed this in IRC today, and reached some consensus on a sensible implementation approach. Overview:

1) Introduce a new baymodel attribute master_lb_enabled, which defaults to False.

2) Adjust the input validation for the master_count attribute on a bay. If the baymodel.master_lb_enabled is False, the only valid value for master_count is 1. If the value is True, any value will be accepted.

3) Select an alternate bay template for heat when master_lb_enabled is set to True. The only additional section of the template in this case should be the cloud resources to set up the load balancing of the master nodes of the COE.

Example (excerpt from magnum/templates/kubernetes/kubemaster.yaml):

  #
  # load balancers.
  #

  api_monitor:
    type: OS::Neutron::HealthMonitor
    properties:
      type: TCP
      delay: 5
      max_retries: 5
      timeout: 5

  api_pool:
    type: OS::Neutron::Pool
    properties:
      protocol: {get_param: loadbalancing_protocol}
      monitors: [{get_resource: api_monitor}]
      subnet: {get_resource: fixed_subnet}
      lb_method: ROUND_ROBIN
      vip:
        protocol_port: {get_param: kubernetes_port}

  api_pool_floating:
    type: OS::Neutron::FloatingIP
    depends_on:
      - extrouter_inside
    properties:
      floating_network: {get_param: external_network}
      port_id: {get_attr: [api_pool, vip, port_id]}

  etcd_monitor:
    type: OS::Neutron::HealthMonitor
    properties:
      type: TCP
      delay: 5
      max_retries: 5
      timeout: 5

  etcd_pool:
    type: OS::Neutron::Pool
    properties:
      protocol: HTTP
      monitors: [{get_resource: etcd_monitor}]
      subnet: {get_resource: fixed_subnet}
      lb_method: ROUND_ROBIN
      vip:
        protocol_port: 2379

...

  api_pool_member:
    type: OS::Neutron::PoolMember
    properties:
      pool_id: {get_param: api_pool_id}
      address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
      protocol_port: {get_param: kubernetes_port}

  etcd_pool_member:
    type: OS::Neutron::PoolMember
    properties:
      pool_id: {get_param: etcd_pool_id}
      address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
      protocol_port: 2379

Note, we will need to make sure parameters like api_pool_id and etcd_pool_id are only included/used in/with the template used when master_lb_enabled is set to True.

Gerrit topic: https://review.openstack.org/#q,topic:bp/decouple-lbaas,n,z

Addressed by: https://review.openstack.org/333383
    [WIP] Allow k8s cluster without LBaaS

Addressed by: https://review.openstack.org/333540
    Add master_lb_enabled field to baymodel

Addressed by: https://review.openstack.org/334009
    Allow Bay templates to include Heat environments

Addressed by: https://review.openstack.org/336702
    Allow Bay templates to include Heat environments

Addressed by: https://review.openstack.org/338535
    Allow swarm cluster without LBaaS

Addressed by: https://review.openstack.org/338537
    Allow mesos cluster without LBaaS

Addressed by: https://review.openstack.org/346150
    Move common/fragments into templates directory

Addressed by: https://review.openstack.org/346151
    De-duplicate the decouple-LBaaS-related files

--- (Abandoned patches)
(achanda)
We (EMC) need to back port these changes to Mitaka

Addressed by: https://review.openstack.org/337390
    Add master_lb_enabled field to baymodel

Addressed by: https://review.openstack.org/336702
    Allow Bay templates to include Heat environments
---

Gerrit topic: https://review.openstack.org/#q,topic:bug/1517218,n,z

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.