Chapter 11 Setting up Billing on AnVIL
The following will help you set up billing for your class. You will:
* Set up a billing project for tracking costs
* Add yourself and students to the billing project to grant permission to AnVIL resources
* Learn about different sources of costs in AnVIL
* Estimate costs for your class
* Learn about how to track costs during your class
11.1 Creating a billing project
First, create the Billing Project. Billing Project names must be globally unique and cannot exceed 30 characters. We suggest the name of the Billing Project should be a combination of institution-class- (e.g., “jhu-bmr2021-bill-1”). To create a Billing Project:
Click “+CREATE”
Type in your Billing Project name
Select the appropriate Billing Account
Click “CREATE BILLING PROJECT”
You now have a unique Billing Project.
11.2 Adding Instructors as “Owner”
Next, you want to give instructors permission to use the Billing Project to compute. To set instructor permissions:
Select the “Owned by You” Billing Project sub-list
Select the Billing Project you made in Instructor Billing Project
Select the “Users” tab
Click “+ Add User”. You will be prompted to add a “User email *”.
Begin typing the instructor Group name set up in Instructor Group. You should see an email in the form
(firecloud.org?) (e.g., jhu-bmr2021-instructors@firecloud.org). Ensure “Can manage users (Owner)” is selected
Click “ADD USER”
This step makes it so that co-instructors can edit permissions and administer the Billing Project as needed. While this means you and co-instructors can compute using the student Billing Project, this makes spending difficult to track. Instructors should always use the instructor Workspace to compute. This makes it much easier to track costs associated with instructors versus students.
11.3 Adding Students as “User”
Next, you will add your student Group to the Billing Project so that they can compute. To set student permissions:
Select the “Owned by You” Billing Project sub-list
Select the Billing Project you made in Billing Project
Select the “Users” tab
Click “+ Add User”. You will be prompted to add a “User email *”.
Begin typing the student Group name set up in Student Group. You should see an email in the form
(firecloud.org?) (e.g., jhu-bmr2021-students@firecloud.org). Keep “Can manage users (Owner)” deselected.
Click “ADD USER”
11.4 Understanding the various billing costs
Costs in AnVIL fall into one of three categories: compute costs, storage costs, and network usage (egress) costs. Compute costs are those that students accrue when actively using an AnVIL Workspace. Students can clone a Workspace for no cost, but they will begin to accrue costs as soon as they set up a cloud environment. Compute costs are based on how many CPUs you need, as well as how much memory and storage space you choose. You can also pause the Workspace and pay a lower cost per hour than if you were to keep the Workspace running. Current prices can be found here.
Storage costs are driven by the persistent disk. The persistent disk allows you to store data and installed programs/libraries for a low cost. Students can delete their Workspaces but maintain their persistent disk so they still have access to previous programs they have installed and previous files they’ve created. Current prices can be found here.
Finally, network usage costs are those involved with transferring data between networks or downloading data from the cloud to your local computer. Current prices can be found here.
11.5 Estimating costs before the class begins
AnVIL has a free AnVIL_Cost_Estimator that allows you estimate compute, storage, and network usage costs for your class. This is a Google sheet that you can tailor to fit your needs. Before you use it, make sure the prices are up to date by following the links at the bottom of the sheet.
If you need to create a Budget Justification for your class, you can also use the free AnVIL_Budget_Justification template.
11.6 How much does a class cost?
One of the advantages of billing projects in Terra is that you can keep track of the costs during real time. You can see how much each Workspace is costing while your course is happening, so there are no unexpected surprises at the end!
Full details about billing in Terra can be found here. These instructions are adapted from Terra Support.
To view the costs being accrued by each billing project, you can go to https://console.cloud.google.com/billing. At the top of the page, there is a dropdown menu. Choose the billing project name you’d like to view.
Once you are in proper billing project, you click on “View detailed charges” in the Billing section on the far right.
This takes you to a report of the detailed charges accrued by the billing account. Here, you will be able to see the total cost over a time range, as well as costs broken down by services.