Rstudio Server on Amazon EC2

Similar documents
ST 810, Advanced computing

Tutorial: Using HortonWorks Sandbox 2.3 on Amazon Web Services

MATLAB on EC2 Instructions Guide

Creating a DUO MFA Service in AWS

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

File Transfer Examples. Running commands on other computers and transferring files between computers

MATLAB Distributed Computing Server Cloud Center User s Guide

Chapter 9 PUBLIC CLOUD LABORATORY. Sucha Smanchat, PhD. Faculty of Information Technology. King Mongkut s University of Technology North Bangkok

Laboration 3 - Administration

DVS-100 Installation Guide

Single Node Hadoop Cluster Setup

Cloud Computing For Bioinformatics. EC2 and AMIs

Adobe Marketing Cloud Using FTP and sftp with the Adobe Marketing Cloud

CASHNet Secure File Transfer Instructions

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Creating an ESS instance on the Amazon Cloud

AdWhirl Open Source Server Setup Instructions

Partek Flow Installation Guide

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

ArcGIS 10.3 Server on Amazon Web Services

INASP: Effective Network Management Workshops

Tibbr Installation Addendum for Amazon Web Services

Configuring SSH and Telnet

SSH and FTP on Ubuntu WNYLUG Neal Chapman 09/09/2009

DVS-100 Installation Guide

Amazon Web Services EC2 & S3

Hadoop Installation MapReduce Examples Jake Karnes

How To Use Amazon Cloud 2 On Linux And Windows 2 On A Pc Or Mac Or Ipad (For Pc) On A Microsoft Mac Or Macbook Or Ipa (For Mac) On An Ubuntu Or Ipro (For Windows

Running Kmeans Mapreduce code on Amazon AWS

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

Background on Elastic Compute Cloud (EC2) AMI s to choose from including servers hosted on different Linux distros

WinSCP PuTTY as an alternative to F-Secure July 11, 2006

Amazon EFS (Preview) User Guide

How To Backup On Ubuntu (Amd64) With Back In Time (Amd) On Windows Xp) On A Windows Xp (Amd32) On Ubunus On A Ubuntu

Secure Web Browsing in Public using Amazon

Student installation of TinyOS

HDFS Cluster Installation Automation for TupleWare

HPCC - Hrothgar Getting Started User Guide

Introduction to Cloud Computing on Amazon Web Services (AWS) with focus on EC2 and S3. Horst Lueck

FREE computing using Amazon EC2

Tonido Cloud Admin Guide

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

OpenGeo Suite for Linux Release 3.0

Running Knn Spark on EC2 Documentation

Using sftp in Informatica PowerCenter

SSH Tutorial. A. Andreatos Div. of Computer Engineering & Information Science Hellenic Air Force Academy GREECE gmail.

Deploying MongoDB and Hadoop to Amazon Web Services

Install and configure a Debian based UniFi controller

Comsol Multiphysics. Running COMSOL on the Amazon Cloud. VERSION 4.3a

Getting Started with AWS. Computing Basics for Linux

McAfee Public Cloud Server Security Suite

Connecting to the School of Computing Servers and Transferring Files

Ulteo Open Virtual Desktop Installation

Online Backup Guide for the Amazon Cloud: How to Setup your Online Backup Service using Vembu StoreGrid Backup Virtual Appliance on the Amazon Cloud

jbase 5 Install on Amazon AWS a Primer

Getting Started with AWS. Hosting a Web App

ASX SFTP External User Guide

TS-800. Configuring SSH Client Software in UNIX and Windows Environments for Use with the SFTP Access Method in SAS 9.2, SAS 9.3, and SAS 9.

How to upload large files to a JTAC Case

Eucalyptus User Console Guide

IBM WebSphere Application Server Version 7.0

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Instructions for Accessing the Advanced Computing Facility Supercomputing Cluster at the University of Kansas

How To Deploy Sangoma Sbc Vm At Amazon Cloud Service (Awes) On A Vpc (Virtual Private Cloud) On An Ec2 Instance (Virtual Cloud)

