• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Getting Started in AWS and Eucalyptus - AnsibleFest 2013
 

Getting Started in AWS and Eucalyptus - AnsibleFest 2013

on

  • 2,181 views

Presentation from 2013 AnsibleFest which describes practices for using Ansible against AWS and Eucalyptus clouds.

Presentation from 2013 AnsibleFest which describes practices for using Ansible against AWS and Eucalyptus clouds.

Statistics

Views

Total Views
2,181
Views on SlideShare
1,854
Embed Views
327

Actions

Likes
2
Downloads
5
Comments
0

3 Embeds 327

https://twitter.com 323
https://duckduckgo.com 3
http://moderation.local 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Getting Started in AWS and Eucalyptus - AnsibleFest 2013 Getting Started in AWS and Eucalyptus - AnsibleFest 2013 Presentation Transcript

    • Getting Started in AWS &EucalyptusLester Wade@LesterWade
    • Why Ansible?New and interesting.Subsequently found to be awesome.Contribution is easy.Python (note to python-boto).
    • AWS Modulesec2ec2_factsec2_volec2_elbrdscloudformations3
    • Two aspects...1. Working with AWS (compatible) services.2. Working with the resources (instances).
    • Example:ec2 provision + load balance + configure
    • Provision + Load Balance:tasks:- name: Launch instancelocal_action: ec2 keypair=mykey group=mygroup instance_type=m1.small image=emi- wait=true region=eu-west-1register: ec2- name: Add new instance to host grouplocal_action: add_host hostname=${item.public_ip} groupname=launchedwith_items: ${ec2.instances}- name: Wait for SSH to come uplocal_action: wait_for host=${item.public_dns_name} port=22 delay=60 timeout=320 state=startedwith_items: ${ec2.instances}- name: Add the instance to my LBlocal_action: ec2_elb instance_id=${item.id} state=present ec2_elbs=lwadeelbwith_items: ${ec2.instances}
    • Configure (based on dynamic host group)- name: Configure instance(s)hosts: launchedgather_facts: Truehandlers:- name: restart apacheaction: service name=httpd state=restartedtasks:- name: Ensure NTP is up and runningaction: service name=ntpd state=started- name: Install Apacheaction: yum name=httpd state=latestnotify: restart apache- name: Copy index.htmlaction: copy src=files/index.html dest=/var/www/html/index.html owner=root group=rootnotify: restart apache
    • "Oh nice, I can automate instance launchand configuration but what now... ?"
    • Working with instances (2)Transient- auto-scale in/out- die
    • Example: inventory pluginExample: ansible-pull
    • Schedule continual snapshot in cron(tab):# Refresh EC2 inventory cache every 15 minutesMAILTO="root@localhost"*/15 * * * * /etc/ansible/ec2.py --refresh-cache# Consider refresh-cache prior to crontabed playbook executionUtilize inventory:ansible-playbook -i /etc/ansible/ec2.py tag_Name_ansiblefest -m ping --private-key=/my/pri.key
    • Bake ansible + ansible-pull into an image.Run on boot or cron. rc.local or crontab -l:# Ansible first-boot runansible-pull -d /var/lib/ansible/local -U https://github.com/lwade/ansiblefest.git >> /var/log/ansible-pull.log 2>&1
    • Working with instances (2)Transient (e.g. auto-scaled in/out)Image-backed*
    • * Raw vs. Baked Imageschoco chip cookie, Bob Smith
    • Example: image buildinghttps://github.com/lwade/ansiblefest/blob/master/image-build/image-build.yml
    • Thanks