+ All Categories
Home > Documents > Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen!...

Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen!...

Date post: 20-May-2018
Category:
Upload: ngonhan
View: 227 times
Download: 4 times
Share this document with a friend
35
Introduction to Amazon AWS Development Environment Robert Chen Computational Science & Engineering Georgia Institute of Technology
Transcript
Page 1: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Introduction to Amazon AWS Development Environment!

!Robert Chen!

Computational Science & Engineering!Georgia Institute of Technology!

Page 2: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Intro!

•  Need a standard environment for development!

•  Amazon AWS - a popular service!

•  web hosting!

•  storage!

Page 3: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Getting Started!

Page 4: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Getting Started!•  Visit aws.amazon.com!

•  make an account!

•  enter information!

•  need a credit card!

•  select the basic(free) tier!

•  750 hours/month of t1.micro instance!

•  5GB of S3 storage!

•  750 hours/month of database RDS!

Page 5: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!
Page 6: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Getting started!

Page 7: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Signup confirmation!

•  you should receive a confirmation email!

Page 8: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Go to EC2 dashboard!

Page 9: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Launch Instance!

Page 10: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Load the Image for the class!

1 ! Enter the AMI image ID: ami-7d2e6a4d!

2 !

Page 11: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Select the t2.micro, click Review and Launch!

1 !

2 !

Page 12: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Add Storage!

Increase the size to 15GiB. !

(max 30 GiB)!

1 !

2 !

Page 13: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Modify the Security Group!

1 !Open the

following 4 TCP ports!

2 !PostgreSQL!

MongoDB!

Page 14: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Click Launch!

Page 15: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Create a NEW public + private key pair; name the key pair; download the key pair and save it; then press Launch Instances!

1 !

2 !

3 !

Page 16: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

click View Instances!

Page 17: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!
Page 18: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!
Page 19: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Software preloaded into the instance!

1.  Databases (MongoDB, PostgreSQL, MySQL)!2.  Python (numpy, scipy, MySQLdb, pymongo)!3.  PHP!4.  Git/Mercurial!5.  Text editors (vi and emacs)!6.  Apache web server !7.  DB example connection script for MySQL and

MongoDB (/var/www/html)!

Page 20: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

How to connect to your EC2 instance (Mac OS

terminal)!

Page 21: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

find the public DNS!

Page 22: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Open up terminal, change permissions for public key, and use it to SSH into the EC2

instance!

Page 23: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

(optional) setup SSH config!

Page 24: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Setting up Git / Bitbucket!

Page 25: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Bitbucket!•  Code is hosted in repositories at bitbucket.org.

There will be one repository for each of the 3 projects in the class. !

•  At this point, make sure you have a bitbucket account. !

•  If not, signup for bitbucket ASAP, and email the TAs your username.!

Page 26: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Git!•  Git is a version control system.!

•  We use Git to push code to the Bitbucket repository.!

•  You will connect your Bitbucket username to Git !

•  You will track your progress in the class (and you will be evaluated) based upon your commits to the Bitbucket project repositories!

Page 27: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Git setup - username/email for your EC2!

Page 28: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Git setup - SSH key!•  Now, we will generate an ssh-key pair on the EC2 machine!

•  Do the following, from your HOME directory (~/)!

Hit enter when prompted for file in which to save the key (will default to ~/.ssh/id_rsa)!!Hit enter twice when prompted for passphrase !

Page 29: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

In Bitbucket, add SSH key!1 !

2 !

3 !

Page 30: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Copy your SSH key into the input box!

COPY INTO THE “Key” box!!!

Page 31: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

First Checkpoint — !!

check code to your project’s repository!

Page 32: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Clone the repository for your project!

1 ! 2 !

Copy into clipboard!!

Page 33: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Clone repository - into home directory of your EC2 instance!

Page 34: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Go to the team_members/ folder, make a file with your name and contact info. !

Then, do:!git add <files>!

git commit -m “<description>”!git push <!

Page 35: Introduction to Amazon AWS Development … to Amazon AWS Development Environment! Robert Chen! Computational Science & Engineering! Georgia Institute of Technology!

Git Add, Commit, Push!

Changes shown on Bitbucket!

file that was added!!

add the file! ! write a

message describing the commit!

push code changes from the “master” (your machine) to the “origin” (the repository on bitbucket)!


Recommended