orchestration of aws ec2 and eucalyptus cloud instances using ansible

27
© 2013 Eucalyptus Systems, Inc. Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible Lester Wade Tim Gerla Eucalyptus AnsibleWorks

Upload: eucalyptus-systems-inc

Post on 08-May-2015

1.933 views

Category:

Technology


5 download

DESCRIPTION

Orchestrating transient cloud instances with traditional configuration management tools usually requires pre-installation of agents, intimate knowledge of often complex syntax and perhaps most importantly, hard-earned time. What if you could exercise complete control over your instances through a simple language, with the ability to pick any machine image as a building block for your services with no requirement for agents? Thanks to Eucalyptus' EC2 API compatibility and Ansible's EC2-related modules, configuration management across public and private cloud has never been easier. Watch this on-demand webinar as we look at exactly what makes Ansible the perfect tool for simplifying cloud automation and how Eucalyptus, with its EC2 API compatibility, can help unlock potential hybrid scenarios using common Ansible playbooks.

TRANSCRIPT

Page 1: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2013 Eucalyptus Systems, Inc.

Orchestration of AWS EC2 and Eucalyptus Cloud

Instances Using Ansible

Lester Wade Tim Gerla Eucalyptus AnsibleWorks

Page 2: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

Introduction to Eucalyptus Lester Wade Cloud Solution Engineer

Page 3: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

Open source software for

building AWS-compatible private

and hybrid clouds

Page 4: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

AWS Compatibility

• AWS is the most widely-used public cloud in the world

• The de facto industry standard API

• Large collection of tools and virtual machine images

• Eucalyptus is compatible with several popular AWS APIs

• Elastic Compute Cloud (EC2)

• Simple Storage Service (S3)

• Elastic Block Store (EBS)

• Identity and Access Management (IAM)

• Eucalyptus provides functionality similar to AWS

• Elastic IP addresses

• Availability Zones (Clusters in Eucalyptus)

• AMIs (EMIs in Eucalyptus)

• Security Groups

• .....

Page 5: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

AWS - Eucalyptus Partnership

Page 6: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

New API Features

• New AWS API-compatible service implementations

• CloudWatch

• AutoScaling

• Elastic Load Balancing

• Further API compatibility enhancements

• Tagging

• Filtering

• ... and more

Page 7: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

Orchestration in the Cloud

Looking for a tool with the following properties:

• Easy to get started

• Leveraged the AWS API's

• Doesn't required agents or pre-baked images

• Easily to work on

Page 8: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Introduction to Ansible

Tim Gerla

VP of Services and Support, AnsibleWorks, Inc.

[email protected] Twitter: @Tybstar

Page 9: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

What is Ansible?

Ansible is an open-source IT orchestration engine that manages on premise and in the

cloud remote devices in a coordinated fashion: servers, networking hardware, and

storage devices

Page 10: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

• Simple: Automation in plain English

• Secure: Uses industry-standard SSH

• Efficient: No agent software required on managed hosts

• Powerful: Manage bare metal, virtualized and cloud hosts

• Extensible: Use of any language of preference

• Complete: Configuration management + deployment

Ansible Advantages

Page 11: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Ansible Architecture

Page 12: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Modules• Ansible is “batteries included”:

add_hostaptapt_keyapt_repositoryassembleasync_statusasync_wrapperauthorized_keybzrcloudformationcommandcopycrondebugdjango_manageeasy_installec2ec2_factsec2_volfacter

failfetchfilefireballgemget_urlgitgroupgroup_byhghomebrewini_filelineinfilelvglvolmacportsmailmongodb_usermountmysql_db

mysql_usernagiosnetscalerohaiopenbsd_pkgopkgpacmanpausepingpippkginpostgresql_dbpostgresql_userrabbitmq_parameterrabbitmq_pluginrabbitmq_userrabbitmq_vhostrawrhn_channel

s3scriptsebooleanselinuxservicesetupshellslurpsubversionsupervisorctlsvr4pkgsysctltemplateuriuservagrantvirtwait_foryumzfs

(there will be a quiz at the end)

Page 13: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

• Over 1,350 GitHub followers and 400 forks

• Quadrupled the number of Pull Requests in less

than 2 months

• Rapid and productive release cycle: 21 modules

added since 1.0, total of 80 modules: “batteries

included”

• De facto standard in Fedora and soon in OpenShift

• Exponential adoption in enterprise, startup, and open

source project environments

Ansible In The Open

Page 14: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

A Simple Playbook---- name: install and start apache hosts: all user: root

tasks:

- name: install httpd yum: pkg=httpd state=latest

- name: start httpd service: name=httpd state=running

Page 15: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Orchestration Example

The user executes an Ansible playbook which contains step-by-step instructions on how to perform the update.

Playbooks are simple, human-readable descriptions of IT workflows.

Page 16: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Orchestration Example

This step updates the app server tier. The servers are going to be updated ten at a time, in a rolling update.

Ansible will talk to the load balancers to coordinate each batch. A maintenance window is also set on the monitoring system.

Page 17: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Orchestration Example

Now the same thing happens for the web server tier.

Page 18: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Orchestration Example

Finally, Ansible returns a summary of tasks performed.

Ansible can be configured to store data in a wide variety of data sources, send email reports, and more. If any errors occurred during any of the steps, the administrator will be notified.

Page 19: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

AnsibleWorks• Incorporated in 2013

• Red Hat executive leadership as founding team

• 30+ years in combined experience in OSS, Cloud and CM.

• Ansible project founder as CTO

• Author of previous DevOps tools: Cobbler and Func

• Products and services:

• Continued Ansible development and additional tools

• Subscription support

• Professional services and training

Page 20: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

Copyright (C) 2013 AnsibleWorks, Inc.

Contact Info

• Tim Gerla - VP of Services and Support

[email protected]

• Twitter: @AnsibleWorks

• http://www.ansibleworks.com

• http://www.github.com/ansible/ansible/

Page 21: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

Ansible AWS Modules Lester Wade Cloud Solution Engineer

Page 22: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

AWS Module Overview

• Modules can be used to easily perform actions/tasks on remote hosts

• Ansible's module library (as of 1.1) contains a number of AWS-related modules:

• ec2 (idempotent requests)

• Used to provision instances

• ec2_facts

• Used to gather metadata fact from instances

• ec2_vol (not idempotent)

• Used to create and attach volume(s)

• s3 (idempotent)

• Used to put objects into S3

• cloudformation (idempotent)

• Used to deploy an AWS cloudformation stack

Page 23: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

EC2 Module

• Best used in a provision playbook or as part of a "stack" deployment

• Launch an instance in Ansible's task-execution mode:

ansible localhost -c local -m ec2 -a "image=XXXXXX group=default

key_name=mykey type=m1.small"

Page 24: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2012 Eucalyptus Systems, Inc.

Thank you.

Lester Wade

[email protected]

Page 25: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2013 Eucalyptus Systems, Inc.

Questions?

1

Page 26: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2013 Eucalyptus Systems, Inc.

Learn More

Do More

Visit www.eucalyptus.com to learn about Eucalyptus 3.2

Download FastStart at www.eucalyptus.com/faststart

2

Page 27: Orchestration of AWS EC2 and Eucalyptus Cloud Instances Using Ansible

© 2013 Eucalyptus Systems, Inc. 3