Containers, Heat , and Health Maintenance

1,080 views

Published on

Lightning talk from the OpenStack NYC meetup on October 8, 2014.

http://bit.ly/ibm-os-meetup

By Mike Spreitzer

Heat is an OpenStack service that allows model based management of virtual infrastructure and software. We'll introduce Heat and show its use to manage Dockers containers with high availability.

[10/14 update: Addresses this bug: https://review.openstack.org/#/c/127821/]

The content of this talk is a statement from the IBM Research division, not IBM product divisions, and is not a statement from IBM regarding its plans, directions or product intents. Any activities described by this talk are subject to change.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,080
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Containers, Heat , and Health Maintenance

  1. 1. Containers and Heat and Health Maintenance Mike Spreitzer IBM Research
  2. 2. The Take-­‐Away • You can use Docker through Nova • Heat provides desired-­‐state based management • OpenStack can do health maintenance today
  3. 3. Docker and Nova • There is a “Docker driver” for Nova • Allows you to create/manage Docker containers through the normal API for VMs • Special images
  4. 4. Heat • A “template” is a model: desired state – Has inputs (“parameters”) and outputs – Has resources • Most correspond to an object in an OpenStack API • Some are synthePc things – E.g., autoscaling group • Each has inputs (“properPes”) and outputs (“aTributes”) • A “stack” is an instance of a template – Yes, recursion allowed • Heat allows CRUD of stacks from templates
  5. 5. The Picture of Health OS::Neutron::LoadBalancer OS::Neutron::Pool OS::Nova::Server OS::Heat::HARestarter OS::Neutron::PoolMember OS::Ceilometer::Alarm OS::Neutron::HealthMonitor
  6. 6. Template for a Container with Health Maintenance, p1 heat_template_version: 2013-05-23! description: A container subject to health maintenance! parameters:! image:! type: string! description: Image used for containers! flavor:! type: string! description: flavor used by the containers! default: m1.tiny!
  7. 7. Template for a Container with Health Maintenance, p2 private_network:! type: string! description:! Name or ID of the network to which! the container will be attached! protocol_port:! type: number! description: port number where container listens! default: 80! pool_id:! type: string! description: LB Pool of which to be a member!
  8. 8. Template for a Container with Health Maintenance, p3 resources:! server:! type: OS::Nova::Server! properties:! flavor: {get_param: flavor}! image: {get_param: image}! networks:! - {network: {get_param: private_network}}! ! restarter:! type: OS::Heat::HARestarter! properties:! InstanceId: {get_resource: server}!
  9. 9. Template for a Container with Health Maintenance, p4 member:! type: OS::Neutron::PoolMember! properties:! pool_id: {get_param: pool_id}! address: {get_attr: [server, first_address]}! protocol_port: {get_param: protocol_port}!
  10. 10. Template for a Container with Health Maintenance, p5 (old version) gone_alarm:! type: OS::Ceilometer::Alarm! properties:! description: Detect container being unresponsive! meter_name: network.services.lb.member! statistic: avg! period: 70! evaluation_periods: 2! threshold: 1! alarm_actions: [ {get_attr:! [restarter, AlarmUrl]} ]! matching_metadata: {resource:! {get_resource: member} }! comparison_operator: lt!
  11. 11. Template for a Container with Health Maintenance, p5 (new version) gone_alarm:! type: OS::Ceilometer::Alarm! properties:! description: Detect container being unresponsive! meter_name: network.services.lb.member! statistic: avg! period: 70! evaluation_periods: 2! threshold: 1! alarm_actions: [ {get_attr:! [restarter, AlarmUrl]} ]! query: {field: resource_id, op: eq,! value: {get_resource: member} }! comparison_operator: lt!
  12. 12. Template for a Container with Health Maintenance, p6 outputs:! ceilometer_query:! value:! str_replace:! template:! ceilometer statistics! -m network.services.lb.member! -q resource_id=memberid -p 70 -a avg! params:! memberid: {get_resource: member}! description:! This is a Ceilometer CLI command that produces! stats similar to those used by the alarm!
  13. 13. Template for a Container with Health Maintenance, p7 restart_url:! value: {get_attr: [restarter, AlarmUrl]}! description: the webhook for the HARestarter! !
  14. 14. Also Talk to Me About • PaaS and IaaS for Containers • Balancing an ASG across AZs • HolisPc placement in OpenStack

×