FileCruiser Backup & Restoring Guide

VXOA AMI on Amazon Web Services

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

Comsol Multiphysics. Running COMSOL on the Amazon Cloud. VERSION 4.3b

Amazon Inspector. User Guide Version Latest

Lab Configure Basic AP Security through IOS CLI

Managing Your Microsoft Windows Server Fleet with AWS Directory Service. May 2015

Cassandra Installation over Ubuntu 1. Installing VMware player:

Free Dynamic DNS account you can use one of your choosing I like DynDNS but there's also No-IP and probably others.

Leveraging SAP HANA & Hortonworks Data Platform to analyze Wikipedia Page Hit Data

Hadoop Data Warehouse Manual

Installation documentation for Ulteo Open Virtual Desktop

How To Create A Virtual Private Cloud On Amazon.Com

Pertino HA Cluster Deployment: Enabling a Multi- Tier Web Application Using Amazon EC2 and Google CE. A Pertino Deployment Guide

AWS Quick Start Guide. Launch a Linux Virtual Machine Version

Department of Veterans Affairs VistA Integration Adapter Release Enhancement Manual

Using Network Attached Storage with Linux. by Andy Pepperdine

Linux Connection Guide. by Tristan Findley

USER CONFERENCE 2011 SAN FRANCISCO APRIL Running MarkLogic in the Cloud DEVELOPER LOUNGE LAB

Extending Remote Desktop for Large Installations. Distributed Package Installs

Install and configure SSH server

OCS Virtual image. User guide. Version: Viking Edition

Adafruit's Raspberry Pi Lesson 6. Using SSH

VX 9000E WiNG Express Manager INSTALLATION GUIDE

Introduction to analyzing big data using Amazon Web Services

Using The Hortonworks Virtual Sandbox

Step One: Installing Rsnapshot and Configuring SSH Keys

VMUnify EC2 Gateway Guide

Cloud Homework instructions for AWS default instance (Red Hat based)

Zend Server Amazon AMI Quick Start Guide

Transcription:

Rstudio Server on Amazon EC2 Liad Shekel liad.shekel@gmail.com June 2015 Liad Shekel Rstudio Server on Amazon EC2 1 / 72

Rstudio Server on Amazon EC2 Outline 1 Amazon Web Services (AWS) History Services Amazon EC2 Create an AWS Account 2 SSH and Asymmetric Cryptography Basic terminology Launch an EC2 instance Connect to EC2 instance via SSH 3 Install R on Ubuntu Server Linux basics Install R on Ubuntu Server Install Rstudio on Ubuntu Server Liad Shekel Rstudio Server on Amazon EC2 2 / 72

History 1994-2006 1994: Jeff Bezos founded Amazon 2002: AWS was developed for Amazon s internal infrastructure 2003: AWS started building an "infrastructure service for the world. 2006: Amazon launched Amazon Simple Storage Service (Amazon S3) and a virtual computing environment called Amazon Elastic Compute Cloud (Amazon EC2) Liad Shekel Rstudio Server on Amazon EC2 3 / 72

How big is Amazon Web Services? Today About 1.4 million servers working around the globe 158k 450k servers 1/3 of all internet users will access an AWS cloud site at least once a day (2012) 1% of all internet traffic (2012) Liad Shekel Rstudio Server on Amazon EC2 4 / 72

Amazon Web Services (AWS) Services Liad Shekel Rstudio Server on Amazon EC2 5 / 72

Amazon Web Services (AWS) Amazon Elastic Compute Cloud (EC2) Liad Shekel Rstudio Server on Amazon EC2 6 / 72

Amazon Web Services (AWS) Amazon Simple Storage Service (S3) Liad Shekel Rstudio Server on Amazon EC2 7 / 72

Amazon Web Services (AWS) Amazon Relational Database Service (RDS) Liad Shekel Rstudio Server on Amazon EC2 8 / 72

