Skip to content

Latest commit

 

History

History
169 lines (107 loc) · 9.79 KB

README.md

File metadata and controls

169 lines (107 loc) · 9.79 KB

RAD Lab Launcher

The RAD Lab Launcher provides an automated way to create the modules inside your Google Cloud environment.

Steps to Install RAD Lab Pre-requisites

  1. Download the Complete directory structure & its files on your Cloud Shell or Localhost.

Open in Cloud Shell

NOTE: Alternatively if you want to deploy using the above Open in Cloud Shell button you will need to set up GitHup Personal Access Token following these steps and skip 1. Enter you GitHib credentials. (Enter your Personal Access Token for the password)

NOTE: RAD Lab deployment is supported only via GCP Cloud Shell, MAC OS, Linux & Windows Operating system.

NOTE: If you are using Windows OS make sure to deploy from Command Prompt and Run as Adminstrator.

  1. Decompress the download: unzip rad-lab-main.zip

  2. Make sure CURL & BASH is installed on the operating system from where you are running the deployment.

NOTE: If you are using Cloud Shell then CURL & BASH comes pre-installed with it, thus you can skip this step.

  1. Navigate to the RADLab radlab-launcher folder : cd ./rad-lab-main/radlab-launcher

  2. Install all the pre-requisites by running : python3 installer_prereq.py. NOTE: Currently the deployment is supported for Python 3.7.3 and above. List of Pre-requisites we are installing in this step:

  3. Verify the installation by running : terraform -help

  4. From a Google Cloud perspective, every module requires a set of IAM permissions a Cloud Admin persona requires to run the Terraform code. The individual modules will list the minimum permissions users require to successfully create the infrastructure.

  5. The Cloud Admin should have the following information handy with them which will be used in the guided setup deployment of the RAD-Lab modules:

    • GCP Organization ID

    • GCP Billing Account for RAD Lab deployments (projects/resources).

    • [OPTIONAL] GCP Folder ID if you would like to deploy the RAD Lab Deployment within specific GCP folder.

    • [OPTIONAL] GCS Bucket with read/write access where the Terraform states will be saved.

      NOTE: If you don’t have the GCS bucket already, you will also get the option to create the same as part of the guided setup.

    • Depending on how your Google Organization is configured and how your Project and Service quotas are set, you can run into errors during deployment. Please see the Troubleshooting Common Problems section for a list of common problems and fixes.

  6. Set the default project id where the GCS bucket exists, to store Terraform configs/state. You can use gcloud config set with project property to set the project.

gcloud config set project <myProject>

NOTE: If the default project id is not set then in the guided setup you will need to manually enter the GCS bucket name (you would like to create) where you would like to store Terraform configs/state for RAD Lab configs and also the project ID where the GCS bucket will be created.

Steps to Deploy RAD Lab Modules

Currently RAD Lab is only comprised of single module i.e. Data Science Module and new modules will be coming out soon.

  1. Navigate to the RAD Lab radlab-launcher folder : cd ./rad-lab-main/radlab-launcher.

  2. Start the Guided setup by running : python3 radlab.py and follow the instructions.

NOTE: Save the deployment_id from the output of the above script execution for future reference, for making any updates or delete the RADLab Module created.

Example Run of RAD-Lab Launcher

  1. Select the RAD Lab modules you would like to deploy
List of available RADLab modules:
[1] Data Science
[2] Exit
Choose a number for the RADLab Module: 
  1. Select the Action you want to perform for the corresponding RAD Lab Model:
Action to perform for RADLab Deployment ?
[1] Create New
[2] Update
[3] Delete
Choose a number for the RADLab Module Deployment Action: 1

NOTE: If you are selecting Update/Delete action for RAD Lab Model then you will be required to provide the deployment id which is provided as the output of successfully newly created a RAD Lab Module deployment.

Enter RAD Lab Module Deployment ID (example 'ioi9' is the id for project with id - radlab-ds-analytics-ioi9):
  1. If you selected Create New/Update of RAD Lab deployment, follow the guided set up and provide user inputs like - Organization ID, Billing Account, Folder ID, Trusted users for the RAD Lab Module which you are setting up.

  2. If you selected Create New of RAD Lab deployment, follow the guided setup and provide the name of the GCS bucket and its Project ID where you would like to store the terraform deployment state. Keep in mind you cannot use UPPER case characters, spaces, underscore ** _ ** or contain the word "google". See Bucket Naming Guidelines for a full list of bucket namming guidelines.

Enter the GCS Bucket name where Terraform States will be stored: 

NOTE: There should be a Billing associated to the above selected project for the successful creation of the GCS bucket.

  1. Enter the Number of AI Notebooks required for the specific model.
Number of AI Notebooks required [Default is 1 & Maximum is 10] :
  1. Enter the username of the user whom you would like to provide access to the AI Notebooks.
Enter the username of trusted users needing access to AI Notebooks, or enter 'quit': testuser1
Enter the username of trusted users needing access to AI Notebooks, or enter 'quit': quit
  1. [Can be Skipped when running on Cloud Shell] Set up Application Default Credentials. When you run deployment on cloud shell you see a Warning about using the same credentials as the service credentials associated to the GCE VM where cloud shell is running. If you are using the same Cloud Admin account for RAD Lab deployment with which you have logged in to the cloud shell then you may enter N or n or No, etc.

NOTE: There wont be any issues if you enter Y or y or yes, etc even if you are using the same accounts as you will again get to authenticate in next step as part of guided set up.

You are running on a Google Compute Engine virtual machine.
The service credentials associated with this virtual machine
will automatically be used by Application Default
Credentials, so it is not necessary to use this command.

If you decide to proceed anyway, your user credentials may be visible
to others with access to this virtual machine. Are you sure you want
to authenticate with your personal account?

**Do you want to continue (Y/n)?**
  1. [Can be Skipped when running on Cloud Shell] Authenticate as the user of whom you want to have the Application Default Credentials configured to the cloud shell. These credentials should be of the Cloud Admin.

    • Follw the link (from the cloud shell terminal) in your browser.

    • Complete the OAuth flow by Authenticating as Cloud Admin user.

    • Copy the verification code from the browser and paste it on the Cloud Shell terminal waiting for the input.

Go to the following link in your browser:  https://accounts.google.com/o/oauth2/auth?....

Enter verification code:
  1. This is where the Terraform module (example: Data Science module) will kick in and Terraform config scripts will be deployed which will spin up respective projects/services/sources, etc.

  2. Once the RAD Lab deployment is completed it will throw the below Outputs on the Cloud Shell Terminal for the Cloud Admin to share with the RADLab users.

Outputs:

deployment_id = "ioi9"
notebooks-instance-names = "notebooks-instance-0"
project-radlab-ds-analytics-id = "radlab-ds-analytics-ioi9"
user-scripts-bucket-uri = "https://www.googleapis.com/storage/v1/b/user-scripts-notebooks-instance-ioi9"


GCS Bucket storing Terrafrom Configs: my-sample-bucket

TERRAFORM DEPLOYMENT COMPLETED!!!

NOTE: Save the deployment_id for future reference, for making any updates or delete the RADLab Module created.

NOTE: If you see any errors on your deployment run please follow the Troubleshooting doc to lookup for errors and corresponding solutions.

Troubleshooting Common Problems

  1. Project quota exceeded
  2. Unable to modify Organization Policy Constraints
  3. Local Terraform Deployment ID Directory Already Exists