197
Getting Started with PoolParty & EC2

Getting Started with PoolParty and EC2

Embed Size (px)

DESCRIPTION

Slides from a presentation and workshop on using Amazon's EC2 with PoolParty. Given in Pasadena, CA in Feb 09.

Citation preview

Page 1: Getting Started with PoolParty and EC2

Getting Started with PoolParty & EC2

Page 2: Getting Started with PoolParty and EC2

PoolParty

Page 3: Getting Started with PoolParty and EC2

PoolParty

• PoolParty makes it easy and simple to configure any cloud of computers

Page 4: Getting Started with PoolParty and EC2

PoolParty

• PoolParty makes it easy and simple to configure any cloud of computers

• Written in Ruby and Erlang

Page 5: Getting Started with PoolParty and EC2

PoolParty

Page 6: Getting Started with PoolParty and EC2

PoolParty

• Not Ruby or Rails specific

Page 7: Getting Started with PoolParty and EC2

PoolParty

• Not Ruby or Rails specific

• Not even tied to Amazon EC2

Page 8: Getting Started with PoolParty and EC2

sample config

Page 9: Getting Started with PoolParty and EC2

Amazon

Page 10: Getting Started with PoolParty and EC2
Page 11: Getting Started with PoolParty and EC2

EC2

Page 12: Getting Started with PoolParty and EC2

EC2 S3

Page 13: Getting Started with PoolParty and EC2

EC2 S3

EBS

Page 14: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Page 15: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Elastic IP

Page 16: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Elastic IP Keypairs

Page 17: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Elastic IP Keypairs

Security Groups

Page 18: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Elastic IP Keypairs

Security GroupsCloudFront

Page 19: Getting Started with PoolParty and EC2

EC2 S3

EBS AMI

Elastic IP Keypairs

Security GroupsCloudFront???

Page 20: Getting Started with PoolParty and EC2

Amazon: EC2

Page 21: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

Page 22: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

• ec2-* (git-style) commands such as:

Page 23: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

• ec2-* (git-style) commands such as:

• ec2-run-instances

Page 24: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

• ec2-* (git-style) commands such as:

• ec2-run-instances

• ec2-terminate-instances

Page 25: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

• ec2-* (git-style) commands such as:

• ec2-run-instances

• ec2-terminate-instances

• ec2-allocate-address

Page 26: Getting Started with PoolParty and EC2

Amazon: EC2

• Platform to launch machine instances

• ec2-* (git-style) commands such as:

• ec2-run-instances

• ec2-terminate-instances

• ec2-allocate-address

• etc.

Page 27: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

Page 28: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

Page 29: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

• Conceptually similar to a Xen or VMware image

Page 30: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

• Conceptually similar to a Xen or VMware image

• Base to build on

Page 31: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

• Conceptually similar to a Xen or VMware image

• Base to build on

• Hundreds pre-built

Page 32: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

• Conceptually similar to a Xen or VMware image

• Base to build on

• Hundreds pre-built

• Snapshots

Page 33: Getting Started with PoolParty and EC2

Amazon: EC2 (AMIs)

• AMI - Amazon Machine Image

• Conceptually similar to a Xen or VMware image

• Base to build on

• Hundreds pre-built

• Snapshots

• PoolParty default is the widely used ami-1cd73375 - ec2ubuntu

Page 34: Getting Started with PoolParty and EC2

Amazon: EC2

Page 35: Getting Started with PoolParty and EC2

Amazon: EC2

• Primarily uses ephemeral storage

Page 36: Getting Started with PoolParty and EC2

Amazon: EC2

• Primarily uses ephemeral storage

• e.g. node crashes = data gone (sortof)

Page 37: Getting Started with PoolParty and EC2

Amazon: EC2

• Primarily uses ephemeral storage

• e.g. node crashes = data gone (sortof)

• requires new way to think about servers

Page 38: Getting Started with PoolParty and EC2

Amazon: EC2

• Primarily uses ephemeral storage

• e.g. node crashes = data gone (sortof)

• requires new way to think about servers

• forces redundancy and clustering issues to the front

Page 39: Getting Started with PoolParty and EC2

Amazon: S3

Page 40: Getting Started with PoolParty and EC2

Amazon: S3

