SlideShare a Scribd company logo
Amazon Web Services for scientific computing
Alexander Novikov
June 18, 2015
Alexander Novikov AWS for scientific computing June 18, 2015 1 / 21
1 Overview
2 Ipython Notebook example
3 Other stuff
4 Cleaning up
5 Troubleshooting
Alexander Novikov AWS for scientific computing June 18, 2015 2 / 21
Summary
1 Start 1 or 1000 configured servers in 5 minutes;
2 Run anything you want (you control OS and software);
3 Vary the size of your server (from micro instance to 32 cores 244 Gb
of RAM, to 4 GPUs onboard);
4 Pay per hour;
5 1 server for 100 hours cost the same as 100 servers for 1 hour.
Alexander Novikov AWS for scientific computing June 18, 2015 3 / 21
Amazon sell books don’t they?
Alexander Novikov AWS for scientific computing June 18, 2015 4 / 21
Amazon Web Services – AWS
We focus on Amazon Elastic Compute Cloud – EC2.
Alexander Novikov AWS for scientific computing June 18, 2015 5 / 21
Ipython in a cloud
You will run Ipython Notebook on AWS server in Frankfurt.
If you don’t have an AWS account but want to follow the tutorial, go to
the spreadsheet from my email and claim one of the servers.
Alexander Novikov AWS for scientific computing June 18, 2015 6 / 21
Running a server
1 Log into the AWS console;
2 Click on EC2;
3 Choose a region (Frankfurt is the closest; N. Virginia and Oregon are
cost effective);
4 Click Launch Instance (server);
5 Choose Ubuntu 14.04 (HVM);
6 Choose t2.micro (it’s free);
7 Next;
8 Choose the size of the root drive;
9 Name your instance;
10 Click Review and Launch;
11 Now review and click Launch.
Alexander Novikov AWS for scientific computing June 18, 2015 7 / 21
SSH keys
AWS use ssh keys to protect your connection to the server.
Name your key, click download, and save it in a safe location.
On Linux, you will need to restrict the access to the file:
$ cd Downloads/
$ chmod 400 key_name.pem
Alexander Novikov AWS for scientific computing June 18, 2015 8 / 21
Connect & update
On Linux and Max, connect with ssh tool
$ ssh -i tutorial.pem ubuntu@52.28.135.168
On Windows, convert your key to ppk and connect with PuTTY (user
name is ubuntu, ssh key file is key_name.ppk).
Update the server
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo reboot
Alexander Novikov AWS for scientific computing June 18, 2015 9 / 21
Install miniconda
Download the installer
$ wget https://repo.continuum.io/miniconda/...
Make it runnable and install (use tab for autocompletion)
$ chmod +x ./Miniconda-latest-Linux-x86_64.sh
$ ./Miniconda-latest-Linux-x86_64.sh
Now reconnect to the server (ctr + d to disconnect) and install conda
packages
$ conda install ipython ipython-notebook
Alexander Novikov AWS for scientific computing June 18, 2015 10 / 21
Networking
Generate an HTTPS certificate (you can leave the defaults for all the
questions)
$ ipython profile create nbserver
$ openssl req -x509 -nodes -days 365 -newkey rsa:1024 
-keyout mycert.pem -out mycert.pem
Hash your password
$ ipython
from IPython.lib import passwd
passwd()
Alexander Novikov AWS for scientific computing June 18, 2015 11 / 21
Configure Ipython Notebook
Let’s find and edit the configuration file
$ find ./ -name "*notebook_config*"
$ nano 
.ipython/profile_nbserver/ipython_notebook_config.py
Add the following lines after c = get_config()
c.NotebookApp.certfile = u'/home/ubuntu/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:207eb1f4671f:92af6...'
c.NotebookApp.port = 8888
Alexander Novikov AWS for scientific computing June 18, 2015 12 / 21
Nano
Nano is a command line editor.
Essential commands (like ctr + o for saving and ctr + x to exit) are listed
on the bottom of the interface.
Alexander Novikov AWS for scientific computing June 18, 2015 13 / 21
Almost there
Run the notebook
$ ipython notebook --profile=nbserver
Find the public URL of your server in AWS console (e.g. https://
ec2-52-28-135-168.eu-central-1.compute.amazonaws.com:8888)
and open it in a browser.
Aaand it doesn’t work.
Alexander Novikov AWS for scientific computing June 18, 2015 14 / 21
Security groups
Go to the Security Groups tab and open incoming traffic on the 8888 port.
Alexander Novikov AWS for scientific computing June 18, 2015 15 / 21
Tmux
If you close the terminal now, the program will be killed.
Use tmux to run it in the background and be able to see the output.
$ tmux # Create new terminal.
$ ctr + b d # Detach from the current terminal.
$ tmux attach # Attach to an existing terminal.
Alexander Novikov AWS for scientific computing June 18, 2015 16 / 21
Terminating a server
When you terminate your server it’s hard drive is erased.
1 Next time you have to configure the server from scratch;
2 You cannot store any data (experiment results).
Alexander Novikov AWS for scientific computing June 18, 2015 17 / 21
Amazon Machine Image – AMI
Template from AWS instances are launched;
OS + software;
Launch different instance types from the same AMI;
You customize (install custom software, services, config, etc) and
make your own AMI;
AWS Marketplace makes it easy to launch a number of popular
applications (e.g, MongoDB, Cafee, OpenCV, etc.).
Alexander Novikov AWS for scientific computing June 18, 2015 18 / 21
Elastic Block Storage – EBS
Create a permanent magnetic or SSD volume of any size;
Connect (disconnect) the volume to any server in its data center
(availability group).
Alexander Novikov AWS for scientific computing June 18, 2015 19 / 21
Spot instances
Bid $X per hour;
If current price > bid, instance terminates;
You pay the market price, not the bids.
Alexander Novikov AWS for scientific computing June 18, 2015 20 / 21
Workflow
Create a small instance, set up all the software, download all the data;
Make an AMI;
Start a powerful spot instance (or a dozen) from your AMI;
Create a permanent volume and connect it to the instance;
Process the data (in tmux!) and write the results into the volume;
Terminate the instance.
Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21
Other stuff
Run a program on a server and see its GUI on your laptop (ssh -X);
Use scp to download data to and from your server;
Use df -h to see all the disk mounted to the server;
Use htop to see running processes;
Set up a monitoring so when your server stops working you get an
email;
Explore AWS bill https://console.aws.amazon.com/billing;
Apply for an AWS academic grant.
Alexander Novikov AWS for scientific computing June 18, 2015 22 / 21
Cleaning up
Got to the console and terminate your server;
Go to the volume tab and remove all your volumes;
Alexander Novikov AWS for scientific computing June 18, 2015 23 / 21
Unprotected private key
If you see this message when trying to connect
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0660 for ’tutorial.pem’ are too open.
It is required that your private key files are NOT
accessible by others.
This private key will be ignored.
bad permissions: ignore key: tutorial.pem
Permission denied (publickey).
Just set more restrictive permissions for your key file
$ chmod 400 key_name.pem
Alexander Novikov AWS for scientific computing June 18, 2015 22 / 21
Full volume
Your program says «Cannot write a file»?
Check your volumes, they are probably full. To list all mounted volumes
and their sizes use
$ df -h
Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21
Slow down
Everything start beeing slow?
You probably burnt all your volumes I/O capacity. Wait so it can restore
or order a bigger volume (see https://docs.aws.amazon.com/AWSEC2/
latest/UserGuide/EBSVolumeTypes.html for details).
Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21

