Enabling executors

For MI 1.1, see the new process here.

Enabling executor on a managed instances is initiated by ”?“. There are a few logical steps to follow.

  1. Update the managed instances terraform to include executor modules
  2. Setup billing alert for the executor resources

Update the managed instances terraform

The change to terraform will be done by Batch Change team. Batch Change team will ping Delivery on the Pull Request for the changes and Delivery team will apply the change.

For Delivery team, you should learn more from this thread before running terraform apply.

Setup billing alert

As of , we give customers a fixed amount (e.g. $500) of computing credits for executors usage, so we need to setup billing alerts.

At a high level, we will create a new monitoring alerting channel (via email) in the GCP project, and configure a budget alert in our organization billing account. All billing alerts will be delivered to #wg-shipping-executors.

Create slack email integration

  • Customers-facing managed instances alert email can be found here
  • Dev and demo instances alert email can be found here

Create alerting channel

This is done by modifying the terraform module

Add the following changes

$CUSTOMER/infrastructure.tf

variable "executor_notification_email" {
  type        = string
  description = "Email to receive billing alerts for executor budgets"
}

resource "google_monitoring_notification_channel" "billing-alerts-managed-instances" {
  display_name = "billing-alerts-managed-instances"
  type         = "email"

  labels = {
    email_address = var.executor_notification_email
  }
}

The email can be found from Create slack email integration section

$CUSTOMER/terraform.tfvars

executor_notification_email = "REPLACE ME with an actual email" #wg-shipping-executors

Apply the change before creating the budget

Create budget

  1. Go to our billing dashboard - budgets & alerts
  2. Click CREATE BUDGET
  3. Create the budget with the following information

Name: sourcegraph-managed-$CUSTOMER-executors Time range: Custom range From: CURRENT DATE (check no end date) Projects: sourcegraph-managed-$CUSTOMER Services: All services Labels: executor_tag = $CUSTOMER-executors Credits: ✅ Promotions and others: ✅

create-budget-01

Budget type: Specified amount Amount: 500

create-budget-03

Only keep the 100% alert threshold rule

Uncheck Email alerts to billing admins and users

Link Monitoring email notification channels we created from the terraform module. Find the email channel by filtering the GCP project from the UI, make sure you select the right project sourcegraph-managed-$CUSTOMER.

create-budget-04

create-budget-02