Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Virtual

...

machine

...

-

...

made

...

cloud

...

computing

...

possible

...


Harvard

...

class:

...

http://cm.dce.harvard.edu/2010/01/13450/L07/seg1/index_FlashSingleHighBandwidth.html

...

VM

...

types:

...

  • Xen

...

  • -free

...

  • VMware

...

  • -

...

  • commercial,

...

  • used

...

  • by

...

  • industry,

...

  • full

...

  • virtualization

...

  • Parallels

...

  • -

...

  • tailored

...

  • for

...

  • Mac

...

  • users

...

Amazon

...

uses

...

Xen

...

,

...

will

...

be

...

used

...

by

...

this

...

class

...

Hyperviser - VM 0-layer

...

'Amazon

...

web

...

services'

...


single

...

Front:

...

multiple

...

back

...

ends

...

machines

...

doing

...

the

...

work

...

Jargon:

...

  • AMI

...

  • -

...

  • Amazon

...

  • Machine

...

  • Image

...

  • ,

...

  • it

...

  • is

...

  • a

...

  • file

...

  • on

...

  • a

...

  • disk

...

  • Instance

...

  • -

...

  • IMA

...

  • executed

...

  • to

...

  • become

...

  • a

...

  • machine

...

  • EBS

...

  • Volume

...

  • -

...

  • elastic

...

  • block

...

  • store

...

  • volume,

...

  • secondary

...

  • storage

...

  • allocated

...

  • elsewhere

...

Various

...

types

...

of

...

AMI,

...

we

...

will

...

use

...

Fedora

...

-

...

a

...

version

...

of

...

Red

...

Hat

...

Linux

...

On-Demand

...

Instances:

...

  • c1.

...

  • small,

...

  • $0.10

...

  • per

...

  • hour

...

  • c1.medium

...

  • ,

...

  • 2

...

  • virtual

...

  • cores

...

  • c1.xLarge,

...

  • 8

...

  • virtual

...

  • cores,

...

  • $0.80

...

  • per

...

  • hours

...

All

...

resources

...

are

...

described

...

at

...

http://cs50.net/wiki/CS_264

...

Private

...

cloud

...

computing:

...

http://aws.amazon.com/

...

And

...

this

...

is

...

my

...

1st

...

VM

...

on

...

the

...

claud

...

Gallery
includePicture 24.png
title

...

Steps to fire VM & ssh to it (after you set up all credentials)
  1. login to AWS page
  2. select: Amazon Elastic Compute Cloud
  3. TOP-UP: 'Your Account' , select 'AWS Management Console'
  4. TOP-UP-Yellow:

...

  1. 'Sign

...

  1. in

...

  1. to

...

  1. AWS

...

  1. console'

...

  1. 'Lunch

...

  1. Instances'

...

  1. select

...

  1. type

...

  1. of

...

  1. VM

...

  1. (e.g.

...

  1. Fedora

...

  1. for

...

  1. regular

...

  1. linux),

...

  1. press

...

  1. select

...

  1. in

...

  1. lunch

...

  1. wizard

...

  1. 'Skip

...

  1. this'

...

  1. select

...

  1. #

...

  1. of

...

  1. machines

...

  1. &

...

  1. CPU

...

  1. power

...

  1. (star

...

  1. with

...

  1. 1,

...

  1. small)

...

  1. in

...

  1. 'Key

...

  1. Pair

...

  1. Name'

...

  1. select

...

  1. ssh

...

  1. Keys

...

  1. you

...

  1. have

...

  1. created

...

  1. earlier

...

  1. if

...

  1. you

...

  1. want

...

  1. output

...

  1. to

...

  1. survive

...

  1. after

...

  1. VM

...

  1. is

...

  1. shut

...

  1. down

...

  1. in

...

  1. options

...

  1. select:

...

  1. Availability

...

  1. Zone

...

  1. &

...

  1. remember

...

  1. it

...

  1. press

...

  1. 'Lunch'

...

  1. at

...

  1. the

...

  1. bottom

...


  1. Now

...

  1. find

...

  1. it

...

  1. (smile) ,

...

  1. it

...

  1. is

...

  1. beta-version,

...

  1. pressing

...

  1. 'Refresh'

...

  1. screen

...

  1. in

...

  1. the