More Related Content

What's hot

Amazon EC2
Amazon EC2Amazon EC2
Amazon EC2
sonal parmar
 
Amazon ec2
Amazon ec2Amazon ec2
Amazon ec2
Joydip Ghosh
 
AWS Webcast - Amazon EC2 Masterclass
AWS Webcast - Amazon EC2 MasterclassAWS Webcast - Amazon EC2 Masterclass
AWS Webcast - Amazon EC2 Masterclass
Amazon Web Services
 
How To Create instances in AWS EC2 | Edureka
How To Create instances in AWS EC2 | EdurekaHow To Create instances in AWS EC2 | Edureka
How To Create instances in AWS EC2 | Edureka
Edureka!
 
Amazon EC2 Systems Manager (March 2017)
Amazon EC2 Systems Manager (March 2017)Amazon EC2 Systems Manager (March 2017)
Amazon EC2 Systems Manager (March 2017)
Julien SIMON
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
Jason "JP" Pomerleau
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
Julien SIMON
 
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
Amazon Web Services
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
Julien SIMON
 
AWS Compute Services
AWS Compute ServicesAWS Compute Services
AWS Compute Services
Sabir Mustafa
 
Amazon Ec2 Application Design
Amazon Ec2 Application DesignAmazon Ec2 Application Design
Amazon Ec2 Application Design
guestd0b61e
 
