Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chien-Chung Shen cshen@udel.edu Google Compute Engine Chien-Chung Shen cshen@udel.edu.

Similar presentations


Presentation on theme: "Chien-Chung Shen cshen@udel.edu Google Compute Engine Chien-Chung Shen cshen@udel.edu."— Presentation transcript:

1 Chien-Chung Shen cshen@udel.edu
Google Compute Engine Chien-Chung Shen

2 Overall of GCE (1) Create virtual machines (VM) with a variety of configurations Launch a standard boot image based on Debian, Windows, or other standard images. Create a 64 bit x86 Linux-based virtual machine (VM) instance. Google Compute Engine offers a variety of machine types that you can choose from for your instances Maintain and store data in block storage From a VM image, mount persistent block storage (persistent disk) that maintains state beyond the life cycle of the VM instance Manage network access to your virtual machines Use your VMs alone or connected together to form a compute cluster Connect your machines to the Internet with a flexible networking solution that offers static and ephemeral IPv4 addresses Use the built-in load balancing service to distribute heavy workloads across many virtual machines Automatically scale your virtual machines in times of heavy or low traffic; use firewall to set up network access to your instances

3 Overall of GCE (2) Use a variety of tools and OAuth 2.0 authentication to manage VMs OAuth - an open standard for authorization

4 Command-line Quickstart
Install and use the command-line gcloud tool Start a virtual machine (VM) on Google’s infrastructure Configure a firewall to allow traffic to and from the Internet Install an Apache web server to serve web pages Delete VM and resources after you're done with them Prerequisite and setup Have a Google account Have a Developers Console project Go to Developers Console; select an existing project or create a new project; visit the APIs page On the APIs page, look for Google Compute Engine in APIs list; Enable API Follow the prompts to set up billing Download and install the gcloud command-line tool

5 Installing Cloud SDK $ curl | bash OR Download google-cloud-sdk.zip $ unzip google-cloud-sdk.zip $ ./google-cloud-sdk/install.sh Restart “terminal” to allow changes to your PATH to take affect $ source ~/.<bash-profile-file>

6 Authentication & Set Project ID
Authenticate gcloud $ gcloud auth login Set default project ID $ gcloud config set project <PROJECT>

7 Create an Instance A virtual machine (VM) instance runs on the Compute Engine infrastructure and functions like a regular computer, except that the physical machine runs in a Google datacenter When creating an instance, Compute Engine automatically creates a root persistent disk, which stores the root filesystem and OS image that the instance needs to boot Create and start instance $ gcloud compute instances create my-first-instance --image debian-7 --zone us-central1-a Get external IP address of the instance $ gcloud compute instances list

8 Add Firewall Rules To install Apache and serve web pages, create a firewall rule that permits incoming HTTP traffic on port 80, which by default is closed To create a new firewall rule named "allow-http" that allows traffic on port 80 $ gcloud compute firewall-rules create allow-http \ --description "Incoming http allowed." --allow tcp:80 To get more information about the firewall rule, use the firewall-rules describe command and specify the name of the rule $ gcloud compute firewall-rules describe allow-http List firewall rules $ gcloud compute firewall-rules list

9 Log in to VM Instance $ gcloud compute ssh my-first-instance --zone us-central1-a At the command prompt in the instance home directory Once you have logged in, you can do anything you could do on any other standard Linux machine, including installing applications You have root permissions on your instance and full control over everything Type exit to logout

10 Setup Apache Web Server
Install Apache HTTP Server $ sudo apt-get update $ sudo apt-get install apache2 Create a new home page Change the default webpage /www/var/index.html $ echo '<!doctype html><html><body><h1>Hello World!</h1></body></html>' | sudo tee /var/www/index.html

11 Browse Home Page Get external IP address
$ gcloud compute instances list On a browser, type

12 Clean Up To delete VM instance and accompanying root persistent disk
$ gcloud compute instances delete my-first-instance --zone us-central1-a

13 Hadoop on Google Cloud Platform


Download ppt "Chien-Chung Shen cshen@udel.edu Google Compute Engine Chien-Chung Shen cshen@udel.edu."

Similar presentations


Ads by Google