...

  1. browser

...

  1. may

...

  1. help

...

  1. to

...

  1. ssh

...

  1. to

...

  1. this

...

  1. machine

...

  1. you

...

  1. need

...

  1. to

...

  1. know:

...

    • Public

...

    • DNS,

...

    • sth

...

    • like:

...

    • ec2-75-101-246-229.compute-1.amazonaws.com

...

    • absolute

...

    • path

...

    • to

...

    • your

...

    • ssh

...

    • keys,

...

    • e.g.

...

    • janAmazonKey.pem

...

  1. from

...

  1. the

...

  1. local

...

  1. prompt

...

  1. execute:

...


  1. ssh -i

...

  1. ~/janAmazonKey.pem

...

  1. root@ec2-75-101-246-229.compute-1.amazonaws.com

...

If

...

ssh

...

hangs

...

forever

...

,

...

you

...

need

...

to

...

open

...

fire

...

wall.

...

  1. On

...

  1. the

...

  1. left,

...

  1. go

...

  1. to

...

  1. 'Security

...

  1. Groups'

...

  1. select

...

  1. 'default'

...

  1. fire

...

  1. wall

...

  1. (unless

...

  1. you

...

  1. have

...

  1. sth

...

  1. else

...

  1. already)

...

  1. add

...

  1. &

...

  1. save

...

  1. :

...

  1. SSH

...

  1. tcp

...

  1. 22

...

  1. 22

...

  1. 0.0.0.0

...

  1. now

...

  1. try

...

  1. ssh

...

  1. again

...

Mounting EBS (permanent)

...

volume

...

to

...

the

...

instance

...

(it

...

was

...

not

...

reliable

...

for

...

me,

...

between

...

sessions

...

data

...

were

...

partially

...

corrupted)

...

  1. 1st

...

  1. time

...

  1. it

...

  1. need

...

  1. formating

...

    1. Browser:

...

    1. Create

...

    1. volume

...

    1. ,

...

    1. using

...

    1. 'Volumes',

...

    1. pick

...

    1. 300GB

...

    1. (it

...

    1. is

...

    1. small

...

    1. and

...

    1. not

...

    1. pricy)

...

    1. Browser:

...

    1. right

...

    1. click

...

    1. on

...

    1. the

...

    1. volume,

...

    1. attache

...

    1. it

...

    1. to

...

    1. running

...

    1. Instance

...

    1. of

...

    1. VM,

...

    1. remember

...

    1. name,

...

    1. e.g.:

...

    1. /dev/sdf

...

  1. ssh

...

  1. to

...

  1. VM

...

    1. partition

...

    1. this

...

    1. disk

...

    1. ,

...

    1. e.g.

...

    1. using

...

    1. fdisk
      • fdisk /dev/sdf

...


      • n

...

      • :

...

      • new

...

      • partition

...


      • p

...

      • :

...

      • primary

...


      • 1

...

      • :

...

      • partion

...

      • #1

...


      • 1

...

      • :

...

      • (default

...

      • begin)

...


      • enter

...

      • :

...

      • (default

...

      • end)

...


      • p

...

      • :

...

      • print

...


      • w

...

      • :

...

      • write

...

      • partition

...

    1. format

...

    1. disk

...

    1. using

...

    1. mkfs
      mkfs.ext3

...

    1. /dev/sdf1

...

    1. ('1'

...

    1. is

...

    1. partition

...

    1. selected

...

    1. earlier)

...


    1. agrre

...

    1. on

...

    1. any

...

    1. question

...

    1. by

...

    1. pressing

...

    1. 'enter'

...

    1. mount

...

    1. disk

...

    1. as

...

    1. home

...

    1. dir

...

    1. named

...

    1. storage
      mkdir /storage
      mount /dev/sdf1

...

    1. /storage

...


    1. cd

...

    1. /storage

...


    1. ls
      SCP file from AMI to local machine


scp -i ~/janAmazonKey.pem

...

root@ec2-174-129-63-11.compute-1.amazonaws.com:"/bla

...

_

...

lis

...

"

...

.

...


You

...

are

...

done.

...

Well,

...

you

...

need

...

to

...

pay

...

for

...

it.

...

This

...

is

...

my

...

1st

...

bill:

...