• Simple Storage Service (S3)

Page 41: Getting Started with PoolParty and EC2

Amazon: S3

• Simple Storage Service (S3)

• Persistent

Page 42: Getting Started with PoolParty and EC2

Amazon: S3

• Simple Storage Service (S3)

• Persistent

• Data stored in “buckets”

Page 43: Getting Started with PoolParty and EC2

Amazon: S3

• Simple Storage Service (S3)

• Persistent

• Data stored in “buckets”

• EC2 does not use S3 *directly*

Page 44: Getting Started with PoolParty and EC2

Amazon: EBS

Page 45: Getting Started with PoolParty and EC2

Amazon: EBS

• Elastic Block Store

Page 46: Getting Started with PoolParty and EC2

Amazon: EBS

• Elastic Block Store

• Persistent disks for EC2 instances

Page 47: Getting Started with PoolParty and EC2

Amazon: EBS

• Elastic Block Store

• Persistent disks for EC2 instances

• Can store snapshots on S3

Page 48: Getting Started with PoolParty and EC2

Amazon: EBS

• Elastic Block Store

• Persistent disks for EC2 instances

• Can store snapshots on S3

• Fast

Page 49: Getting Started with PoolParty and EC2

Amazon: EBS

• Elastic Block Store

• Persistent disks for EC2 instances

• Can store snapshots on S3

• Fast

• Mounts to only one instance at a time (not a SAN)

Page 50: Getting Started with PoolParty and EC2

Amazon: Elastic IPs

Page 51: Getting Started with PoolParty and EC2

Amazon: Elastic IPs

• Instance IP addresses are dynamic

Page 52: Getting Started with PoolParty and EC2

Amazon: Elastic IPs

• Instance IP addresses are dynamic

• Elastic IPs are static

Page 53: Getting Started with PoolParty and EC2

Amazon: Elastic IPs

• Instance IP addresses are dynamic

• Elastic IPs are static

• Free to use, but $0.01/hr if unassociated with an instance

Page 54: Getting Started with PoolParty and EC2

EC2 Security Groups

Page 55: Getting Started with PoolParty and EC2

EC2 Security Groups

• Amazon has a strict firewall

Page 56: Getting Started with PoolParty and EC2

EC2 Security Groups

• Amazon has a strict firewall

•ec2-authorize

Page 57: Getting Started with PoolParty and EC2

EC2 Security Groups

• Amazon has a strict firewall

•ec2-authorize

• default security group nodes have unlimited (network) access to each other

Page 58: Getting Started with PoolParty and EC2

EC2 Security Groups

• Amazon has a strict firewall

•ec2-authorize

• default security group nodes have unlimited (network) access to each other

• everything else is turned off

Page 59: Getting Started with PoolParty and EC2

EC2 Security Groups

ec2-add-group web -d "Web server group" ec2-authorize -p 80 webec2-authorize -p 22 web

Page 60: Getting Started with PoolParty and EC2

EC2 Security Groups

ec2-add-group web -d "Web server group" ec2-authorize -p 80 webec2-authorize -p 22 webec2-authorize -P icmp -t -1:-1 web

Page 61: Getting Started with PoolParty and EC2

Amazon: CloudFront

Page 62: Getting Started with PoolParty and EC2

Amazon: CloudFront

• Amazon’s “self service” CDN

Page 63: Getting Started with PoolParty and EC2

Amazon: CloudFront

• Amazon’s “self service” CDN

• Pay-as-you-go

Page 64: Getting Started with PoolParty and EC2

Amazon: CloudFront

• Amazon’s “self service” CDN

• Pay-as-you-go

• Upload to S3

Page 65: Getting Started with PoolParty and EC2

Amazon: CloudFront

• Amazon’s “self service” CDN

• Pay-as-you-go

• Upload to S3

• Content is distributed & cached on Amazon’s machines

Page 66: Getting Started with PoolParty and EC2

PoolParty

Page 67: Getting Started with PoolParty and EC2

PoolParty overview

Page 68: Getting Started with PoolParty and EC2

PoolParty overview

• binary tools

Page 69: Getting Started with PoolParty and EC2

PoolParty overview

• binary tools

• configuration files

Page 70: Getting Started with PoolParty and EC2

PoolParty overview

• binary tools