Don't think about the difficulty Let's try to connect easy to IPv6 network w...
 Don't think about the difficulty Let's try to connect easy to IPv6 network w... Don't think about the difficulty Let's try to connect easy to IPv6 network w...
Don't think about the difficulty Let's try to connect easy to IPv6 network w...
Namba Kazuo
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
Amazon Web Services
 
CI&CD with AWS - AWS Prague User Group - May 2015
CI&CD with AWS - AWS Prague User Group - May 2015CI&CD with AWS - AWS Prague User Group - May 2015
CI&CD with AWS - AWS Prague User Group - May 2015
Vladimir Simek
 
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity OptionsCreating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Amazon Web Services
 
Training AWS: Module 8 - RDS, Aurora, ElastiCache
Training AWS: Module 8 - RDS, Aurora, ElastiCacheTraining AWS: Module 8 - RDS, Aurora, ElastiCache
Training AWS: Module 8 - RDS, Aurora, ElastiCache
Bùi Quang Lâm
 
Amazon Web Service EC2 & S3
Amazon Web Service EC2 & S3Amazon Web Service EC2 & S3
Amazon Web Service EC2 & S3
Pravin Vaja
 
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
Amazon Web Services
 
VMware and AWS together (June 2017)
VMware and AWS together (June 2017)VMware and AWS together (June 2017)
VMware and AWS together (June 2017)
Julien SIMON
 
Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)
Julien SIMON
 

What's hot (20)

Amazon EC2
Amazon EC2Amazon EC2
Amazon EC2
 
Amazon ec2
Amazon ec2Amazon ec2
Amazon ec2
 
AWS Webcast - Amazon EC2 Masterclass
AWS Webcast - Amazon EC2 MasterclassAWS Webcast - Amazon EC2 Masterclass
AWS Webcast - Amazon EC2 Masterclass
 
How To Create instances in AWS EC2 | Edureka
How To Create instances in AWS EC2 | EdurekaHow To Create instances in AWS EC2 | Edureka
How To Create instances in AWS EC2 | Edureka
 
Amazon EC2 Systems Manager (March 2017)
Amazon EC2 Systems Manager (March 2017)Amazon EC2 Systems Manager (March 2017)
Amazon EC2 Systems Manager (March 2017)
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
 
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
Running Lean and Mean: Designing Cost-efficient Architectures on AWS (ARC313)...
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
 
AWS Compute Services
AWS Compute ServicesAWS Compute Services
AWS Compute Services
 
Amazon Ec2 Application Design
Amazon Ec2 Application DesignAmazon Ec2 Application Design
Amazon Ec2 Application Design
 
Don't think about the difficulty Let's try to connect easy to IPv6 network w...
 Don't think about the difficulty Let's try to connect easy to IPv6 network w... Don't think about the difficulty Let's try to connect easy to IPv6 network w...
Don't think about the difficulty Let's try to connect easy to IPv6 network w...
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
CI&CD with AWS - AWS Prague User Group - May 2015
CI&CD with AWS - AWS Prague User Group - May 2015CI&CD with AWS - AWS Prague User Group - May 2015
CI&CD with AWS - AWS Prague User Group - May 2015
 
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity OptionsCreating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
Creating Your Virtual Data Center: VPC Fundamentals and Connectivity Options
 