Amazon Web Services (AWS) NoSQL database service (DynamoDB) * Petabyte-scale data warehouse (RedShift) Liad Shekel Rstudio Server on Amazon EC2 9 / 72

Amazon Web Services (AWS) Analytics (Hadoop, ML as a service) Liad Shekel Rstudio Server on Amazon EC2 10 / 72

Amazon EC2 Next: EC2 instances Liad Shekel Rstudio Server on Amazon EC2 11 / 72

Amazon Elastic Compute Cloud (EC2) Introduction Marketing lines Scale to your needs - Amazon EC2 provides re-sizable compute capacity which allows to quickly scale capacity, both up and down, as your computing requirements change. Pay per hour - Amazon EC2 allows you to pay only for capacity that you actually use. Buttom line EC2 instance is a remote {server / machine / virtual machine / instance / computer / host } with flexible and changeable specifications. Liad Shekel Rstudio Server on Amazon EC2 12 / 72

Create an AWS Account Link: www.aws.amazon.com Liad Shekel Rstudio Server on Amazon EC2 13 / 72

Create an AWS Account Liad Shekel Rstudio Server on Amazon EC2 14 / 72

Create an AWS Account Liad Shekel Rstudio Server on Amazon EC2 15 / 72

Create an AWS Account Login credentials Liad Shekel Rstudio Server on Amazon EC2 16 / 72

Create an AWS Account Contact information Liad Shekel Rstudio Server on Amazon EC2 17 / 72

Create an AWS Account Payment information Liad Shekel Rstudio Server on Amazon EC2 18 / 72

Create an AWS Account Identity verification (1) Liad Shekel Rstudio Server on Amazon EC2 19 / 72

Create an AWS Account Identity verification (2) Liad Shekel Rstudio Server on Amazon EC2 20 / 72

Create an AWS Account Identity verification (3) Liad Shekel Rstudio Server on Amazon EC2 21 / 72

Create an AWS Account Support plan Liad Shekel Rstudio Server on Amazon EC2 22 / 72

Create an AWS Account Confirmed Liad Shekel Rstudio Server on Amazon EC2 23 / 72

Create an AWS Account Wait... Liad Shekel Rstudio Server on Amazon EC2 24 / 72

Create an AWS Account Done! Liad Shekel Rstudio Server on Amazon EC2 25 / 72

Create an AWS Account Next: EC2 instances Liad Shekel Rstudio Server on Amazon EC2 26 / 72

Amazon Elastic Compute Cloud (EC2) First glance Link: https://console.aws.amazon.com Liad Shekel Rstudio Server on Amazon EC2 27 / 72

Amazon Elastic Compute Cloud (EC2) Instances Liad Shekel Rstudio Server on Amazon EC2 28 / 72

Launch EC2 Instance Choose Amazon machine image (AMI) Liad Shekel Rstudio Server on Amazon EC2 29 / 72

Launch EC2 Instance Choose an instance type Liad Shekel Rstudio Server on Amazon EC2 30 / 72

Launch EC2 Instance How much does it cost? (1) Liad Shekel Rstudio Server on Amazon EC2 31 / 72

Launch EC2 Instance How much does it cost? (2) Liad Shekel Rstudio Server on Amazon EC2 32 / 72

Launch EC2 Instance Instance details Liad Shekel Rstudio Server on Amazon EC2 33 / 72

Launch EC2 Instance SSD / Magnetic Storage (30GB in free tier) Liad Shekel Rstudio Server on Amazon EC2 34 / 72

Launch EC2 Instance Add tags Liad Shekel Rstudio Server on Amazon EC2 35 / 72

Launch EC2 Instance Security groups Liad Shekel Rstudio Server on Amazon EC2 36 / 72

Launch EC2 Instance Review and launch! Liad Shekel Rstudio Server on Amazon EC2 37 / 72

Launch EC2 Instance Oh. Wait... Key pair? SSH? Liad Shekel Rstudio Server on Amazon EC2 38 / 72

Launch EC2 Instance Oh. Wait... Key pair? SSH? Liad Shekel Rstudio Server on Amazon EC2 39 / 72