• configuration files

• erlang-driven messenger

Page 71: Getting Started with PoolParty and EC2

PoolParty: Binary Tools

Page 72: Getting Started with PoolParty and EC2

PoolParty: Binary Tools

• pool-* binaries

Page 73: Getting Started with PoolParty and EC2

PoolParty: Binary Tools

• pool-* binaries

• server-* binaries

Page 74: Getting Started with PoolParty and EC2

PoolParty: Binary Tools

Shell Example

Page 75: Getting Started with PoolParty and EC2

PoolParty Configuration

Page 76: Getting Started with PoolParty and EC2

PoolParty Configuration

Page 77: Getting Started with PoolParty and EC2

PoolParty Configuration

Page 78: Getting Started with PoolParty and EC2

PoolParty Configuration

Page 79: Getting Started with PoolParty and EC2

PoolParty Configuration

Shell Examplea look at clouds/plugins/poolparty-mysql-plugin/mysql.rb

Page 80: Getting Started with PoolParty and EC2

how does this actually work?

Page 81: Getting Started with PoolParty and EC2

Puppet

Page 82: Getting Started with PoolParty and EC2

Puppet

Page 83: Getting Started with PoolParty and EC2

Puppet

• Puppet is a system for automating system administration tasks.

Page 84: Getting Started with PoolParty and EC2

Puppet

• Puppet is a system for automating system administration tasks.

• Being used at Google to manage all Mac desktops and laptops, expanding into Linux clients.

Page 85: Getting Started with PoolParty and EC2

Puppet

• Puppet is a system for automating system administration tasks.

• Being used at Google to manage all Mac desktops and laptops, expanding into Linux clients.

• Red Hat - In the process of moving legacy systems onto Puppet.

Page 86: Getting Started with PoolParty and EC2

Puppet

Page 87: Getting Started with PoolParty and EC2

Puppet

• Resources: files, folders, permissions, cron jobs, mounted directories, packages, ssh keys, services, arbitrary commands, etc.

Page 88: Getting Started with PoolParty and EC2

Puppet

• Resources: files, folders, permissions, cron jobs, mounted directories, packages, ssh keys, services, arbitrary commands, etc.

• Mini-language

Page 89: Getting Started with PoolParty and EC2

Puppet

• Resources: files, folders, permissions, cron jobs, mounted directories, packages, ssh keys, services, arbitrary commands, etc.

• Mini-language

• Dependencies

Page 90: Getting Started with PoolParty and EC2

Puppet

• Resources: files, folders, permissions, cron jobs, mounted directories, packages, ssh keys, services, arbitrary commands, etc.

• Mini-language

• Dependencies

• If/unless conditions

Page 91: Getting Started with PoolParty and EC2

Puppet

• Resources: files, folders, permissions, cron jobs, mounted directories, packages, ssh keys, services, arbitrary commands, etc.

• Mini-language

• Dependencies

• If/unless conditions

• Variables

Page 92: Getting Started with PoolParty and EC2

Puppet

Page 93: Getting Started with PoolParty and EC2

Puppet

• Client/Server architecture

Page 94: Getting Started with PoolParty and EC2

Puppet

• Client/Server architecture

• puppetmasterd

Page 95: Getting Started with PoolParty and EC2

Puppet

• Client/Server architecture

• puppetmasterd

•puppetd

Page 96: Getting Started with PoolParty and EC2

Puppet: Language Example

Page 97: Getting Started with PoolParty and EC2

Puppet: Language Example

Page 98: Getting Started with PoolParty and EC2

Puppet: Language Example

Page 99: Getting Started with PoolParty and EC2

Puppet: Language Example

Page 100: Getting Started with PoolParty and EC2

Puppet: Language Example

Page 101: Getting Started with PoolParty and EC2

Puppet

Page 102: Getting Started with PoolParty and EC2

Puppet

• Puppet base config:

/etc/puppet/puppet.conf

Page 103: Getting Started with PoolParty and EC2

Puppet

• Puppet base config:

/etc/puppet/puppet.conf

• PoolParty’s Puppet config:

/etc/puppet/manifests/classes/poolparty.pp

Page 104: Getting Started with PoolParty and EC2

Puppet Configuration

