afeld / tech-foundations

Columbia SPS Operations Management in IT course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Operations Management in IT course

This repository uses Terraform to set up Google Cloud for the Columbia University's Operations Management in IT course. Using a list of student and instructor IDs (UNIs), it provisions Projects for each, granting access to the instructor and Associates (a.k.a. teaching assistants) via IAM.

Course setup

This only needs to be done once per semester, by whichever instructor is managing Google Cloud.

  1. If the number of students+instructors is larger than 20, request a Project Quota increase

  2. Install Terraform

  3. Install gcloud

  4. Set up gcloud:

    gcloud auth application-default login
    gcloud config set project columbia-sps-tech-foundations
    gcloud auth application-default set-quota-project columbia-sps-tech-foundations
  5. Download the student list

    1. Go to the SSOL
    2. Click Class List
    3. Click See Roster
    4. Click Download comma delimited roster with Excel extension.
    5. Move to terraform/students.csv
  6. Run terraform apply -parallelism=400 (arbitrarily high number)

As the course enrollment changes, re-run the last two steps.

As students go through the setup (below), you can re-run the apply to get a report of who is missing billing.

Student setup

Do these one-time setup steps to ensure you don't have to pay for Google Cloud use for this class. Credits are provided through the Google Cloud for Education program.

A Project has been created for you, which the instructors have access to for troubleshooting. You redeem the credits, which creates a Billing Account. You then have to associate that Billing Account with the existing Project.

  1. Redeem the credits - video walkthrough
    1. Instructor will send the coupon retrieval link
    2. Fill in the form
      • Use your UNI for your email, not an alias
    3. When you get to the GCP Credit Application screen, make sure you've switched to your Columbia Google account
  2. Dismiss the Free Trial banner — should not need a credit card
  3. Confirm the credits were applied
    1. Go to the Billing Accounts page
    2. Click Billing Account for Education
    3. In the sidebar, click Credits
    4. You should see an Operations Management in IT credit for $50
  4. Switch to your Project
    1. In the top navigation bar, on the left side, click the drop-down
    2. You should see a Select a resource modal pop up
    3. Click the ALL tab
    4. Click Ops Mgmt in IT - <your UNI>
  5. Change the Billing Account to Billing Account for Education

Accidentally redeemed the credit with the wrong Google account

If you missed the step above about switching to your Columbia Google account, the easiest fix is to follow these steps and make your <uni>@columbia.edu user a Billing Account Administrator on the Billing Account for Education.

Use of Google Cloud outside this class

If you're using Google Cloud for something outside of this class, we suggest creating a separate Project to keep things isolated. The Billing Account for Education is yours, so you're welcome to associate it with other Projects to use those credits.

We won't use the full $50 credit for this class, so you're welcome to take advantage of the remainder for other things. If you use it up, you'll start spending against your Free Trial. Beyond that, you'll have to pay.

Cleanup

At the end of the course:

  1. Delete all rows from terraform/students.csv.
  2. Delete the instructors local values.
  3. Run terraform apply -parallelism=400

Troubleshooting students

Instructors should have access to all student Projects. In the selector in the top of the nav bar, switch to their Project; the name ends with their UNI.

Audit Logs

To help figure out what went wrong, it may be helpful to see what actions a student performed.

  1. Go to Logs Explorer
  2. Run a query with protoPayload.authenticationInfo.principalEmail!="alf2215@columbia.edu" to filter out setup calls made from this repository

Info about Cloud Audit Logs

About

Columbia SPS Operations Management in IT course

License:MIT License


Languages

Language:JavaScript 52.0%Language:HCL 48.0%