Kay Pair and Asymmetric Cryptography Public-key encryption Public-key encryption and authentication The message is encrypted on the remote machine using the client s public key The message can be decrypted only with the matching private key RSA is one example of a public-key algorithm. RSA is based on the practical difficulty of factoring the product of two large prime numbers. Liad Shekel Rstudio Server on Amazon EC2 40 / 72

Secure Shell (SSH) What is an SSH protocol? Basics A shell is a user interface for access to an operating system s services A Secure Shell (SSH) is an encrypted network protocol for initiating text-based shell sessions on remote machines in a secure way Client side requires SSH client (such as Putty or MobaXterm) Remote side require SSH server (build-in Ubuntu server) The Secure File Transfer Protocol (SFTP) is an SSH extension that provides file access, file transfer, and file management functionalities Usually, SSH uses port 22 SSH uses Asymmetric cryptography Liad Shekel Rstudio Server on Amazon EC2 41 / 72

Asymmetric cryptography In practice How? What? Where? On the remote server there should be a list of authorized public keys. The corresponding private keys are authorized for connection. The authorized_keys file is located in /home/<user_name>/.ssh/authorized_keys To connect to the remote server, make sure that your public key appears in the authorized_keys file (on the server) Choose your private key file on the SSH client configurations That s it Liad Shekel Rstudio Server on Amazon EC2 42 / 72

Launch EC2 Instance (Cont d) We re back! Liad Shekel Rstudio Server on Amazon EC2 43 / 72

Launch EC2 Instance (Cont d) Download your new private key Liad Shekel Rstudio Server on Amazon EC2 44 / 72

Launch EC2 Instance (Cont d) Congrats! Download here: https://goo.gl/k8vss2 My new PRIVATE key! What are we missing? Liad Shekel Rstudio Server on Amazon EC2 45 / 72

Launch EC2 Instance (Cont d) Congrats! Download here: https://goo.gl/k8vss2 My new PRIVATE key! What are we missing? The matching public key is stored in the authorized_keys file on the instance. Liad Shekel Rstudio Server on Amazon EC2 45 / 72

Launch EC2 Instance (Cont d) Launch you first EC2 instance Liad Shekel Rstudio Server on Amazon EC2 46 / 72

Launch EC2 Instance (Cont d) Liad Shekel Rstudio Server on Amazon EC2 47 / 72

Launch EC2 Instance (Cont d) Instance State: Pending Liad Shekel Rstudio Server on Amazon EC2 48 / 72

Launch EC2 Instance (Cont d) Instance State: Running! Liad Shekel Rstudio Server on Amazon EC2 49 / 72

Launch EC2 Instance (Cont d) Instance State: Running! Liad Shekel Rstudio Server on Amazon EC2 50 / 72

Use SSH Client Introducing MobaXterm Liad Shekel Rstudio Server on Amazon EC2 51 / 72

Use SSH Client New session Liad Shekel Rstudio Server on Amazon EC2 52 / 72

Use SSH Client Session settings Liad Shekel Rstudio Server on Amazon EC2 53 / 72

Use SSH Client SSH session Liad Shekel Rstudio Server on Amazon EC2 54 / 72

Use SSH Client SSH settings Remote host: IP address Use private key: downloaded private key file Liad Shekel Rstudio Server on Amazon EC2 55 / 72

Use SSH Client Login: ubuntu (default user) Liad Shekel Rstudio Server on Amazon EC2 56 / 72

Use SSH Client Login: ubuntu (default user) Liad Shekel Rstudio Server on Amazon EC2 57 / 72

Use SSH Client The IP address is now a known host. Liad Shekel Rstudio Server on Amazon EC2 58 / 72

Use SSH Client Welcome to Ubuntu 14.04.2 Liad Shekel Rstudio Server on Amazon EC2 59 / 72