Gallery
includePicture 25.png
title

...

Full price list

PDF
nameAmazon EC2 pricing.pdf

...

Bundling & registering AMI

It works the best in a machine w/ installed Java and some EC2 software. This is reasonable instruction:http://www.linuxconfig.org/Howto_CREATE_BUNDLE_UPLOAD_and_ACCESS_custom_Debian_AMI_using_ubuntu

...


It

...

is

...

written

...

for

...

Ubuntu

...

9.04

...

machine,

...

so

...

I

...

selected

...

this

...

VM:

...


ami-2bfd1d42

...

binarymillenium/ec2/ubuntu/version2/image.manifest.xml

...


and

...

added

...

the

...

following:

...

next

...

I

...

added:

...


mkdir

...

~/aws

...


cd

...

~/aws

...


wget

...

http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip

...


wget

...

http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip

...


sudo unzip -d /opt/

...

ec2-api-tools.zip

...


sudo

...

unzip

...

-d

...

/opt/

...

ec2-ami-tools.zip

...

export

...

EC2_HOME=/opt/ec2-api-tools-1.3-42584/

...

export

...

PATH=$PATH:$EC2_HOME//bin/

...

export

...

JAVA_HOME=/usr/

...

If

...

c-shell

...

is

...

used

...

do:

{
Code Block
}
setenv EC2_HOME /opt/ec2-api-tools-1.3-46266/
setenv PATH $PATH":$EC2_HOME/bin/"
{code}

Now

...

I

...

was

...

able

...

to

...

test

...

the

...

following

...

command

...

does

...

sth

...


ec2-register

...

I

...

probably

...

should

...

also

...

have

...

set

...


export

...

EC2_PRIVATE_KEY=~/.ec2/pk-K5AHLDNT3ZI28UIE6Q7CC3YZ4LIZ54K7.pem

...


export

...

EC2_CERT=~/.ec2/cert-K5AHLDNYYZI2FUIE6R7CC3YJ4LIZ54K7.pem

...


export

...

EC2_ACCNO=155678941235

...


export

...

ACCESS_KEY=1WQ6FJKYHJMPTJ3QR6G2

...


export

...

SECRET_KEY=VDYxRzosnDWvxrJ97QntVpsSUBAavGHE1QJELEyY

...

If

...

'ruby'

...

is

...

missing

...

execute:

...


sudo

...

apt-get

...

install

...

ruby

...

Alternative:

...


sudo

...

apt-get

...

install

...

ec2-ami-tools

...

Below

...

are

...

steps

...

leading

...

to

...

bundling

...

&

...

registering

...

  1. copy

...

  1. X.509

...

  1. certificate

...


  1. scp -i

...

  1. ~/XXXXAmazonKey.pem

...

  1. ~/pk-XXXXXXXX.pem

...

  1. ~/cert-YYYYYYC.pem

...

  1. root@ec2-174-129-63-11.compute-1.amazonaws.com:"/mnt/"

...


  1. bundle external image
    ec2-bundle-vol

...

  1. -d

...

  1. /mnt

...

  1. -k

...

  1. /mnt/pk-XXXXXXXX.pem

...

  1. -c

...

  1. /mnt/cert-YYYYYYYYY.pem

...

  1. -u

...

  1. nnnn-mmmm-kkkk

...

  1. -r

...

  1. i386

...

  1. -p

...

  1. star-sl08b-image

...

  1. -v

...

  1. /bla_image

...

  1. --generate-fstab

...

  1. Uploading

...

  1. the

...

  1. AMI

...

  1. to

...

  1. Amazon

...

  1. S3

...


  1. ec2-upload-bundle

...

  1. -b

...

  1. <your-s3-bucket>

...

  1. -m

...

  1. /mnt/sampleimage.manifest.xml

...

  1. -a

...

  1. <aws-access-key-id>

...

  1. -s

...

  1. <aws-secret-access-key>

...

  1. Register

...

  1. Image

...

  1. at

...

  1. EC2

...


  1. ec2-register

...

  1. star-sl08b-s3-bucket/star-sl08b-image.manifest.xml

...

Conversion of VMware to EC2

http://thewebfellas.com/blog/2008/9/1/creating-an-new-ec2-ami-from-within-vmware-or-from-vmdk-files

...