Training AWS: Module 8 - RDS, Aurora, ElastiCache
Training AWS: Module 8 - RDS, Aurora, ElastiCacheTraining AWS: Module 8 - RDS, Aurora, ElastiCache
Training AWS: Module 8 - RDS, Aurora, ElastiCache
 
Amazon Web Service EC2 & S3
Amazon Web Service EC2 & S3Amazon Web Service EC2 & S3
Amazon Web Service EC2 & S3
 
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
(BAC304) Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum...
 
VMware and AWS together (June 2017)
VMware and AWS together (June 2017)VMware and AWS together (June 2017)
VMware and AWS together (June 2017)
 
Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)
 

Viewers also liked

Architecting in Cloud : Your Guide to Amazon Web Services
Architecting in Cloud : Your Guide to Amazon Web ServicesArchitecting in Cloud : Your Guide to Amazon Web Services
Architecting in Cloud : Your Guide to Amazon Web Services
Edureka!
 
Architecting in Cloud : Your Guide to AWS
Architecting in Cloud : Your Guide to AWSArchitecting in Cloud : Your Guide to AWS
Architecting in Cloud : Your Guide to AWS
Edureka!
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
Edureka!
 
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
Amazon Web Services
 
Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
Amazon Web Services
 
AWS Webcast - Active Directory on AWS
AWS Webcast - Active Directory on AWSAWS Webcast - Active Directory on AWS
AWS Webcast - Active Directory on AWS
Amazon Web Services
 
Intro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute ServicesIntro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute Services
Amazon Web Services
 

Viewers also liked (7)

Architecting in Cloud : Your Guide to Amazon Web Services
Architecting in Cloud : Your Guide to Amazon Web ServicesArchitecting in Cloud : Your Guide to Amazon Web Services
Architecting in Cloud : Your Guide to Amazon Web Services
 
Architecting in Cloud : Your Guide to AWS
Architecting in Cloud : Your Guide to AWSArchitecting in Cloud : Your Guide to AWS
Architecting in Cloud : Your Guide to AWS
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
AWS re:Invent 2016: Amazon EC2 Foundations (CMP203)
 
Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
 
AWS Webcast - Active Directory on AWS
AWS Webcast - Active Directory on AWSAWS Webcast - Active Directory on AWS
AWS Webcast - Active Directory on AWS
 
Intro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute ServicesIntro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute Services
 

Similar to AWS EC2 tutorial

Leveraging Elastic Web-Scale Computing with AWS
Leveraging Elastic Web-Scale Computing with AWSLeveraging Elastic Web-Scale Computing with AWS
Leveraging Elastic Web-Scale Computing with AWS
Amazon Web Services
 
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON Byrum
 
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Amazon Web Services
 
How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...
Animesh Singh
 
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
Håkon Eriksen Drange
 
Ubuntu Cloud at Florida Linux Show
Ubuntu Cloud at Florida Linux ShowUbuntu Cloud at Florida Linux Show
Ubuntu Cloud at Florida Linux Show
zoopster
 
London Hug 20/6 - Vault production
London Hug 20/6 - Vault productionLondon Hug 20/6 - Vault production
London Hug 20/6 - Vault production
London HashiCorp User Group
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
Amazon Web Services
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database Basics
Amazon Web Services
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
Amazon Web Services
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
William Stewart
 
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowakiGoogle Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
javier ramirez
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS Riyadh User Group
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
Mehmet Ali Aydın
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Amazon Web Services
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
NigussMehari4
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
Sharon James
 
How automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous DeliveryHow automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous Delivery
Edmund Siegfried Haselwanter
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
Carlos Eduardo
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 

Similar to AWS EC2 tutorial (20)

Leveraging Elastic Web-Scale Computing with AWS
Leveraging Elastic Web-Scale Computing with AWSLeveraging Elastic Web-Scale Computing with AWS
Leveraging Elastic Web-Scale Computing with AWS
 
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
 
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
Day 2 - Amazon EC2 Masterclass - Getting the most from Amazon EC2
 
How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...
 
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
 
Ubuntu Cloud at Florida Linux Show
Ubuntu Cloud at Florida Linux ShowUbuntu Cloud at Florida Linux Show
Ubuntu Cloud at Florida Linux Show
 
