2020-12-24 22:33:03 +00:00
# Releasing Fleet
2019-11-17 22:09:48 +00:00
2022-06-01 16:53:51 +00:00
## Release process
This section outlines the release process at Fleet.
2022-06-02 18:12:58 +00:00
The current release cadence is once every three weeks and concentrates around Wednesdays.
2022-06-01 16:53:51 +00:00
2022-10-04 17:15:02 +00:00
### Release testing
2022-06-01 16:53:51 +00:00
2022-10-04 17:15:02 +00:00
To make sure we build quality releases, Fleet has a freeze period for testing prior to each release.
Effective at the start of the freeze period, we will not merge new feature work.
2022-06-01 16:53:51 +00:00
2022-10-12 21:25:01 +00:00
When bugs are found during release testing, use the process documented in [our handbook ](https://fleetdm.com/handbook/quality#release-testing ).
2022-10-04 17:15:02 +00:00
Release bugs are exempt from the freeze period.
2022-06-01 16:53:51 +00:00
### What to do?
2022-06-02 18:12:58 +00:00
Note: Please prefix versions with `fleet-v` (e.g., `fleet-v4.0.0` ) in git tags, Helm charts, and NPM configs.
2021-06-11 00:08:43 +00:00
2022-06-02 18:12:58 +00:00
1. Update the [CHANGELOG ](https://github.com/fleetdm/fleet/blob/main/CHANGELOG.md ) with the changes you made since the last
2021-08-25 22:14:24 +00:00
Fleet release. Use `make changelog` to pull the changes files into `CHANGELOG.md` , then manually
2022-06-02 18:12:58 +00:00
edit. When editing, order the most relevant/important changes at the time and try to make the
tone and syntax of the written language match throughout the document. `make changelog` will stage all changes
2021-08-25 22:14:24 +00:00
file entries for deletion with the commit.
2021-02-04 17:09:39 +00:00
2022-02-24 22:56:35 +00:00
Add a "Performance" section below the list of changes. This section should summarize the number of
hosts that the Fleet server can handle, call out if this number has
changed since the last release, and list the infrastructure used in the load testing environment.
2022-01-26 19:33:39 +00:00
2022-02-24 22:56:35 +00:00
Update version numbers in the relevant files:
2022-02-14 02:13:06 +00:00
2022-04-18 18:41:14 +00:00
- [fleetctl package.json ](https://github.com/fleetdm/fleet/blob/main/tools/fleetctl-npm/package.json ) (do not yet `npm publish` )
- [Helm chart.yaml ](https://github.com/fleetdm/fleet/blob/main/charts/fleet/Chart.yaml ) and [values file ](https://github.com/fleetdm/fleet/blob/main/charts/fleet/values.yaml )
- Terraform variables ([AWS](https://github.com/fleetdm/fleet/blob/main/infrastructure/dogfood/terraform/aws/variables.tf)/[GCP](https://github.com/fleetdm/fleet/blob/main/infrastructure/dogfood/terraform/gcp/variables.tf))
2022-05-09 16:05:11 +00:00
- [Kubernetes `deployment.yml` example file ](https://github.com/fleetdm/fleet/blob/main/docs/Deploying/Server-Installation.md#deploying-fleet-on-kubernetes )
2021-08-25 22:14:24 +00:00
2022-02-24 22:56:35 +00:00
Commit these changes via Pull Request and pull the changes on the `main` branch locally. Check that
`HEAD` of the `main` branch points to the commit with these changes.
2019-11-17 22:09:48 +00:00
2. Tag and push the new release in Git:
2022-02-24 22:56:35 +00:00
```sh
git tag fleet-v< VERSION >
git push origin fleet-v< VERSION >
```
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
Note that `origin` may be `upstream` depending on your `git remote` configuration. The intent here
is to push the new tag to the `github.com/fleetdm/fleet` repository.
2021-06-11 00:08:43 +00:00
2022-08-24 19:20:54 +00:00
After the tag is pushed, GitHub Actions will automatically begin building the new release.
2019-11-17 22:09:48 +00:00
2022-04-18 18:41:14 +00:00
** *
2021-06-26 01:40:26 +00:00
2022-06-02 18:12:58 +00:00
Wait while GitHub Actions creates and uploads the artifacts.
2019-11-17 22:09:48 +00:00
2022-04-18 18:41:14 +00:00
** *
2020-11-13 02:03:01 +00:00
2022-06-02 18:12:58 +00:00
When the Actions Workflow has been completed:
2021-06-26 01:40:26 +00:00
2021-08-25 22:14:24 +00:00
3. Edit the draft release on the [GitHub releases page ](https://github.com/fleetdm/fleet/releases ).
Use the version number as the release title. Use the below template for the release description
(replace items in < > with the appropriate values):
2022-07-27 21:55:06 +00:00
```
2022-02-24 22:56:35 +00:00
### Changes
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
< COPY FROM CHANGELOG >
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
### Upgrading
2019-11-17 22:09:48 +00:00
2022-03-10 19:13:48 +00:00
Please visit our [update guide ](https://fleetdm.com/docs/deploying/upgrading-fleet ) for upgrade instructions.
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
### Documentation
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
Documentation for Fleet is available at [fleetdm.com/docs ](https://fleetdm.com/docs ).
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
### Binary Checksum
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
**SHA256**
2022-07-27 21:55:06 +00:00
2022-02-24 22:56:35 +00:00
< COPY FROM checksums . txt >
```
2019-11-17 22:09:48 +00:00
2022-02-24 22:56:35 +00:00
When editing is complete, publish the release.
2019-11-17 22:09:48 +00:00
2021-08-25 22:14:24 +00:00
4. Publish the new version of `fleetctl` on NPM. Run `npm publish` in the
2022-03-04 18:29:12 +00:00
[fleetctl-npm ](https://github.com/fleetdm/fleet/tree/main/tools/fleetctl-npm ) directory. Note that NPM does not allow replacing a
2021-08-25 22:14:24 +00:00
package without creating a new version number. Take care to get things correct before running
`npm publish` !
2019-11-17 22:09:48 +00:00
2021-08-25 22:14:24 +00:00
> If releasing a "prerelease" of Fleet, run `npm publish --tag prerelease`. This way, you can
> publish a prerelease of fleetctl while the most recent fleetctl npm package, available for public
2022-02-14 02:13:06 +00:00
> download, is still the latest _official_ release.
2021-06-28 17:58:33 +00:00
2022-10-13 15:32:01 +00:00
5. Deploy the new version to Fleet's internal dogfood instance: https://fleetdm.com/handbook/engineering#deploying-to-dogfood.
2023-02-21 12:11:50 +00:00
6. In the #g -customer-experience Slack channel, notify the @infrastructure -oncall of the release. This way, the @infrastructure -oncall individual can deploy the new version.
2022-10-13 15:32:01 +00:00
7. Announce the release in the #fleet channel of [osquery
2022-03-04 21:51:11 +00:00
Slack](https://fleetdm.com/slack) and
2021-08-25 22:14:24 +00:00
update the channel's topic with the link to this release. Using `@here` requires admin
permissions, so typically this announcement will be done by `@zwass` .
2021-02-04 17:09:39 +00:00
2022-02-24 22:56:35 +00:00
Announce the release via blog post (on Medium) and Twitter (linking to blog post).
2021-11-09 02:17:42 +00:00
2022-06-01 16:53:51 +00:00
### Patch releases
2021-11-09 02:17:42 +00:00
2022-10-12 21:25:01 +00:00
A patch release is required when a critical bug is found. Critical bugs are defined in [our handbook ](https://fleetdm.com/handbook/quality#critical-bugs ).
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
#### Process
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
1. The DRI for release testing/QA notifies the [directly responsible individual (DRI) for creating the patch release branch ](https://fleetdm.com/handbook/engineering#rituals ) to create the new branch, starting from the git tag of the prior release. Patch branches should be prefixed with `patch-` . In this example we are creating `4.3.1` :
2021-11-09 02:17:42 +00:00
```
git checkout fleet-v4.3.0
git checkout --branch patch-fleet-v4.3.1
```
2022-08-04 16:23:19 +00:00
2. The DRI for creating the patch release branch cherry picks the necessary commits into the new branch:
2021-11-09 02:17:42 +00:00
```
git cherry-pick d34db33f
```
2022-08-04 16:23:19 +00:00
3. The DRI for creating the patch release branch pushes the branch to github.com/fleetdm/fleet:
2021-11-09 02:17:42 +00:00
```
git push origin patch-fleet-v4.3.1
```
When a `patch-*` branch is pushed, the [Docker publish
Action](https://github.com/fleetdm/fleet/actions/workflows/goreleaser-snapshot-fleet.yaml) will
2022-02-14 02:13:06 +00:00
be invoked to push a container image for QA with `fleetctl preview` (eg. `fleetctl preview --tag patch-fleet-v4.3.1` ).
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
4. The DRI for creating the patch release branch checks in the GitHub UI that Actions ran successfully for this branch.
5. The DRI for creating the patch release branch notifies the [DRI for release testing/QA ](https://fleetdm.com/handbook/product#rituals ) that the branch is available for completing [smoke tests ](https://github.com/fleetdm/fleet/blob/main/.github/ISSUE_TEMPLATE/smoke-tests.md ).
6. The DRI for release testing/QA makes sure the standard release instructions at the top of this document are followed. Be sure that modifications to the changelog and config files are commited _on the `patch-*` branch_ .
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
7. The DRI for release testing/QA notifies the [DRI for the release ritual ](https://fleetdm.com/handbook/engineering#rituals ) that the patch release is ready. The DRI for the release ritual releases the patch.
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
8. The DRI for creating the patch release branch cherry-picks the commit containing the changelog updates into a new branch, and merges that commit into `main` through a Pull Request.
2021-11-09 02:17:42 +00:00
2022-08-04 16:23:19 +00:00
9. **Important!** The DRI for creating the patch release branch manually checks the database migrations. Any migrations that are not cherry-picked in a patch must have a _later_ timestamp than migrations that were cherry-picked. If there are new migrations that were not cherry-picked, verify that those migrations have later timestamps. If they do not, submit a new Pull Request to increase the timestamps and ensure that migrations are run in the appropriate order.
2021-11-09 02:17:42 +00:00
2022-02-14 02:13:06 +00:00
TODO [#2850 ](https://github.com/fleetdm/fleet/issues/2850 ): Improve docs/tooling for this.
2022-02-23 18:17:55 +00:00
< meta name = "pageOrderInSection" value = "500" >