Skip to content

Commit

Permalink
Add more instructions to set up and verify lab1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcua committed Sep 4, 2013
1 parent 4a1dd2d commit 126ea87
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,5 @@
*.pem

*~

*.py[cod]
Expand Down
84 changes: 67 additions & 17 deletions labs/lab1/README.md
Expand Up @@ -3,12 +3,12 @@
The goal of this lab is for you to set up Amazon Web Services ("Amazon
Cloud")

# Step 1: Setup Amazon EC2

Many of the labs in this class will use Amazon's cloud computing infrastructure.
Using a cloud service like Amazon makes it easy to share data sets, and quickly run any number virtual machines that
are identical for all students in the class.
We have credits from Amazon, which we will use for later labs (in this lab, we will use a free "micro" instance.)
Many of the labs in this class will use Amazon's cloud computing
infrastructure. Using a cloud service like Amazon makes it easy to
share data sets, and quickly run any number virtual machines that are
identical for all students in the class. We have credits from Amazon,
which we will use for later labs (in this lab, we will use a free
"micro" instance.)

### Sign up and setup the OS

Expand All @@ -18,20 +18,22 @@ You will need to provide a credit card, however the class has Amazon credits so
you should not expect to _use_ the credit card. Once the class registration has
settled down, we will add you to the class's Amazon groups.

If you're worried about being billed unexpectedly because you left aserver or service running for too long, sign up for [billing alerts](https://portal.aws.amazon.com/gp/aws/developer/account?ie=UTF8&action=billing-alerts&sc_icampaign=welcome_email_2&sc_icontent=billing_alerts_link&sc_iplace=welcome_email_2&sc_idetail=aws_resources).

**Launch an instance**

1. Go to [http://aws.amazon.com](http://aws.amazon.com) and click 'AWS Management Console' under 'My Account/Console'
in the upper right.
1. Click EC2
1. Click Launch Instance.
1. Click Launch Instance. (You can optionally change the region you're in from 'Oregon' to 'Virginia' in the top right, which might get you lower latency to your server.)
1. Use the "Classic Wizard". As of this writing the "Quick Launch Wizard" would not successfully launch.
1. Select one of the Ubuntu Server images ("AMIs"); it doesn't matter exactly which one for this lab.
1. Select the 64-bit version of "Ubuntu Server 13.04."
1. Specify 1 instance of type "t1.micro". Amazon lets you launch one micro-instance for free, so this won't cost you anything to launch.
1. You don't care about the subnet, and can simply click "Continue" on the "Advanced Instance Options", "Storage Device Configuration", and "Add Tags" pages.
1. You will need to specify a key value pair, or create a new one. If you choose to create a new one, make sure you download it and save it (your should have a .pem file).
1. You will need to specify a key pair, or create a new one. If you choose to create a new one, make sure you download it and save it (your file extension is .pem)>
1. The default security group is fine.
1. Click "Launch". It will take a few minutes for the instance to launch.
1. After the instances launches, click on it to obtain its DNS name. It should look something like ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com
1. Click "Launch". It will take a few minutes for the instance to launch. Close the dialog, and wait on the instance listing table.
1. After the instances launches, click on it to obtain its "Public DNS" name. It should look something like ec2-xx-xxx-xx-xxx.us-REGION-2.compute.amazonaws.com

**SSH to Your Instance**:

Expand All @@ -41,6 +43,12 @@ Type something like:

Where <PEM FILE> is key file you downloaded when launching the instance.

You may get an error about the permissions of your PEM file. If so, type:

chmod 400 <PEM FILE>

and then try to ssh again.

**Setup the OS**: ensure the following packages are available using the Ubuntu package management tool apt-get.

To install a package, type:
Expand All @@ -53,16 +61,58 @@ Make sure you have the following packages:
* python-psycopg2
* python-sqlalchemy
* python-protobuf
* postgresql
* postgresql-9.1
* postgresql-client-9.1
* sqlite3
* git
* mongodb

Checkout the class repository


**Checkout the class repository**

The class repository is publicly accessibly, and contains a `labs`
directory that contains all of your labs. Clone it using git into a
directory called `asciiclass`.

git clone https://github.com/mitdbg/asciiclass.git

xxx this gives me the error:
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly


**Test that things worked***

Let's make sure you have access to Python, sqlite3, MongoDB, and the git repository.

**Python**: Type `python` and ensure that you see the following:

Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

If you do, push `ctrl+d` to exit the prompt.

**sqlite3**: Type `sqlite3` and ensure that you see the following:

SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

If you do, push `ctrl+d` to exit the prompt.

**MongoDB**: Type `mongo` and ensure that you see the following:

MongoDB shell version: 2.2.4
connecting to: test
>

If you do, push `ctrl+d` to exit the prompt.

**git repository**: Type `cat asciiclass/labs/lab1/README.md`

You should see the instructions for this lab fly by.

If you do, congratulations. You're done! Go read the assiged paper for today.

You can always feel free to email us with questions.

0 comments on commit 126ea87

Please sign in to comment.