Skip to content

Commit

Permalink
fix(glam): update docs (#3018)
Browse files Browse the repository at this point in the history
  • Loading branch information
edugfilho authored Jan 23, 2025
1 parent 79a1799 commit 0596948
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 46 deletions.
45 changes: 21 additions & 24 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,33 @@

GLAM has a 3-stage deployment:

1. **Dev**: Deployments to the development server happen automatically for all
1. **Dev**: Deployments to the development environment happen automatically for all
commits that land on the `main` branch
2. **Stage**: Deployments to the staging server happen automatically for tags of
the [CalVer](http://calver.org/) format `YYYY.MM.N` where `N` is a zero-based
counter for the number of tags during the month
3. **Production**: File a Jira ticket with the label GLAM in Data SRE board to
deploy to production. See example ticket:
https://mozilla-hub.atlassian.net/browse/DSRE-8
2. **Stage**: Deployments to the staging environment happen automatically for tags of
the [SemVer](http://semver.org/) format `vYYYY.MM-rcN` where `N` is a zero-based
counter for the number of tags during the month. e.g.: `v2025.01-rc0` means this
is the first release candidate of Jan 2025.
3. **Production**: Deployments to the production environment happen automatically for
tags of the [SemVer](http://semver.org/) format `vYYYY.MM.N` where `N` is a zero-based
counter for the number of tags during the month. e.g.: `v2025-01.0` means this
is the first release of Jan 2025.

Notice that the `N` in Production tags is not necessarily the same
as in the Stage tags, as there might be, for example, five release candidates
and in a month and only one relese, which would make their latest tags `2025.01-rc4`
and `2025.01.0`, respectively.

## Tagging for release

The steps for tagging a release for the staging server are as follows:

1. Ensure that the development server is working as intended
2. Update the `CHANGELOG.md` file:

- Update any changelog entries based on git history:
- View git history since the last tag either by using compare link or via git
locally:
- `git log $(git describe --tags --abbrev=0)..HEAD --oneline`
- Copy/paste the "unreleased" header for editing, leaving an unreleased header
for future updates
- Update the pasted "unreleased" header with the following:
- Add the appropriate tag name
- Update the Github compare link replacing "HEAD" with the tag being created
- Include the date that the tag was created
- Update the top "unreleased" header to compare from tag being made to HEAD

3. Tag a release locally in git via: `git tag <tag>`
4. Push the tag to github via: `git push origin --tags`
1. Ensure that the development server is working as intended by testing it in dev first
2. Tag a release locally in git via: `git tag <tag>` or use the [github releases functionality]
(https://github.com/mozilla/glam/releases) to create a tag at the same time as a release
4. If you created a tag locally, push the tag to github via: `git push origin --tags` and create a
release from that tag using the [github releases functionality] (https://github.com/mozilla/glam/releases)
5. **Important** make sure to generate release notes.
6. Ask someone or follow the pattern in the most recent releases on the repo in case of doubt :)

## Logs

Expand Down
28 changes: 6 additions & 22 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ https://github.com/mozilla/glam

To install a local copy of GLAM, you need:

- [Python](https://www.python.org/) (version 3.8+)
- [node.js](https://nodejs.org/) (version 12+)
- [Python](https://www.python.org/) (version 3.9+)
- [node.js](https://nodejs.org/) (version 22+)
- [npm](https://docs.npmjs.com/cli/v7/commands/npm) (v7+): run
`npm install -g npm@latest` to upgrade to the latest npm
- [Docker](https://www.docker.com/): GLAM uses Docker for local development and
Expand Down Expand Up @@ -58,7 +58,8 @@ To gather the probe data that populates the probe API, run the following:
./manage.py import_probes
```

The next step requires viewer permissions in the non-prod GCP project, please
## Starting the server
This step requires read permissions in the prod GCP project, please
reach out to someone on the <a
href="https://mozilla.slack.com/archives/CB1EQ437S">#glam</a
> channel on Mozilla's internal Slack, or
Expand All @@ -72,23 +73,6 @@ reauthenticate via
gcloud auth application-default login
```

Then, populate the aggregation tables with data from desktop Firefox:

```bash
./manage.py import_desktop_aggs <CHANNEL>
```

where `CHANNEL` is one of `nightly`, `beta`, or `release`.

You can also import data from a custom bucket using the bucket argument.
Remember to set the project accordingly:

```
gcloud auth login --update-adc
```

## Starting the server

To start the application, run:

```
Expand All @@ -97,14 +81,14 @@ make up

This will launch 2 servers:

- http://localhost:3000 is an nginx server configured to authenticate via
- http://localhost:3000 is an nginx server configured to authenticate select endpoints via
Mozilla's auth0 backend and will proxy GLAM.
- http://localhost:8000 is the Django server that contains the API endpoints and
serves up the front-end HTML and static assets.

See below for building the front-end Javascript and other static assets.

With these servers running you can, e.g., query the data via `curl`:
With these servers running you can access GLAM on http://localhost:8000 or query the data via `curl`:

```
curl -s -X POST -H "Content-Type: application/json" http://localhost:8000/api/v1/data/ -d '{"query": {"channel": "nightly", "versions": ["70"], "probe": "gc_ms", "aggregationLevel": "version"}}' | python -m json.tool
Expand Down

0 comments on commit 0596948

Please sign in to comment.