Shell Examplea look at /etc/puppet/manifests/classes/poolparty.pp

Page 105: Getting Started with PoolParty and EC2

Puppet

• Cron jobs:* 1 * * * . /etc/profile && puppetmasterd --verbose

*/15 * * * * /usr/bin/puppetrunner

Page 106: Getting Started with PoolParty and EC2

Puppet

Page 107: Getting Started with PoolParty and EC2

Puppet

• Builds dependency graph

Page 108: Getting Started with PoolParty and EC2

Puppet

• Builds dependency graph

• Provisions the machines (e.g. runs the commands)

Page 109: Getting Started with PoolParty and EC2

Puppet Security

Page 110: Getting Started with PoolParty and EC2

Puppet Security

• Uses SSL certificates as the required and only form of authentication

Page 111: Getting Started with PoolParty and EC2

Puppet Security

• Uses SSL certificates as the required and only form of authentication

• Master authenticates the certificates

Page 112: Getting Started with PoolParty and EC2

Puppet Security

• Uses SSL certificates as the required and only form of authentication

• Master authenticates the certificates

• Test certificate from node:

/usr/sbin/puppetd --waitforcert 60 \ --server master --test --verbose

Page 113: Getting Started with PoolParty and EC2

Puppet Security

• Uses SSL certificates as the required and only form of authentication

• Master authenticates the certificates

• Test certificate from node:

/usr/sbin/puppetd --waitforcert 60 \ --server master --test --verbose

• If certificate doesn’t match, probably cached on server. Try on master:

puppetca --clean node1.compute-1.internal

Page 114: Getting Started with PoolParty and EC2

Puppet Cache

Page 115: Getting Started with PoolParty and EC2

Puppet Cache

• Keeps a cache of the parsed configuration in:

/var/lib/puppet/localconfig.yaml

Page 116: Getting Started with PoolParty and EC2

Troubleshooting Puppet

Page 117: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

Page 118: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

• Can the nodes contact master?

Page 119: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

• Can the nodes contact master?

• Do the certificates match?

Page 120: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

• Can the nodes contact master?

• Do the certificates match?

• Does /var/lib/puppet/localconfig.yaml contain the right information?

Page 121: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

• Can the nodes contact master?

• Do the certificates match?

• Does /var/lib/puppet/localconfig.yaml contain the right information?

• Does /etc/puppet/manifests/classes/poolparty.pp contain the right information?

Page 122: Getting Started with PoolParty and EC2

Troubleshooting Puppet• tail -f /var/log/syslog

• Can the nodes contact master?

• Do the certificates match?

• Does /var/lib/puppet/localconfig.yaml contain the right information?

• Does /etc/puppet/manifests/classes/poolparty.pp contain the right information?

• Does /var/poolparty/poolparty.pp contain the right information? (more on that later)

Page 123: Getting Started with PoolParty and EC2

Troubleshooting Puppet

Page 124: Getting Started with PoolParty and EC2

Troubleshooting Puppet

•server-provision -n app -i 1 \

--slave --verbose --debug

Page 125: Getting Started with PoolParty and EC2

master

Page 126: Getting Started with PoolParty and EC2

PoolParty DNS

root@master:~# cat /etc/hosts127.0.0.1 localhost.localdomain localhost127.0.0.1 master75.101.128.147 master puppet localhost10.252.166.18 node1.app node110.252.167.47 master.app master

on master

Page 127: Getting Started with PoolParty and EC2

PoolParty DNS

root@master:~# cat /etc/hosts127.0.0.1 localhost.localdomain localhost127.0.0.1 master75.101.128.147 master puppet localhost10.252.166.18 node1.app node110.252.167.47 master.app master

on master

root@node1:~# cat /etc/hosts127.0.0.1 localhost.localdomain localhost127.0.0.1 node175.101.128.147 puppet master10.252.167.47 master.app master10.252.166.18 node1.app node1

on node1

Page 128: Getting Started with PoolParty and EC2

PoolParty DNS

• /etc/hosts modified by PoolParty when you cloud provision

Page 129: Getting Started with PoolParty and EC2

HAProxy

Page 130: Getting Started with PoolParty and EC2

HAProxy

Page 131: Getting Started with PoolParty and EC2

HAProxy

• Extremely fast

