Network Virtualization and Data Center
Networks
263-3825-00 Qin Yin Fall Semester 2013
News
I
We have a discussion list:
I virnet@lists.inf.ethz.ch
Assignment 2 - Cloud computing
I
Goals
I Gain experience using EC2 services
I Deploy an application over the IaaS
I Try auto-scaling mechanisms - Boto library and AWSCli interface
I Benchmarking on the EC2 Infrastructure
I
Structure of the homework
I Get credentials to log-in to the cloud
I Part A - 1st week - Boto + EC2 playing + proposal
I Part B - 2nd week - Benchmarking
I Part C - 3rd week - Auto-scaling
I End ABC - deliver report A2ABC
I Part D - 4th week - Auto-evaluation + Billing
I Final submit
Get credentials and how to use them
I
Get credentials:
I Hw folder: https://svn.systems.inf.ethz.ch/svn/ systems/virnet13_students/trunk/NAME/A2ABC
I Under your A2ABC, you should find the file credentials containing:
I user name,access key id,secret access key,password
I
How to use them:
I Amazon dashboard:
I Login to Amazon EC2 using: username, password
I URL :
https://ethz-virnet13.signin.aws.amazon.com/console I AWSCli and Boto APIs
I username, access key id, secret access key I ... Explained later in the slides
Part A - 1st week
I
AWSCli + Boto
I
EC2 dashboard
I
Submit proposal:
I Next week consultation (29th Oct)
I Or by e-mail before (28th Oct - 11:59AM)
I
The proposal should cover the important details of how you
intend to proceed with Parts B and C, in particular:
I Benchmarks: questions you seek to answer and yourhypotheses.
I Planned modifications to your overlay network.
I Auto-scaling: describe your strategy, for example, when and how is it triggered?
Environment setup
I
Install anaconda python:
I https://store.continuum.io/cshop/academicanaconda
I download it free and install it
Configure AWSCli
I
URL: http://aws.amazon.com/cli/
I
To install:
I pip install awscli (you installed pip following previous slide)
I
Link AWSCli with your Amazon account:
mkdir -p ˜/.aws/
vim ˜/.aws/config
cat ˜/.aws/config
[default]
region = us-west-2
aws_access_key_id=your access_key_id
aws_secret_access_key=your
secret_access_key
I
For the meaning of access key id and secret access key see
slide above
Get credentials and how to use themTest AWSCli connection
I
Create KeyPair file mykeypair.pem :
aws ec2 create-key-pair --key-name mykey > ˜/mykey.pem
I
Result: In the EC2 dashboard - Key Pairs page you will see
the pair with the name you just created:
I https://console.aws.amazon.com/ec2/v2/home?region= us-west-2#KeyPairs:
I
This task can be done directly from the EC2 dashboard.
However, we would like you to try out the command line
interface because is will help you automatize things when
doing the benchmarking tests.
Configure Python boto
I
URL: http://boto.cloudhackers.com/en/latest/
-Check EC2 and Auto-Scaling links
I
You should already have it installed
I
Otherwise: pip install boto
I
Link Boto python with your Amazon account:
vim ˜/.boto
cat ˜/.aws/config
[Credentials]
aws_access_key_id=your access_key_id
aws_secret_access_key=your
secret_access_key
I
For the meaning of access key id and secret access key see
slide above
Get credentials and how to use themTest Boto Cli connection
I
One of the most common things to do using the Boto Cli API
will be to create instances. Here is an example on how to do
this:
cat create instance.py
#!/usr/bin/env python
import boto.ec2
conn = boto.ec2.connect to region("us-west-2")
conn.run instances(
’ami-d03ea1e0’,
key name=’mykey’,
instance type=’t1.micro’)
I
By running this script you launch a new instance. Check EC2
Test Boto Cli connection (cont.)
I
In the code from previous slide:
I amid03ea1e0, stands for Amazon Machine Images, further reference - https://aws.amazon.com/amis. To get the code of such an image go to the Launch button of each image.
I mykeypair, the key we have created with AWSCli
I t1.micro, type of instance, further reference - http://aws. amazon.com/ec2/instance-types/#instance-details
EC2 dashboard - Remember
I
Management access rights to your colleagues instances.
I
$ 100 recommended for each students
I Eg. run 15 large instances for one day each, or 6 micro instances continually for a month.
Part B,C - 2nd and 3rd week
I
Main objectives:
I Explore benchmarking
I Overlay Network Integration
I Explore auto-scaling
I
...more details in the handouts.
I
You have the first week to try EC2 dashboard, Boto, AWSCli
and make the design of the experiments for Part B,C.
Deliverable Part A,B,C
I
Due date - Monday 11:59am Nov. 11, 2013
Part D - 4th week
I
Main objectives:
I Auto-evaluation : Due date - Monday 11:59am Nov. 18, 2013
I Submit under .../trunk/NAME/A2ABC/review/review.txt
I Billing - more details in handouts
I Review Part B,C with results from auto-evaluation, Add billing and submit final report.
I Final Report : Due date - Friday 11:59am Nov. 22, 2013 Submit under .../trunk/NAME/A2D/finalreport.pdf
Summary
I
4 due times:
I A2A Proposal due: Monday 11:59am, Oct. 28, 2013
I A2ABC report due: Monday 11:59am, Nov. 11, 2013
I A2D Auto-Evaluation due: Monday 11:59 am, Nov. 18, 2013
I A2 Final Report due: Friday 11:59 am, Nov. 22, 2013
Questions
I
now or later on
I virnet@lists.inf.ethz.ch