Linux basics Command line The Linux command structure: command OPTIONS ARGUMENTS Command: This is the base of the command. To show top lines of a file, use the head command To to create new directory use the mkdir command OPTIONS: Alter the behavior of the command. To show 5 or 10 top lines of a file, use the head command with option -n 5 or -n 10 ARGUMENTS: Typically file names or other data that is needed by the command. head -n 5 file_name Liad Shekel Rstudio Server on Amazon EC2 60 / 72

Linux basics Super User DO First Thing to know: Example: To delete the file a.txt type: rm a.txt However, if it doesn t work, try: sudo rm a.txt Example: sudo = Super User DO. Liad Shekel Rstudio Server on Amazon EC2 61 / 72

Linux basics List of files and directories: ls, ls -l, ls -l dir_path. Navigate between directories: cd, cd.., cd ~, cd /, cd dir_name Edit/create file (using nano or vim) nano file_name.r, vim file_name.r open file in view mode (read only) nano -v file_name.r Display Linux processes: top, htop (sudo apt-get install htop) Liad Shekel Rstudio Server on Amazon EC2 62 / 72

Linux basics Add user ubuntu is the default AMI (Amazon Machine Image) user. RStudio require password authenticated user. Add user: sudo adduser <username> you will be asked for a new password (twice) and then for an optional additional information. Make yourself a sudoer (optional): sudo adduser <username> sudo Liad Shekel Rstudio Server on Amazon EC2 63 / 72

Install R on Ubuntu Server In Linux, like in R, we can download packages ( software) from repositories. For example, to install R run: sudo apt-get install r-base-core Download package lists from the repositories: sudo apt-get update Upgrade packages according to the updated information: sudo apt-get upgrade The default repositories install old R version (3.0.2), In order to download the latest version we need to manually add repository. Liad Shekel Rstudio Server on Amazon EC2 64 / 72

Install R on Ubuntu Server Add repository and install latest R version Edit the sources.list file and add the R repository location sudo nano /etc/apt/sources.list Add this line to the end of the file: deb http://cran.rstudio.com/bin/linux/ubuntu trusty/. To get permissions to the new repository run: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9 Download new package lists: sudo apt-get update Install the latest R version (3.2.0): sudo apt-get install r-base-core Liad Shekel Rstudio Server on Amazon EC2 65 / 72

Install Rstudio on Ubuntu Server Only a few seconds away... Rstudio installation gdebi lets you install local deb packages: sudo apt-get install gdebi-core Download rstudio s deb package: wget http://download2.rstudio.org/rstudio-server-0.99.446-amd64.deb Use gdebi to install the deb package: sudo gdebi rstudio-server-0.99.446-amd64.deb Liad Shekel Rstudio Server on Amazon EC2 66 / 72

Install Rstudio on Ubuntu Server Only a few seconds away... Rstudio installation gdebi lets you install local deb packages: sudo apt-get install gdebi-core Download rstudio s deb package: wget http://download2.rstudio.org/rstudio-server-0.99.446-amd64.deb Use gdebi to install the deb package: sudo gdebi rstudio-server-0.99.446-amd64.deb Open web browser and enter url: <server_ip>:8787 Use your username and password. Do crazy things with Rstudio. Liad Shekel Rstudio Server on Amazon EC2 66 / 72

Rstudio Server on Amazon EC2 Thank you! Liad Shekel liad.shekel@gmail.com Liad Shekel Rstudio Server on Amazon EC2 67 / 72

Or... Rstudio AMI! Google Rstudio AMI and follow the first link: http://www.louisaslett.com/rstudio_ami/ Liad Shekel Rstudio Server on Amazon EC2 68 / 72

Rstudio AMI Community AMI Liad Shekel Rstudio Server on Amazon EC2 69 / 72

Rstudio AMI Community AMI Liad Shekel Rstudio Server on Amazon EC2 70 / 72

Rstudio AMI Community AMI Liad Shekel Rstudio Server on Amazon EC2 71 / 72

Rstudio Server on Amazon EC2 Thank you! Liad Shekel liad.shekel@gmail.com Liad Shekel Rstudio Server on Amazon EC2 72 / 72