a brief introduction to cloudformation

29

Upload: swiftotter-studios

Post on 22-Jan-2018

151 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: A brief introduction to CloudFormation
Page 2: A brief introduction to CloudFormation

WELCOME!• Objective: provide a brief for launching a load-balanced

LAMP stack on Amazon CloudFormation.

Page 3: A brief introduction to CloudFormation

AN INTRODUCTION TO “SERVERS”

Page 4: A brief introduction to CloudFormation

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

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

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

AWS OVERVIEW• RDS: managed database

• VPC: virtual private cloud

• Route 53: DNS

Page 8: A brief introduction to CloudFormation

GETTING STARTED• Need an AWS account

• Free Tier (1cpu, 1gb RAM)

Page 9: A brief introduction to CloudFormation

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

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

IS THERE A HYBRID?

Page 12: A brief introduction to CloudFormation

MEET CLOUDFORMATION.

Page 13: A brief introduction to CloudFormation

github.com/

JosephMaxwell/

KCPUG-CloudFormation-Website

Page 14: A brief introduction to CloudFormation

lamp-stack.swiftotter.com

Page 15: A brief introduction to CloudFormation

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

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

FUNCTIONS• Ref

• Fn::Join

• Fn::Select

• Fn::GetAZs

• Fn::GetAtt

Page 18: A brief introduction to CloudFormation

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

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

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
Page 22: A brief introduction to CloudFormation
Page 23: A brief introduction to CloudFormation
Page 24: A brief introduction to CloudFormation
Page 25: A brief introduction to CloudFormation
Page 26: A brief introduction to CloudFormation

DEMO TIME

Page 27: A brief introduction to CloudFormation

CONSIDERATIONS• DB access must be stored on each machine

• Session management

• Deployments

Page 28: A brief introduction to CloudFormation

QUESTIONS?

Page 29: A brief introduction to CloudFormation

GO FORTH!