aws and ansible - red hat€¦ · aws and ansible automating scalable (and repeatable) architecture...

35
AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner Solutions Architect, Amazon Web Services Ryan Brown, Senior Software Engineer, Ansible by Red Hat May 4, 2017

Upload: others

Post on 24-May-2020

35 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

AWS and Ansible

Automating Scalable (and Repeatable) Architecture

Timothy Appnel, Principal Product Manager, Ansible by Red HatDavid Duncan, Partner Solutions Architect, Amazon Web ServicesRyan Brown, Senior Software Engineer, Ansible by Red Hat

May 4, 2017

Page 2: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

+

Page 3: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

SIMPLE POWERFUL AGENTLESS

DATA CENTER-LESS

SERVERLESS

Page 4: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

AWS re:Invent Game Day 2016(AWS + Ansible + Fun + Vegas!)

Page 5: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner
Page 6: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

A fun way to learn

Page 7: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

A fun way to learn

Page 8: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

Best Practices

Page 9: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

The Debrief

Page 10: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

Deliver Results

Page 11: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

Deliver Results

Page 12: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

AWS & ANSIBLE INTEGRATION

Page 13: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE & AWS: BATTERIES INCLUDEDOut of the box, Ansible has dynamic EC2 inventory support and nearly 100 modules supporting AWS capabilities, including:

AMI ManagementAutoscaling GroupsCloudFormationCloudTrailCloudWatchDynamoDBElastiCacheElastic Block Store (EBS)Elastic Cloud Compute (EC2)EC2 Container Service (ECS)Elastic IPs (EIP)

Elastic Load Balancers (ELB)Identity Access Manager (IAM)KinesisLambdaRedshiftRelational Database ServiceRoute53Security GroupsSecurity Token ServiceSimple Storage Service (S3)Virtual Private Cloud (VPC)

Page 14: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

BATTERIES GALOREhttp://docs.ansible.com/ansible/list_of_all_modules.html

Page 15: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

MORE BATTERIES SOON

● Serverless Application Model (SAM)● Direct Connect● Data Pipeline● Key Management Service (KMS)● Lightsail

Page 16: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE TOWER INTEGRATION

● Dynamic Inventory● Credentials Management● Provisioning Callbacks (Autoscaling)● Tower CLI tool (such as CodeDeploy integration)

Page 17: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner
Page 18: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

RED HAT CLOUDFORMS

Deliver Services Across Your Hybrid Cloud

● Hybrid Cloud Management● Self-Service Provisioning● Policy-Driven Compliance

Page 19: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE & SERVERLESS

Page 20: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

AGENTLESS TO SERVERLESS

● Network device connection plugins● Container connection plugins● Cloud APIs as another plugin

○ Lambda○ DynamoDB○ RDS○ Route53○ CloudFront

Page 21: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE ALL-IN

● Ansible skills 100% transferrable● Add to existing playbooks● Great for “Lambda Light” workloads

Page 22: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

EXAMPLE- lambda:

name: sendReportMail

zip_file: "{{ deployment_package }}"

runtime: python2.7

timeout: 20

handler: handler.handler

memory_size: 1024

role: "{{ iam_exec_role }}"

register: lambda

Page 23: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

EVENT- cloudwatchevent_rule:

description: "Send out incident summary daily"

name: incident_summary_schedule

schedule_expression: 'rate(1 day)'

targets:

- id: SendSummary

arn: "{{ lambda.configuration.function_arn }}"

input: ‘{“Test”: “Cronjob”}’

Page 24: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

INVOKE- execute_lambda:

name: myNewFunction

payload:

arbitrary: json

can: “go here”

wait: true

Page 25: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

DOWNSIDE

● Not all event sources supported (yet)● Ansible release cycle doesn’t follow Lambda/API Gateway releases

Page 26: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + SERVERLESS FRAMEWORKBest of both worlds

● Serverless Framework primarily outputs CloudFormation● Resources from Serverless can be gathered by Ansible● Optimized for Lambda+event sources

Page 27: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + CLOUDFORMATIONBest of both worlds

- cloudformation:

stack_name: prod-vpc

state: present

template: base_vpc.yml

- cloudformation_facts:

stack_name: external_stack

register: stack_info

Page 28: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + CLOUDFORMATIONIn base_vpc.yaml

Outputs:

VpcId:

Value: !Ref AppVPC

Export: {Name: !Sub “${Stage}-VPCID”}

SubnetA:

Value: !Ref SubnetA

SubnetB:

Value: !Ref SubnetB

Page 29: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + SERVERLESS

- serverless_deploy:

stage: prod

region: us-east-1

- cloudformation_facts:

stack_name: petstore-prod

register: sls_stack

Page 30: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + SERVERLESS FRAMEWORKMigration planning

● Attention to detail - who owns resources needed by both?● Make sure data is close enough to new & old systems● Don’t couple serverless & legacy too tightly● Remember Ansible can populate Serverless variable files

Page 31: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

ANSIBLE + AWS SAMSoon…

● Serverless Application Model is mostly transforms in front of CloudFormation● Planned for 2.4 as extension to CloudFormation module● Expect same facts/vars/params to work with SAM

Page 32: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

DEMOS & WALKTHROUGHS

Page 33: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

AWS & ANSIBLE NEXT STEPS

Would you like to dig deeper with Ansible? It’s easy to get started:ansible.com/get-started

The power of AWS meets the simplicity of Ansible: ansible.com/aws

Because container orchestration is never just container orchestration:ansible.com/containers

Have you used Ansible already? Try Tower for free:ansible.com/tower-trial

Page 34: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner

THANK YOUplus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHatNews

Page 35: AWS and Ansible - Red Hat€¦ · AWS and Ansible Automating Scalable (and Repeatable) Architecture Timothy Appnel, Principal Product Manager, Ansible by Red Hat David Duncan, Partner