Skip to content

Commit 410cbba

Browse files
Yashika KhuranaYashika Khurana
authored andcommitted
feat(docs):How to Add a New Application to Cirrus
1 parent 56503f5 commit 410cbba

2 files changed

Lines changed: 197 additions & 1 deletion

File tree

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
id: onboarding-application-cirrus
3+
title: How to Add a New Application to Cirrus
4+
sidebar_label: Onboarding a New Application
5+
---
6+
7+
This guide walks through all the steps required to onboard a new client application to the Cirrus service. These steps assume the application has already been added to Experimenter (`constants.py` and `apps.yaml`) and that all generated FML files have been created.
8+
9+
## Pre-requisites
10+
11+
Before beginning, confirm the following are done:
12+
13+
- Application has been added to Experimenter's `constants.py`
14+
- Application has been added to `apps.yaml`
15+
- All generated FML (Feature Manifest Language) files have been created
16+
- You know the application's FML directory name
17+
- You have an estimate of the application's weekly average requests per second
18+
19+
## Step 1: Add the Application to the Cirrus Helm Chart (Stage + Prod)
20+
21+
**Repository:** `mozilla/webservices-infra`
22+
**Files to edit:** `cirrus/k8s/cirrus/values-stage.yaml` and `values-prod.yaml`
23+
24+
1. Open `values-stage.yaml` and find an existing `clientApplication` entry (e.g. Mozilla Accounts) to use as a template.
25+
26+
2. Copy the entry and update the following fields:
27+
- `name`: your application name (e.g. `subplat`)
28+
- `fmlDir`: the FML directory for your application (e.g. `subplatWeb`)
29+
- `channel`: set to `"staging"` for stage, `"production"` for prod
30+
31+
3. Set the `internal` vs `external` flag:
32+
- **internal** — use this if the application runs inside the `webservices-high-nonprod` US West 1 cluster (required for most server-side apps)
33+
- **external** — use this only for client-side JavaScript use cases (e.g. browser JS)
34+
35+
4. For `values-stage.yaml`:
36+
- Leave auto-scaling at the default (`min=1, max=1`)
37+
- Stage does not need scaled auto-scaling
38+
39+
5. For `values-prod.yaml`:
40+
- Configure auto-scaling based on expected traffic
41+
- Rule of thumb: each container handles ~20 req/s
42+
- Set min replicas to support your weekly average req/s at 50% container capacity
43+
(e.g. if expected traffic is similar to FXA ~2-3 replicas, set min to 5 for safety)
44+
- This gives double the expected capacity for reliability at launch
45+
46+
6. File a PR in the `webservices-infra` repo.
47+
- PR title format: `chore(cirrus): Add <appname>`
48+
- PR description: note which Jira integration ticket this covers (Step 1 of the cloned integration epic)
49+
- Anyone on the Nimbus team can review
50+
51+
## Step 2 (Optional): Increase Tenant Resource Limits
52+
53+
**Repository:** `mozilla/global-platform-admin`
54+
**File:** `tenants/cirrus.yaml`
55+
56+
Only needed if the application's expected traffic exceeds current tenant limits.
57+
58+
- Check current resource limits for stage and prod in `tenants/cirrus.yaml`
59+
- If load testing or traffic estimates suggest limits will be hit, update accordingly
60+
- This step can often be skipped for new applications starting at low traffic
61+
62+
## Step 3: Add the Application to Probe Scraper and Glean
63+
64+
**Repository:** `mozilla/probe-scraper`
65+
66+
1. File a Data Org (DO) ticket to register the new application.
67+
68+
2. File a Glean bug following the Glean docs. Make sure:
69+
- `app_name` ends with `_cirrus` (e.g. `subplat_cirrus`)
70+
- The app depends on `"glean-server"` and `"nimbus-cirrus"`
71+
- Do **not** add any metrics or ping files — the right dependencies are already included via `glean-server` and `nimbus-cirrus`
72+
73+
3. Add the application to probe-scraper's `repositories.yaml`
74+
(see [probe-scraper#617](https://github.com/mozilla/probe-scraper/pull/617) or [probe-scraper#963](https://github.com/mozilla/probe-scraper/pull/963) as examples)
75+
76+
4. Add the application to BigQuery ETL
77+
(see [bigquery-etl#7268](https://github.com/mozilla/bigquery-etl/pull/7268) as an example)
78+
79+
## Step 4: Sync the FML to Experimenter
80+
81+
1. The application team files a PR in their own repo to sync their FML files to Experimenter.
82+
83+
2. Once merged, notify the Nimbus team in `#ask-experimenter` on Slack so they know the FML is available and features are ready for experiment creation.
84+
85+
## Step 5: Experimenter UI Changes
86+
87+
**Repository:** `mozilla/experimenter`
88+
89+
1. Ensure the application appears in the Experimenter UI as a selectable application.
90+
91+
2. Confirm that the application's features are available for selection when creating a new experiment or rollout.
92+
93+
3. If the application is not showing up, check that `constants.py` and `apps.yaml` were updated correctly in the pre-requisites step.
94+
95+
## Step 6: Validate Configurations Before Running A/A Test
96+
97+
Before running an A/A test to validate enrollment, confirm all of the following:
98+
99+
### Environment Variables
100+
101+
- `CIRRUS_REMOTE_SETTING_REFRESH_RATE_IN_SECONDS` — ensure this is set appropriately for how frequently recipes should be refreshed
102+
- `CIRRUS_GLEAN_MAX_EVENTS_BUFFER` — recommended values:
103+
- Stage: `1` (makes it easy to test — events flush immediately)
104+
- Prod: `100`
105+
106+
### Glean App ID / App Name
107+
108+
- Confirm the Glean probe-scraper `app_id` matches Experimenter's `app_id` for this application
109+
- Confirm the Glean probe-scraper `app_name` matches Experimenter's `app_name`
110+
- Confirm `CIRRUS_APP_ID` in the Helm chart matches the above
111+
- Confirm `CIRRUS_APP_NAME` in the Helm chart matches the above
112+
113+
:::caution
114+
If any of these are mismatched, enrollment data will not be attributed correctly.
115+
:::
116+
117+
## Step 7: Run A/A Test and Validate Analysis
118+
119+
1. Create an A/A experiment (two identical branches) for the new application in Experimenter and launch it.
120+
121+
2. After enrollment data starts flowing, validate by joining the application's telemetry events to Cirrus enrollment events in STMO (sql.telemetry.mozilla.org).
122+
123+
3. Check that:
124+
- Branch sizes approximately match the configured distribution
125+
- Enrollment events are being recorded with the correct Nimbus user IDs
126+
127+
4. Some user IDs may not match if those users have disabled data collection — this is expected behaviour, not an error.
128+
129+
5. Automated Jetstream analysis is not currently available for Cirrus experiments due to differences between web application enrollments and the existing analysis paradigm. Analysis must be done manually for now.
130+
131+
## Step 8: Add the Application to the Cirrus Shredder Config
132+
133+
**Repository:** `mozilla/bigquery-etl`
134+
**File:** `shredder/config.yaml` (Cirrus section)
135+
136+
This step ensures that user data deletion requests are handled correctly for the new application.
137+
138+
1. Open the shredder config and find the existing Cirrus entries.
139+
140+
2. Copy an existing entry and update the application name (e.g. `subplat_cirrus`, `subplat_backend_source`).
141+
142+
3. Determine where the application records user IDs for data deletion requests:
143+
144+
**For client-side applications:**
145+
- Use the standard `client_id` in the `deletion_request` ping
146+
147+
**For server-side applications** (e.g. apps running on FXA infrastructure):
148+
- Standard client IDs do not apply
149+
- Check if the application is using FXA's user ID system
150+
- If yes, use the FXA unhashed source configuration
151+
- If no, work with the application team to confirm where they record user opt-out events, and which ping/field to use
152+
153+
4. If unsure about the deletion request setup, verify with the application team before filing the PR. Do not guess — incorrect shredder config can lead to incomplete data deletion.
154+
155+
5. File a PR in `bigquery-etl`.
156+
- PR title format: `chore(shredder): Add <appname> to Cirrus shredder config`
157+
- Reference the Step 8 Jira ticket from the cloned integration epic
158+
159+
## Summary Checklist
160+
161+
**Pre-requisites**
162+
- [ ] Application added to `constants.py` and `apps.yaml` in Experimenter
163+
- [ ] FML files generated
164+
165+
**Step 1**
166+
- [ ] Application added to Cirrus Helm chart (`values-stage.yaml` + `values-prod.yaml`)
167+
- [ ] PR filed in `webservices-infra`
168+
169+
**Step 2**
170+
- [ ] (Optional) Tenant resource limits increased if needed
171+
172+
**Step 3**
173+
- [ ] Application added to Probe Scraper (Data Org ticket + Glean bug filed)
174+
- [ ] `app_name` ends with `_cirrus`, depends on `glean-server` + `nimbus-cirrus`
175+
176+
**Step 4**
177+
- [ ] FML synced to Experimenter
178+
- [ ] Nimbus team notified in `#ask-experimenter`
179+
180+
**Step 5**
181+
- [ ] Application and features visible in Experimenter UI
182+
183+
**Step 6**
184+
- [ ] `CIRRUS_REMOTE_SETTING_REFRESH_RATE_IN_SECONDS` set
185+
- [ ] `CIRRUS_GLEAN_MAX_EVENTS_BUFFER` set (`1` stage / `100` prod)
186+
- [ ] `app_id` and `app_name` match across Probe Scraper, Experimenter, and Helm chart
187+
188+
**Step 7**
189+
- [ ] A/A test launched and enrollment data validated in STMO
190+
- [ ] Branch sizes match configured distribution
191+
192+
**Step 8**
193+
- [ ] Application added to Cirrus shredder config
194+
- [ ] Deletion request source confirmed with application team
195+
- [ ] PR filed in `bigquery-etl`

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ module.exports = {
120120
type: "category",
121121
label: "Web (Cirrus)",
122122
items: [
123-
"platform-guides/web/web-integration"
123+
"platform-guides/web/web-integration",
124+
"platform-guides/web/onboarding-application-cirrus"
124125
]
125126
},
126127
{

0 commit comments

Comments
 (0)