Getting Started with Google Cloud Platform

Getting Started with Google Cloud Platform

Harvard AP275 Computational Design of Materials Spring 2018 Boris Kozinsky Getting started with Google Cloud Platform A virtual machine image containing Python3 and compiled LAMMPS and Quantum Espresso codes are available for our course on the Google Cloud Platform (GCP). Below are instructions on how to get access and start using these resources. Request a coupon code: Google has generously granted a number of free credits for using GCP Compute Engines. Here is the URL you will need to access in order to request a Google Cloud Platform coupon. You will be asked to provide your school email address and name. An email will be sent to you to confirm these details before a coupon code is sent to you. Student Coupon Retrieval Link • You will be asked for a name and email address, which needs to match the domain (@harvard.edu or @mit.edu). A confirmation email will be sent to you with a coupon code. • You can only request ONE code per unique email address. If you run out of computational resources, Google will grant more coupons! If you don’t have a Gmail account, please get one. Harvard is a subscriber to G Suite, so access should work with your @g.harvard.edu email and these were added already to the GCP project. If you prefer to use your personal Gmail login, send it to me. Once you have your google account, you can log in and go to the website below to redeem the coupon. This will allow you to set up your GCP billing account. https://console.cloud.google.com/education Note: You also have an option to sign up for a free trial at GCP, which gives you $300 worth of credit for one year. For this you will need to provide your credit card and billing details after clicking “Try for Free” button (you will not get charged). You do not need to do this really since you have the free coupons. After you complete this step, send me you Gmail or @g.harvard.edu address, so I can add you to the AP275 project. Then you will be able to access the pre-built VM image from the project and set up your own VM instance in your own separate project. Projects setup: Once you are logged in, go to GCP Console. This is the main access point to GCP functionality. https://console.cloud.google.com/ You can browse around and get familiar with documentation, especially take a look at the Compute Engine section. First step is to create your own project. Go to https://console.cloud.google.com/iam- admin/projects Create a new project and call it whatever you like. It will take a few seconds for it to appear. You will next be creating a Compute Engine VM instance in this project, based on the image prepared for you in the AP275 project. To get connected to the AP275 project (once I add you) look for ‘AP275’ in the search Harvard AP275 Computational Design of Materials Spring 2018 Boris Kozinsky bar in the projects page. If you ever get lost, click on the ‘3-bar’ menu button at the top left and got the ‘IAM & Admin’ / ‘All Projects’ sub-menu. Create a VM instance based on the AP275 project image: Go to the Compute Engine / Instances menu: https://console.cloud.google.com/compute/instances You will be offered to create an instance, click on that button. Name your new instance as you like, e.g. “ap275engine”. For the zone you can select US-east1-b/c/d. In the Machine Type drop-down menu you can customize the number of cores and the amount of memory as you prefer. DFT calculations typically should not need a very large amount of memory unless your systems are very large. If you expect large calculations, add more memory per core. You can also later create multiple instances of the same type, if you really need. You can change the core and memory parameters even after you create the instance. For the boot disk selection, click Change and go to the Custom Images tab. There select Show images from / SEAS AP275 project. Select ‘ap275image’ which will automatically get detected as a Standard persistent disk of 30 GB and click Select. You will be taken to the previous screen, leave all the other options there at their default settings and click Create. The creation process takes about 30 seconds, and then your instance will appear with a green check-mark, indicating that it is already running. Logging into your VM instance: The easiest way to log in is to open a browser window with an SSH connection. For this you can simply click on the SSH button to the right of the instance, or select this from the menu. The first time you will be logged in with a username that is generated from your GCP/Gmail username. Your home directory will be empty. On the image there is already a user ‘bond’ set up with a similar environment to our VirtualBox VM’s. To log in as ‘bond’, click on the gear/settings menu button on the top right corner of the SSH window and select ‘Change Linux username’. Type ‘bond’ in the dialog box and reconnect. Now you will see in your home directory the familiar work and software directories. As usual, check to make sure your environment in ~/.profile is properly set up. You can open multiple SSH connection windows per machine using the browser. If you want to connect with your separate SSH client, select this option and follow the instruction to set up your SSH keys. More information is here: https://cloud.google.com/compute/docs/instances/connecting-to-instance. Managing your VM: On your VM instance you automatically have full root privileges using the ‘sudo’ command. If you need to install additional software, type $ sudo apt-get install –y <package>. Important: You will be billed for the time that your VM instance is running, regardless of whether you are performing any calculations and even if you are not logged in via SSH. Think of it as if you left your computer on and forgot to shut it down. Always stop your VM instance when you are finished, otherwise you may run out of credits. If you instance(s) are stopped you should not see any green checkmark icons on your VM instances page. Each coupon is worth $50. A 16-CPU high-cpu instance will cost about $300 if you run it for a full month non-stop. If you run out of time in your project, we can request more credits. But please monitor your usage in https://console.cloud.google.com/billing/. .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us