26
Rob Linton www.Jasondb.com [email protected] EBS AMI’S Migrating EBS AMI’s between AWS Regions

PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Embed Size (px)

DESCRIPTION

This presentation was shown at the Australian AWS User group in September in Melbourne and is the presentation side of the step by step guide for migrating AWS EBS backed AMI's between regions. This presentation is designed to be shown in conjunction with the tutorial document.

Citation preview

Page 1: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

EBS AMI’SMigrating EBS AMI’s between AWS Regions

Page 2: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EASTUS-WEST

AMI

Running Instance

VolumeSnapshot

AMI

Running Instance

VolumeSnapshot

How to migrate EBS AMI’s between regions?

Page 3: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Step 1 – Starting with an AMI in US-EAST

Step 2 – Create a Volume from the AMI Root snapshot

Step 3 – Mount the volume on a running EC2 instance

Step 4 – Configure a receiving instance in the destination region

Step 5 – Copy the private key to the source server

Step 6 – Copy the volume from the source server to the destination server.

Step 7 – Create an AMI in the destination region

Steps

Page 4: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EAST

AMI

Step 1 – Starting with an AMI in US-EAST

Page 5: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 6: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EAST

AMI

VolumeSnapshot

Step 2 – Create a Volume from the AMI Root snapshot

Page 7: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 8: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 9: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EAST

AMI

Step 3 – Mount the volume on a running EC2 instance

EC2Micro

Instance

EBSVolume/dev/sdf

Source

Page 10: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 11: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EASTUS-WEST

EC2Micro

Instance

EBSVolume/dev/sdf

Source

EC2Micro

Instance

EBSVolume/dev/sdf

Destination

Step 4 – Configure a receiving instance in the destination region

Page 12: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 13: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EASTUS-WEST

EC2Micro

Instance

EBSVolume/dev/sdf

Source

EC2Micro

Instance

EBSVolume/dev/sdf

Destination

Step 5 – Copy the private key to the source server

Page 14: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 15: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 16: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

scp -i ping-us-east.pem ping-us-west.pem [email protected]:/tmp

ssh -i ping-us-east.pem [email protected]

Step 5 – Copy the private key to the source server

ssh login command

scp copy command

Page 17: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 18: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-EASTUS-WEST

EC2Micro

Instance

EBSVolume/dev/sdf

Source

EC2Micro

Instance

EBSVolume/dev/sdf

Destination

Step 6 – Copy the volume from the source server to the destination server.

Page 19: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

EC2Micro

Instance

EBSVolume/dev/sdf

EC2Micro

Instance

EBSVolume/dev/sdf

dd gzip ssh gzip dd

SourceDestination

Step 6 – Copy the volume from the source server to the destination server.

Breakdown of the steps

$> dd if=/dev/sdf |gzip -c -1 | ssh -i ping-us-west.pem [email protected] "gunzip -c -1 | dd of=/dev/sdf"

Page 20: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-WEST

VolumeSnapshot

Step 7 – Create an AMI in the destination region

EC2Micro

Instance

EBSVolume/dev/sdf

Destination

Create a snapshot

Page 21: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 22: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

US-WEST

VolumeSnapshot

Step 7 – Create an AMI in the destination region

EC2Micro

Instance

EBSVolume/dev/sdf

Destination

Create an AMIAMI

Page 23: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 24: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

These defaults may not workin all cases!

Page 25: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

Page 26: PRESENTATION - Migrating AWS EBS backed AMI's between Regions

Rob Lintonwww.Jasondb.com

[email protected]

QUESTIONS?