Skip to content

Commit 2c840d1

Browse files
authored
Merge pull request #5964 from mozilla/MPP-4425/remove-heroku
Remove heroku references and code paths (MPP-4425)
2 parents 1a9c690 + f7c214a commit 2c840d1

18 files changed

+4419
-6160
lines changed

.buildpacks

Lines changed: 0 additions & 2 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@
44
# DOCKER_USER - login info for docker hub
55
# DOCKER_PASS
66
# COVERALLS_REPO_TOKEN - used by coveralls-python
7-
# HEROKU_APP_NAME - Name on Heroku
8-
# HEROKU_API_KEY - API key from service account
97
#
108
version: 2.1
119
orbs:
1210
# https://circleci.com/developer/orbs/orb/circleci/node
1311
node: circleci/[email protected]
1412
# https://circleci.com/developer/orbs/orb/circleci/python
1513
python: circleci/[email protected]
16-
# https://circleci.com/developer/orbs/orb/circleci/heroku
17-
heroku: circleci/[email protected]
1814

1915
executors:
2016
# Using executors so most of the version information is here
@@ -385,13 +381,6 @@ jobs:
385381
docker push "${DOCKERHUB_REPO}:${CIRCLE_TAG}"
386382
fi
387383
388-
heroku_deploy:
389-
executor: heroku/default
390-
steps:
391-
- checkout
392-
- heroku/install
393-
- heroku/deploy-via-git
394-
395384
# python_job is a generic job for Python and Django tests
396385
# It avoids duplicating code and forgetting to duplicate fixes
397386
# It uses functions defined in python_job.bash
@@ -739,10 +728,3 @@ workflows:
739728
ignore: /addon-.*/
740729
branches:
741730
only: main
742-
743-
- heroku_deploy:
744-
requires:
745-
- build_test_backend
746-
filters:
747-
branches:
748-
only: main

Procfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/adr/0003-decouple-welcome-email-from-new-user-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Proceeded with **Option 3. Implement cron job to send welcome email** because it
6060

6161
### Option 3: Implement cron job to send welcome email
6262