London Hug 20/6 - Vault production
London Hug 20/6 - Vault productionLondon Hug 20/6 - Vault production
London Hug 20/6 - Vault production
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database Basics
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowakiGoogle Cloud Platform for DeVops, by Javier Ramirez @ teowaki
Google Cloud Platform for DeVops, by Javier Ramirez @ teowaki
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
How automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous DeliveryHow automated cloud infrastructure setups can help with Continuous Delivery
How automated cloud infrastructure setups can help with Continuous Delivery
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 

Recently uploaded

Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 

Recently uploaded (20)

Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 

AWS EC2 tutorial

  • 1. Amazon Web Services for scientific computing Alexander Novikov June 18, 2015 Alexander Novikov AWS for scientific computing June 18, 2015 1 / 21
  • 2. 1 Overview 2 Ipython Notebook example 3 Other stuff 4 Cleaning up 5 Troubleshooting Alexander Novikov AWS for scientific computing June 18, 2015 2 / 21
  • 3. Summary 1 Start 1 or 1000 configured servers in 5 minutes; 2 Run anything you want (you control OS and software); 3 Vary the size of your server (from micro instance to 32 cores 244 Gb of RAM, to 4 GPUs onboard); 4 Pay per hour; 5 1 server for 100 hours cost the same as 100 servers for 1 hour. Alexander Novikov AWS for scientific computing June 18, 2015 3 / 21
  • 4. Amazon sell books don’t they? Alexander Novikov AWS for scientific computing June 18, 2015 4 / 21
  • 5. Amazon Web Services – AWS We focus on Amazon Elastic Compute Cloud – EC2. Alexander Novikov AWS for scientific computing June 18, 2015 5 / 21
  • 6. Ipython in a cloud You will run Ipython Notebook on AWS server in Frankfurt. If you don’t have an AWS account but want to follow the tutorial, go to the spreadsheet from my email and claim one of the servers. Alexander Novikov AWS for scientific computing June 18, 2015 6 / 21
  • 7. Running a server 1 Log into the AWS console; 2 Click on EC2; 3 Choose a region (Frankfurt is the closest; N. Virginia and Oregon are cost effective); 4 Click Launch Instance (server); 5 Choose Ubuntu 14.04 (HVM); 6 Choose t2.micro (it’s free); 7 Next; 8 Choose the size of the root drive; 9 Name your instance; 10 Click Review and Launch; 11 Now review and click Launch. Alexander Novikov AWS for scientific computing June 18, 2015 7 / 21
  • 8. SSH keys AWS use ssh keys to protect your connection to the server. Name your key, click download, and save it in a safe location. On Linux, you will need to restrict the access to the file: $ cd Downloads/ $ chmod 400 key_name.pem Alexander Novikov AWS for scientific computing June 18, 2015 8 / 21
  • 9. Connect & update On Linux and Max, connect with ssh tool $ ssh -i tutorial.pem ubuntu@52.28.135.168 On Windows, convert your key to ppk and connect with PuTTY (user name is ubuntu, ssh key file is key_name.ppk). Update the server $ sudo apt-get update $ sudo apt-get upgrade $ sudo reboot Alexander Novikov AWS for scientific computing June 18, 2015 9 / 21
  • 10. Install miniconda Download the installer $ wget https://repo.continuum.io/miniconda/... Make it runnable and install (use tab for autocompletion) $ chmod +x ./Miniconda-latest-Linux-x86_64.sh $ ./Miniconda-latest-Linux-x86_64.sh Now reconnect to the server (ctr + d to disconnect) and install conda packages $ conda install ipython ipython-notebook Alexander Novikov AWS for scientific computing June 18, 2015 10 / 21
  • 11. Networking Generate an HTTPS certificate (you can leave the defaults for all the questions) $ ipython profile create nbserver $ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem Hash your password $ ipython from IPython.lib import passwd passwd() Alexander Novikov AWS for scientific computing June 18, 2015 11 / 21
  • 12. Configure Ipython Notebook Let’s find and edit the configuration file $ find ./ -name "*notebook_config*" $ nano .ipython/profile_nbserver/ipython_notebook_config.py Add the following lines after c = get_config() c.NotebookApp.certfile = u'/home/ubuntu/mycert.pem' c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.password = u'sha1:207eb1f4671f:92af6...' c.NotebookApp.port = 8888 Alexander Novikov AWS for scientific computing June 18, 2015 12 / 21
  • 13. Nano Nano is a command line editor. Essential commands (like ctr + o for saving and ctr + x to exit) are listed on the bottom of the interface. Alexander Novikov AWS for scientific computing June 18, 2015 13 / 21
  • 14. Almost there Run the notebook $ ipython notebook --profile=nbserver Find the public URL of your server in AWS console (e.g. https:// ec2-52-28-135-168.eu-central-1.compute.amazonaws.com:8888) and open it in a browser. Aaand it doesn’t work. Alexander Novikov AWS for scientific computing June 18, 2015 14 / 21
  • 15. Security groups Go to the Security Groups tab and open incoming traffic on the 8888 port. Alexander Novikov AWS for scientific computing June 18, 2015 15 / 21
  • 16. Tmux If you close the terminal now, the program will be killed. Use tmux to run it in the background and be able to see the output. $ tmux # Create new terminal. $ ctr + b d # Detach from the current terminal. $ tmux attach # Attach to an existing terminal. Alexander Novikov AWS for scientific computing June 18, 2015 16 / 21
  • 17. Terminating a server When you terminate your server it’s hard drive is erased. 1 Next time you have to configure the server from scratch; 2 You cannot store any data (experiment results). Alexander Novikov AWS for scientific computing June 18, 2015 17 / 21
  • 18. Amazon Machine Image – AMI Template from AWS instances are launched; OS + software; Launch different instance types from the same AMI; You customize (install custom software, services, config, etc) and make your own AMI; AWS Marketplace makes it easy to launch a number of popular applications (e.g, MongoDB, Cafee, OpenCV, etc.). Alexander Novikov AWS for scientific computing June 18, 2015 18 / 21
  • 19. Elastic Block Storage – EBS Create a permanent magnetic or SSD volume of any size; Connect (disconnect) the volume to any server in its data center (availability group). Alexander Novikov AWS for scientific computing June 18, 2015 19 / 21
  • 20. Spot instances Bid $X per hour; If current price > bid, instance terminates; You pay the market price, not the bids. Alexander Novikov AWS for scientific computing June 18, 2015 20 / 21
  • 21. Workflow Create a small instance, set up all the software, download all the data; Make an AMI; Start a powerful spot instance (or a dozen) from your AMI; Create a permanent volume and connect it to the instance; Process the data (in tmux!) and write the results into the volume; Terminate the instance. Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21
  • 22. Other stuff Run a program on a server and see its GUI on your laptop (ssh -X); Use scp to download data to and from your server; Use df -h to see all the disk mounted to the server; Use htop to see running processes; Set up a monitoring so when your server stops working you get an email; Explore AWS bill https://console.aws.amazon.com/billing; Apply for an AWS academic grant. Alexander Novikov AWS for scientific computing June 18, 2015 22 / 21
  • 23. Cleaning up Got to the console and terminate your server; Go to the volume tab and remove all your volumes; Alexander Novikov AWS for scientific computing June 18, 2015 23 / 21
  • 24. Unprotected private key If you see this message when trying to connect @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0660 for ’tutorial.pem’ are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: tutorial.pem Permission denied (publickey). Just set more restrictive permissions for your key file $ chmod 400 key_name.pem Alexander Novikov AWS for scientific computing June 18, 2015 22 / 21
  • 25. Full volume Your program says «Cannot write a file»? Check your volumes, they are probably full. To list all mounted volumes and their sizes use $ df -h Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21
  • 26. Slow down Everything start beeing slow? You probably burnt all your volumes I/O capacity. Wait so it can restore or order a bigger volume (see https://docs.aws.amazon.com/AWSEC2/ latest/UserGuide/EBSVolumeTypes.html for details). Alexander Novikov AWS for scientific computing June 18, 2015 21 / 21