MSP Testbed infrastructure operations
This document describes operational guidance for MSP Testbed infrastructure. This service is operated on the Managed Services Platform (MSP).
If you need assistance with MSP infrastructure, reach out to the Core Services team in #discuss-core-services.
Service overview
PROPERTY | DETAILS |
---|---|
Service ID | msp-testbed |
Owners | core-services |
Service kind | Cloud Run service |
Environments | test, robert |
Docker image | us.gcr.io/sourcegraph-dev/msp-example |
Source code | github.com/sourcegraph/sourcegraph - cmd/msp-example |
Environments
test
PROPERTY | DETAILS |
---|---|
Project ID | msp-testbed-test-77589aae45d0 |
Category | test |
Resources | test Redis, test PostgreSQL instance, test BigQuery dataset |
Alerts | GCP monitoring |
Sentry | msp-testbed-test |
Domain | msp-testbed.sgdev.org |
MSP infrastructure access needs to be requested using Entitle for time-bound privileges. Test environments may have less stringent requirements.
ACCESS | ENTITLE REQUEST TEMPLATE |
---|---|
GCP project read access | Entitle request for the ‘Engineering Projects’ folder |
GCP project write access | Entitle request for the ‘Engineering Projects’ folder |
For Terraform Cloud access, see test Terraform Cloud.
test Cloud Run
The MSP Testbed test service implementation is deployed on Google Cloud Run.
PROPERTY | DETAILS |
---|---|
Console | Cloud Run service |
Service logs | GCP logging |
You can also use sg msp
to quickly open a link to your service logs:
sg msp logs msp-testbed test
test Redis
PROPERTY | DETAILS |
---|---|
Console | Memorystore Redis instances |
test PostgreSQL instance
PROPERTY | DETAILS |
---|---|
Console | Cloud SQL instances |
Databases | primary |
To connect to the PostgreSQL instance in this environment, use sg msp
in the sourcegraph/managed-services
repository:
# For read-only access
sg msp pg connect msp-testbed test
# For write access - use with caution!
sg msp pg connect -write-access msp-testbed test
test BigQuery dataset
PROPERTY | DETAILS |
---|---|
Dataset Project | msp-testbed-test-77589aae45d0 |
Dataset ID | msp_testbed |
Tables | example |
test Terraform Cloud
This service’s configuration is defined in sourcegraph/managed-services/services/msp-testbed/service.yaml
, and sg msp generate msp-testbed test
generates the required infrastructure configuration for this environment in Terraform.
Terraform Cloud (TFC) workspaces specific to each service then provisions the required infrastructure from this configuration.
You may want to check your service environment’s TFC workspaces if a Terraform apply fails (reported via GitHub commit status checks in the sourcegraph/managed-services
repository, or in #alerts-msp-tfc).
To access this environment’s Terraform Cloud workspaces, you will need to log in to Terraform Cloud and then request Entitle access to membership in the “Managed Services Platform Operator” TFC team. The “Managed Services Platform Operator” team has access to all MSP TFC workspaces.
The Terraform Cloud workspaces for this service environment are grouped under the msp-msp-testbed-test
tag, or you can use:
sg msp tfc view msp-testbed test
robert
PROPERTY | DETAILS |
---|---|
Project ID | msp-testbed-robert-7be9 |
Category | test |
Resources | robert Redis, robert PostgreSQL instance, robert BigQuery dataset |
Alerts | GCP monitoring |
Sentry | msp-testbed-robert |
Domain | msp-testbed-robert.sgdev.org |
Cloudflare WAF | ✅ |
MSP infrastructure access needs to be requested using Entitle for time-bound privileges. Test environments may have less stringent requirements.
ACCESS | ENTITLE REQUEST TEMPLATE |
---|---|
GCP project read access | Entitle request for the ‘Engineering Projects’ folder |
GCP project write access | Entitle request for the ‘Engineering Projects’ folder |
For Terraform Cloud access, see robert Terraform Cloud.
robert Cloud Run
The MSP Testbed robert service implementation is deployed on Google Cloud Run.
PROPERTY | DETAILS |
---|---|
Console | Cloud Run service |
Service logs | GCP logging |
You can also use sg msp
to quickly open a link to your service logs:
sg msp logs msp-testbed robert
robert Redis
PROPERTY | DETAILS |
---|---|
Console | Memorystore Redis instances |
robert PostgreSQL instance
PROPERTY | DETAILS |
---|---|
Console | Cloud SQL instances |
Databases | primary |
To connect to the PostgreSQL instance in this environment, use sg msp
in the sourcegraph/managed-services
repository:
# For read-only access
sg msp pg connect msp-testbed robert
# For write access - use with caution!
sg msp pg connect -write-access msp-testbed robert
robert BigQuery dataset
PROPERTY | DETAILS |
---|---|
Dataset Project | msp-testbed-robert-7be9 |
Dataset ID | msp_testbed |
Tables | example |
robert Terraform Cloud
This service’s configuration is defined in sourcegraph/managed-services/services/msp-testbed/service.yaml
, and sg msp generate msp-testbed robert
generates the required infrastructure configuration for this environment in Terraform.
Terraform Cloud (TFC) workspaces specific to each service then provisions the required infrastructure from this configuration.
You may want to check your service environment’s TFC workspaces if a Terraform apply fails (reported via GitHub commit status checks in the sourcegraph/managed-services
repository, or in #alerts-msp-tfc).
To access this environment’s Terraform Cloud workspaces, you will need to log in to Terraform Cloud and then request Entitle access to membership in the “Managed Services Platform Operator” TFC team. The “Managed Services Platform Operator” team has access to all MSP TFC workspaces.
The Terraform Cloud workspaces for this service environment are grouped under the msp-msp-testbed-robert
tag, or you can use:
sg msp tfc view msp-testbed robert