63-
Relay already has [many scheduled jobs](https://dashboard.heroku.com/apps/fx-private-relay/scheduler) setup to handle asynchronous work ranging from maintaining old data to renewing monthly phone limits for users.
63+
Relay already has many scheduled jobs setup to handle asynchronous work ranging from maintaining old data to renewing monthly phone limits for users.
6464

6565
- Good, because Relay can reuse code to send welcome email if or when we move to Option 1 using Redis Queue.
6666
- Good, because this option is inline with how we used scheduled jobs and is the lowest complexity to implement.

docs/img/structurizr-1-RelayDevelopmentDeployment-key.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/img/structurizr-1-RelayDevelopmentDeployment.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/profiler.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This doc describes how we profile Relay code.
44

5+
**TODO** [MPP-4441][]: Update instructions for MozCloud
6+
7+
[MPP-4441]: https://mozilla-hub.atlassian.net/browse/MPP-4441
8+
59
## Google Cloud Profiler
610

711
We use Google Cloud Profiler: https://cloud.google.com/profiler/docs/about-profiler
@@ -26,17 +30,13 @@ These are the high-level steps to set up Google Cloud Profiler in Relay.
2630

2731
#### Dev server
2832

29-
The dev server should already have profiling set up. If it does not:
30-
31-
1. Get the Base64-encoded JSON key from another Relay ENGR
32-
2. Use `heroku config:set` to set the `GOOGLE_CLOUD_PROFILER_CREDENTIALS_B64`
33-
environment variable value to the Base64-encoded JSON key.
34-
3. Use `heroku config:set` to set the `GOOGLE_APPLICATION_CREDENTIALS`
35-
environment variable value to `gcp_key.json`
33+
Up until October 2025, the dev server ran in Heroku and had profiling enabled. In October
34+
2025, the dev server moved to MozCloud, a GCP-based environment. Additional work is needed
35+
to enable profiling in MozCloud.
3636

37-
#### Stage & Prod
37+
#### Stage and Prod
3838

39-
The stage & prod servers should already have profiling set up. If they do not:
39+
The traditional GCP-based servers should already have profiling set up. If they do not:
4040

4141
1. Have SRE set the `GOOGLE_CLOUD_PROFILER_CREDENTIALS_B64` environment variable value
4242
to the corresponding Base64-encoded JSON key with `roles/cloudprofiler.agent`

docs/release_process.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- [Production][prod] - Run by SRE team in GCP
66
- [Stage][stage] - Run by SRE team in GCP
7-
- [Dev][dev] - Run by ENGR team in Heroku
7+
- [Dev][dev] - Run by ENGR team in MozCloud
88
- Locals: Run by ENGRs on their own devices. (See [README][readme] and other [`docs/`][docs].)
99

1010
## Code branches
@@ -65,23 +65,11 @@ environment. To do this, we first release code to [Dev][dev] and
6565

6666
## Release to Dev
6767

68-
Every commit to `main` is automatically deployed to the [Dev][dev] server, as
69-
long as it can be done with a fast-forward push. Since the
70-
[Great GitHub Heroku Incident of 2022][github-heroku-incident], this is
71-
done from CircleCI using a [service account][service-account].
68+
Every commit to `main` is automatically deployed to the [Dev][dev] server.
7269

73-
To push a different branch, you need to add the Heroku app as a remote:
70+
**TODO** [MPP-4443][]: Add instructions for pushing an alternate branch in MozCloud.
7471

75-
- `heroku login`
76-
- `heroku git:remote -a fx-private-relay`
77-
78-
Then, you can push your local unmerged branch to Heroku:
79-
80-
- `git push -f heroku change-1:main`
81-
82-
Merges to main will fail to deploy until someone manually resets it to `main`:
83-
84-
- `git push -f heroku main`
72+
[MPP-4443]: https://mozilla-hub.atlassian.net/browse/MPP-4443
8573

8674
## Release to Stage
8775

@@ -136,7 +124,7 @@ After you push the tag to GitHub, you should also
136124
5. Edit the generated notes to add a planned release summary and organize PRs
137125
into sections, such as:
138126

139-
```
127+
```text
140128
Planned for release to relay.firefox.com on August 9th, 2022.
141129
142130
## User-facing changes
@@ -167,7 +155,8 @@ On Monday, after the Release Readiness Review:
167155
1. File an [SRE ticket][sre-form] to deploy the tag to [Prod][prod].
168156
- Include a link to the GitHub Release
169157
2. On the GitHub release, update the summary with a reference to the ticket:
170-
```
158+
159+
```text
171160
Planned for release to relay.firefox.com on August 9th, 2022 with SVCSE-1385.
172161
```
173162

@@ -181,10 +170,13 @@ On Tuesday:
181170
- Check [grafana dashboard](https://earthangel-b40313e5.influxcloud.net/d/qiwPC76Zk/fx-private-relay?orgId=1&refresh=1m&from=now-1h&to=now) for any unexpected spike in ops
182171
- (optional) [Run end-to-end tests](https://github.com/mozilla/fx-private-relay/actions/workflows/playwright.yml) on prod (Note: as of 2023-07-12 these are known-broken. 😢)
183172
3. Update the GitHub release:
173+
184174
- Update the summary:
185-
```
175+
176+
```text
186177
Released to relay.firefox.com on August 9th, 2022 with SVCSE-1385.
187178
```
179+
188180
- De-select "Set as a pre-release",
189181
- Select "Set as the latest release"
190182
- Click "Update release"
@@ -355,13 +347,12 @@ long-running branches")
355347

356348
[prod]: https://relay.firefox.com/
357349
[stage]: https://stage.fxprivaterelay.nonprod.cloudops.mozgcp.net/
358-
[dev]: https://dev.fxprivaterelay.nonprod.cloudops.mozgcp.net/
350+
[dev]: https://relay-dev.allizom.org/
359351
[readme]: https://github.com/mozilla/fx-private-relay/blob/main/README.md
360352
[docs]: https://github.com/mozilla/fx-private-relay/tree/main/docs
361353
[github-flow]: https://docs.github.com/en/get-started/quickstart/github-flow
362-
[github-heroku-incident]: https://blog.heroku.com/april-2022-incident-review
363-
[service-account]: https://mana.mozilla.org/wiki/display/TS/List+of+Heroku+service+accounts
364354
[calver]: https://calver.org/
365355
[sre-form]: https://mozilla-hub.atlassian.net/jira/software/c/projects/SREIN/form/1344
366356
[github-new-release]: https://github.com/mozilla/fx-private-relay/releases/new
367357
[prod-version]: https://relay.firefox.com/__version__
358+
[feature-flags]: ./feature_flags.md

docs/system_diagrams.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,13 @@ additional services for the deployment environment.
150150

151151
## Development Deployment Diagram
152152

153-
The development deployment is hosted in Heroku and AWS. Deployments are done by Relay
154-
developers, by pushing a branch to Heroku.
153+
Up until October 2025, the development deployment was hosted in Heroku and AWS.
154+
After October 2025, the development deployment is in MozCloud (a Mozilla-managed
155+
GCP environment) and AWS.
155156

156-
The Dev Deployment lacks some of the full Relay System features:
157+
**TODO** MPP-4442: Update diagrams for MozCloud.
157158

158-
- Logs are not forwarded to the data platform
159-
- Metrics are disabled
160-
- Firefox does not integrate with this deployment
161-
- There are no other API users (as far as we know)
162-
163-
[![Development Deployment](./img/structurizr-1-RelayDevelopmentDeployment.svg)](./img/structurizr-1-RelayDevelopmentDeployment.svg)
164-
165-
Key:
166-
![Development_Deployment](./img/structurizr-1-RelayDevelopmentDeployment-key.svg)
159+
[MPP-4442]: https://mozilla-hub.atlassian.net/browse/MPP-4442
167160

168161
## Stage Deployment Diagram
169162

docs/workspace.dsl

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -363,86 +363,6 @@ workspace "${SERVICE_NAME}" "Mozilla's service providing email and phone masks."
363363
c2_periodic_tasks -> metrics "Sends metrics" "UDP"
364364
c2_periodic_tasks -> logs "Emits logs"
365365

366-
dev_deploy = deploymentEnvironment "dev.fxprivaterelay.nonprod.cloudops.mozgcp.net" {
367-
deploymentNode "Dev User Interfaces" {
368-
dev_web = containerInstance web
369-
dev_add_on = containerInstance add_on
370-
}
371-
deploymentNode "Amazon Web Services" {
372-
deploymentNode "us-east-1 region" {
373-
deploymentNode "Amazon SQS" {
374-
dev_sqs_dlq = containerInstance email_dlq_queue
375-
dev_sqs_emails = containerInstance email_queue
376-
}
377-
deploymentNode "Amazon SNS" {
378-
dev_sns_topic = containerInstance email_topic
379-
}
380-
deploymentNode "Amazon SES" {
381-
dev_ses_incoming = containerInstance email_receiver
382-
dev_ses_outgoing = containerInstance email_sender
383-
}
384-
deploymentNode "Amazon S3" {
385-
dev_s3_emails = containerInstance email_object_store
386-
}
387-
deploymentNode "Amazon KMS" {
388-
dev_kms_emails = containerInstance email_key
389-
}
390-
}
391-
}
392-
deploymentNode "Heroku" {
393-
deploymentNode "Dynos" {
394-
deploymentNode "web" {
395-
web_dyno = containerInstance web_app
396-
}
397-
deploymentNode "worker" {
398-
worker_dyno = containerInstance email_processor
399-
}
400-
}
401-
deploymentNode "Heroku Add-Ons" {
402-
deploymentNode "Heroku Data for Redis" {
403-
heroku_cache = containerInstance cache
404-
}
405-
deploymentNode "Heroku Postgres" {
406-
heroku_psql = containerInstance db
407-
}
408-
deploymentNode "Heroku Scheduler" {
409-
heroku_task_cleanup = containerInstance task_cleanup
410-
heroku_task_clean_replies = containerInstance task_clean_replies
411-
heroku_task_sync_phones = containerInstance task_sync_phones
412-
heroku_task_update_phones = containerInstance task_update_phones
413-
heroku_task_welcome = containerInstance task_welcome
414-
heroku_task_dql = containerInstance task_dlq
415-
}
416-
417-
deploymentNode "Papertrail" {
418-
heroku_papertrail = containerInstance logs
419-
}
420-
}
421-
}
422-
deploymentNode "Google Cloud Platform" {
423-
deploymentNode "Cloud Profiler" {
424-
dev_gcprofiler = containerInstance profiler
425-
}
426-
}
427-
deploymentNode accounts.stage.mozaws.net {
428-
dev_accounts = softwareSystemInstance accounts
429-
}
430-
deploymentNode analytics.google.com {
431-
dev_ga = softwareSystemInstance ga
432-
}
433-
deploymentNode mozilla.sentry.io {
434-
dev_sentry = softwareSystemInstance sentry
435-
}
436-
deploymentNode "Stripe" {
437-
dev_stripe = softwareSystemInstance stripe {
438-
description "Development Stripe, with select subscriptions"
439-
}
440-
}
441-
deploymentNode twilio.com {
442-
dev_twilio_phone = containerInstance phone_service
443-
}
444-
}
445-
446366
stage_deploy = deploymentEnvironment "stage.fxprivaterelay.nonprod.cloudops.mozgcp.net" {
447367
deploymentNode "Stage User Interfaces" {
448368
stage_web = containerInstance web
@@ -923,10 +843,6 @@ workspace "${SERVICE_NAME}" "Mozilla's service providing email and phone masks."
923843
email_sender -> user "User receives email"
924844
}
925845

926-
deployment relay dev_deploy "RelayDevelopmentDeployment" {
927-
title "[Deployment] Development"
928-
include *
929-
}
930846
deployment relay stage_deploy "RelayStageDeployment" {
931847
title "[Deployment] Stage"
932848
include *

0 commit comments

Comments
 (0)