a brief introduction to cloudformation
TRANSCRIPT
![Page 1: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/1.jpg)
![Page 2: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/2.jpg)
WELCOME!• Objective: provide a brief for launching a load-balanced
LAMP stack on Amazon CloudFormation.
![Page 3: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/3.jpg)
AN INTRODUCTION TO “SERVERS”
![Page 4: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/4.jpg)
THE CLOUD = THE FUTURE• “Everyone is going there.”
• “It’s old-fashioned to have your own server.”
• “Complete redundancy in the cloud.”
• “Dirt cheap.”
![Page 5: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/5.jpg)
THE CLOUD• A server
• A physical machine
• Shutdown turns off the
machine
• Indispensable
• An instance
• One or more machines
joined and then divided
• “Shutdown” disables or
destroys the instance
• Disposable
![Page 6: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/6.jpg)
AWS OVERVIEW• EC2: server instances
• EBS: elastic block storage, or a “removable” hard drive
• Elastic IP: pointing an IP address at an instance.
• ELB: load balancer
• S3: storage
![Page 7: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/7.jpg)
AWS OVERVIEW• RDS: managed database
• VPC: virtual private cloud
• Route 53: DNS
![Page 8: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/8.jpg)
GETTING STARTED• Need an AWS account
• Free Tier (1cpu, 1gb RAM)
![Page 9: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/9.jpg)
GETTING STARTED• Launch an instance:
• Go through wizard.
• SSH into instance.
• Download Apache, MySQL, PHP.
• Create the .conf files.
• Configure AWS to route traffic to your server (Route 53)
![Page 10: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/10.jpg)
LAUNCHING• Launching a singular
instance.
• Have to manually make all
changes.
• Have nightmares if your
instance crashes.
• “Easy”* to learn.
• Puppet / Chef / Ansible
• Automatically make all
changes.
• Helps you to sleep in
peace.
• Weeks/months to learn.
* if you already know bash
![Page 11: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/11.jpg)
IS THERE A HYBRID?
![Page 12: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/12.jpg)
MEET CLOUDFORMATION.
![Page 13: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/13.jpg)
github.com/
JosephMaxwell/
KCPUG-CloudFormation-Website
![Page 14: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/14.jpg)
lamp-stack.swiftotter.com
![Page 15: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/15.jpg)
CLOUDFORMATION• A JSON file
• Declarative instructions
• Configures the services mentioned in the overview
• Spins up as many instances as you wish
![Page 16: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/16.jpg)
CLOUDFORMATION• No individual instance configuration.
• No persistence of state after deletion.
• Templates are updatable once loaded into Amazon.
![Page 17: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/17.jpg)
FUNCTIONS• Ref
• Fn::Join
• Fn::Select
• Fn::GetAZs
• Fn::GetAtt
![Page 18: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/18.jpg)
REF• Returns the reference to an object:
• http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html
![Page 19: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/19.jpg)
FN::JOIN• Joins multiple strings together:
• http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-join.html
![Page 20: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/20.jpg)
FN::SELECT• Gets a value from a list:
• http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-select.html
![Page 21: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/21.jpg)
![Page 22: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/22.jpg)
![Page 23: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/23.jpg)
![Page 24: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/24.jpg)
![Page 25: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/25.jpg)
![Page 26: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/26.jpg)
DEMO TIME
![Page 27: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/27.jpg)
CONSIDERATIONS• DB access must be stored on each machine
• Session management
• Deployments
![Page 28: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/28.jpg)
QUESTIONS?
![Page 29: A brief introduction to CloudFormation](https://reader031.vdocument.in/reader031/viewer/2022022419/58cf70ab1a28abe6688b5109/html5/thumbnails/29.jpg)
GO FORTH!