Page 132: Getting Started with PoolParty and EC2

HAProxy

• Extremely fast

• Reports of HAProxy saturating gigabit fiber (http://is.gd/4myI)

Page 133: Getting Started with PoolParty and EC2

HAProxy

• Extremely fast

• Reports of HAProxy saturating gigabit fiber (http://is.gd/4myI)

• Reputation of being reliable and secure

Page 134: Getting Started with PoolParty and EC2

HAProxy

• Extremely fast

• Reports of HAProxy saturating gigabit fiber (http://is.gd/4myI)

• Reputation of being reliable and secure

• Installed and setup by PoolParty by default

Page 135: Getting Started with PoolParty and EC2

HAProxy

Page 136: Getting Started with PoolParty and EC2

HAProxy

• Config kept in:

/etc/haproxy.cfg

Page 137: Getting Started with PoolParty and EC2

HAProxy

• Config kept in:

/etc/haproxy.cfg

•Reload config by:

/etc/init.d/haproxy reload

Page 138: Getting Started with PoolParty and EC2

HAProxy• View stats by:

http://ec2-your-ip/poolparty

Page 139: Getting Started with PoolParty and EC2

HAProxy• View stats by:

http://ec2-your-ip/poolparty

Page 140: Getting Started with PoolParty and EC2

PoolParty Messenger

Page 141: Getting Started with PoolParty and EC2

PoolParty Messenger

Page 142: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

Page 143: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

• Master

Page 144: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

• Master

• Node

Page 145: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

• Master

• Node

• Client

Page 146: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

• Master

• Node

• Client

• “Instance Glue”

Page 147: Getting Started with PoolParty and EC2

PoolParty Messenger

• Three parts:

• Master

• Node

• Client

• “Instance Glue”

• Master provisions nodes (will change)

Page 148: Getting Started with PoolParty and EC2

PoolParty Messenger

Page 149: Getting Started with PoolParty and EC2

PoolParty Messenger

• Erlang - excellent node-to-node monitoring

Page 150: Getting Started with PoolParty and EC2

PoolParty Messenger

• Erlang - excellent node-to-node monitoring

• Gathers load data

Page 151: Getting Started with PoolParty and EC2

PoolParty Messenger

• Erlang - excellent node-to-node monitoring

• Gathers load data

• Decides when to launch new nodes

Page 152: Getting Started with PoolParty and EC2

PoolParty Messenger

Page 153: Getting Started with PoolParty and EC2

PoolParty Messenger

• Changes happening in architecture

Page 154: Getting Started with PoolParty and EC2

PoolParty Messenger

• Changes happening in architecture

• Will become neighborhood-based instead of master/node-based

Page 155: Getting Started with PoolParty and EC2

PoolParty Messenger

• Changes happening in architecture

• Will become neighborhood-based instead of master/node-based

• The brains of the operation when humans aren’t around

Page 156: Getting Started with PoolParty and EC2

Using PoolParty

Page 157: Getting Started with PoolParty and EC2

Using PoolParty

Page 158: Getting Started with PoolParty and EC2

Using PoolParty

• cloud start

Page 159: Getting Started with PoolParty and EC2

Using PoolParty

• cloud start

• cloud configure --verbose --debug

Page 160: Getting Started with PoolParty and EC2

Using PoolParty

• cloud start

• cloud configure --verbose --debug

• cloud provision --verbose --debug

Page 161: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

Page 162: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PoolParty reads clouds.pool

Page 163: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PoolParty reads clouds.pool

• Generates templates, puppet configs, etc in a local storage directory (/tmp/poolparty)

Page 164: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PoolParty reads clouds.pool

• Generates templates, puppet configs, etc in a local storage directory (/tmp/poolparty)

• Files are rsync’d to /var/poolparty on master

Page 165: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PoolParty reads clouds.pool

• Generates templates, puppet configs, etc in a local storage directory (/tmp/poolparty)

• Files are rsync’d to /var/poolparty on master

• A gang of bootstrapping tasks are run (via Capistrano)

Page 166: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PoolParty reads clouds.pool

• Generates templates, puppet configs, etc in a local storage directory (/tmp/poolparty)

• Files are rsync’d to /var/poolparty on master

• A gang of bootstrapping tasks are run (via Capistrano)

• Puppet config is cp’d from /var/poolparty to /etc/puppet/manifests/classes/poolparty.pp

Page 167: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

Page 168: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet is started

Page 169: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet is started

• Puppet tries to provision everything

Page 170: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet is started

• Puppet tries to provision everything

• Puppet starts PP Messenger master

Page 171: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

Page 172: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PP Messenger master contacts Amazon and boots more instances if needed.

Page 173: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PP Messenger master contacts Amazon and boots more instances if needed.

• PP Messenger bootstraps the new node

Page 174: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PP Messenger master contacts Amazon and boots more instances if needed.

• PP Messenger bootstraps the new node

• The bootstrap process starts PP Messenger Node

Page 175: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PP Messenger master contacts Amazon and boots more instances if needed.

• PP Messenger bootstraps the new node

• The bootstrap process starts PP Messenger Node

• PP Messenger initiates Puppet provisioning on the new node

Page 176: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• PP Messenger master contacts Amazon and boots more instances if needed.

• PP Messenger bootstraps the new node

• The bootstrap process starts PP Messenger Node

• PP Messenger initiates Puppet provisioning on the new node

• time passes

Page 177: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

Page 178: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet runs on master and master discovers a new node has been started.

Page 179: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet runs on master and master discovers a new node has been started.

• In the case of HAProxy/Apache, Puppet re-generates the HAProxy config to include the new node.

Page 180: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet runs on master and master discovers a new node has been started.

• In the case of HAProxy/Apache, Puppet re-generates the HAProxy config to include the new node.

• As specified in poolparty.pp, when haproxy.cnf gets updated, it asks HAProxy to reload.

Page 181: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Puppet runs on master and master discovers a new node has been started.

• In the case of HAProxy/Apache, Puppet re-generates the HAProxy config to include the new node.

• As specified in poolparty.pp, when haproxy.cnf gets updated, it asks HAProxy to reload.

• HAProxy now starts distributing the load to the new node

Page 182: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

Page 183: Getting Started with PoolParty and EC2

Using PoolParty: What Happens

• Similar config changes happen throughout the system

Page 184: Getting Started with PoolParty and EC2

Real World Misc.

Page 185: Getting Started with PoolParty and EC2

Real World Misc.

Page 186: Getting Started with PoolParty and EC2

Real World Misc.

• tail -f /var/log/syslog is your friend

Page 187: Getting Started with PoolParty and EC2

Real World Misc.

• tail -f /var/log/syslog is your friend

• ssh into master:

cloud ssh

Page 188: Getting Started with PoolParty and EC2

Real World Misc.

• tail -f /var/log/syslog is your friend

• ssh into master:

cloud ssh

• ssh into i’th node:

cloud ssh -i 1

Page 189: Getting Started with PoolParty and EC2

Real World Misc.

Page 190: Getting Started with PoolParty and EC2

Real World Misc.

•scp scp -i /Users/me/.ec2/id_rsa-clouds_app \

[email protected]:/ \

etc/snmp/snmpd.conf .

Page 191: Getting Started with PoolParty and EC2

Real World Misc.

•scp scp -i /Users/me/.ec2/id_rsa-clouds_app \

[email protected]:/ \

etc/snmp/snmpd.conf .

•rsyncrsync -av -e "ssh -i /var/poolparty/id_rsa-clouds_app" \

/var/www/cpohunterfan.com/documents node1:/var/www/cpohunterfan.com/

Page 192: Getting Started with PoolParty and EC2

Workshop

Page 193: Getting Started with PoolParty and EC2

Agenda:

Page 194: Getting Started with PoolParty and EC2

Agenda:

• Launch, login, terminate an EC2 instance

Page 195: Getting Started with PoolParty and EC2

Agenda:

• Launch, login, terminate an EC2 instance

• cloud ssh into our instances and look around

Page 196: Getting Started with PoolParty and EC2

Agenda:

• Launch, login, terminate an EC2 instance

• cloud ssh into our instances and look around

• Take a closer look at clouds.pool

Page 197: Getting Started with PoolParty and EC2

Agenda:

• Launch, login, terminate an EC2 instance

• cloud ssh into our instances and look around

• Take a closer look at clouds.pool

• Examine a basic PoolParty plugin