21
CARIMAC University of the West Indies at Mona Jamaica A Simple Plone Setup on Amazon EC2 David Bain [email protected]

EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

Embed Size (px)

DESCRIPTION

Things you'll want to know about Amazon EC2 for deploying Plone.

Citation preview

Page 1: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

A Simple Plone Setup on Amazon EC2

David [email protected]

Page 2: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

About Me● First Degree in Zoology (Marine etc...)● Discovered Open Source and Plone a few years ago● work @ the Caribbean Institute of Media and Communication● Tinkering with EC2 for a few months● Founding partner ●

Page 3: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

You and EC2● Do you know what it is?● Are you using EC2?

Page 4: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Overview● Parts● Methodology● Other Considerations

● Improvements● Other Approaches● Operating Costs● Future

Page 5: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Background:What is EC2?

● The Elastic Compute Cloud (EC2) is a system that makes it possible to run instances of an operating system on virtual infrastructure provided by Amazon.

Page 6: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Background:Benefits of EC2

● Scale when you need to● Time● Quantity● Power

● Manage programmatically via their API

● Usecase: Customer Service App that runs on Working Hours

Page 7: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Background:How it works

● Run a Virtual Machine● Amazon meters your usage● Pay for the time you use

Page 8: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Background:Goals of the SPLEC

● An easy to deploy, persistent Plone solution for EC2● Fast Setup - from zero to startup really quickly

Page 9: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Glossary of Acronyms● EC2 – Elastic Compute Cloud● EBS – Elastic Block Storage● S3 – Simple Storage Service● AMI – Amazon Machine Image●

Page 10: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

The Parts● Amazon Web Services● EC2 API/tools● Plone● Buildout● Shell Scripts

Page 11: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology● Tool Preparation● Launch AMI● Setup Elastic IP and DNS● Setup EBS● Run Deploy Scripts●

Page 12: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Tool Preparation

● Default Tools:● Need Java● Setup Variables● X.509 Certificate

● EC2_HOME=~/ec2-api-tools● PATH=$PATH:$EC2_HOME/bin/● export PATH● export EC2_HOME● export EC2_CERT=~/.ec2/cert-...xxx6.pem● export EC2_PRIVATE_KEY=~/.ec2/pk-..xxM6.pem● export JAVA_HOME=/usr

Page 13: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Tool Preparation – Elasticfox

● or Elasticfox●

● Needs:● Access Key● Secret Access Key●

Page 14: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Tool Preparation

● Default Tools Need Java● Setup Variables

● EC2_HOME=~/ec2-api-tools● PATH=$PATH:$EC2_HOME/bin/● export PATH● export EC2_HOME● export EC2_CERT=~/.ec2/cert-...xxx6.pem● export EC2_PRIVATE_KEY=~/.ec2/pk-..xxM6.pem● export JAVA_HOME=/usr

Page 15: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Setup Elastic IP and DNS

● Allocate an IP address● ec2-allocate-address ●

Page 16: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Launch AMI

● Select an AMI● Launch it (Use a secure keypair)●

● ec2-add-keypair supersecure-keypair > supersecure-key● ec2-run-instances ami-1cd73375 -k supersecure-key●

Page 17: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Associate IP

● ec2-associate-address 75.xx.xx.119 -i i-9aa905f3

Page 18: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Setup EBS

● Configure Elastic Block Storage● Mount on Instance● Format ?

Page 19: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Methodology:Deploy Plone

● Run Shell Scripts that Deploy Plone

Page 20: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Other Considerations● Other Considerations

● Other Approaches● Operating Costs -

http://calculator.s3.amazonaws.com/calc5.html● Improvements● Future

Page 21: EC2 Plone Presentation - Plone Conference Washington DC, October 8,2008

CARIMACUniversity of the West Indies

at MonaJamaica

Resources● Ubuntu and Debian AMIs - http://alestic.com/●