Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep a long term storage of all binaries and artifacts created by Fleet #19182

Closed
1 of 8 tasks
sharon-fdm opened this issue May 21, 2024 · 9 comments
Closed
1 of 8 tasks
Assignees
Labels
~engineering-initiated Engineering-initiated story, such as a bug, refactor, or contributor experience improvement. #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. story A user story defining an entire feature
Milestone

Comments

@sharon-fdm
Copy link
Collaborator

sharon-fdm commented May 21, 2024

Goal

User story
As a Fleet engineer,
I want to keep all versions of all our binary files
so that I can use a specific binary in case I need it.

Context

  • Requestor(s): Engineering
  • Product designer: _________________________

Unlike code that could be tagged and retracted with specific exact versions, binaries could not be recompiled to have the exact same file with same signature because of many reason (e.g. using different compilers).
For the reason described below and many others, it is needed to store for long term, any binary with its version.
Reason: In an incident documented here we used an existing binary with a specific SHA256 signature to remediate a problem. Similar usage may be needed in the future.

Changes

Create a mechanism that will follow our releases and store all binaries in an organized manner.
TODO: The exact organization should be discussed. (Need all files with all their versions.)

Product

  • UI changes: TODO
  • CLI usage changes: TODO
  • REST API changes: TODO
  • Permissions changes: TODO
  • Outdated documentation changes: TODO
  • Changes to paid features or tiers: TODO

QA

Make sure the new mechanism works on all our binaries. The new fleetd-base release mechanism stores files in new directories (stable and archive), so we do not need to worry about being backward compatible with current/old Fleet server.

Risk assessment

  • Risk level: Low to none.
  • Risk description: The created mechanism should have minimal load effect and should probably not have risk to override existing files.

Manual testing steps

  1. Use the fleetd-base installers from:
  1. Make sure they work on Windows/macOS.

Testing notes

Confirmation

  1. Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. QA (@getvictor): Added comment to user story confirming successful completion of QA.
@sharon-fdm sharon-fdm added #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. story A user story defining an entire feature ~engineering-initiated Engineering-initiated story, such as a bug, refactor, or contributor experience improvement. :product Product Design department (shows up on 🦢 Drafting board) and removed :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels May 21, 2024
@lucasmrod
Copy link
Member

From the estimation call the following need to be addressed:

  • fleetd-base.msi
  • fleetd-base.pkg
  • fleetd-chrome

Idea: Use a directory with version name to keep historical data (because R2 does not have versioning).

@sharon-fdm sharon-fdm added :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. and removed :product Product Design department (shows up on 🦢 Drafting board) labels Jun 3, 2024
@sharon-fdm sharon-fdm added this to the 4.52.0-tentative milestone Jun 3, 2024
@noahtalerman noahtalerman changed the title Keep a long term storage of all binaries and artifacts created by FleetDM Keep a long term storage of all binaries and artifacts created by Fleet Jun 3, 2024
@roperzh
Copy link
Contributor

roperzh commented Jun 6, 2024

@getvictor as discussed in Slack, here is (high level) what we would need on the MDM side:

  1. Some way to know what's the latest released version (eg: having a /stable/ folder? or a json/xml metadata file)
  2. Some way to grab the latest checksum for Windows
  3. Keep the old path https://downloads.fleetdm.com/fleetd-base.msi for backwards compatibility

@roperzh
Copy link
Contributor

roperzh commented Jun 6, 2024

over-communicating: I have marked this as a blocker for #19176

getvictor added a commit that referenced this issue Jun 17, 2024
#19182 and #19111

- Upload and keep all fleetd-base and fleetd-chrome artifacts
- Code sign fleetd-base.msi
- Verify checksums and try installing fleetd-base packages

These changes will apply the fleet-base workflow to
download-testing.fleetdm.com, and another PR will change to the
production endpoint (download.fleetdm.com) after QA.

## fleetd-base
Successful fleetd-base workflow run:
https://github.com/fleetdm/fleet/actions/runs/9522282299

New meta files will be in the `stable` directory:
- https://download-testing.fleetdm.com/stable/meta.json
- https://download-testing.fleetdm.com/stable/tuf-meta.json

The files in the root directory will no longer be updated for backward
compatibility.

## fleetd-chrome
Successful fleetd-chrome beta run:
https://github.com/fleetdm/fleet/actions/runs/9552391075/job/26328861033
@getvictor
Copy link
Member

@roperzh The updated workflow #19749 will be updating files at https://download-testing.fleetdm.com

Once this workflow is QAd, I will do another PR to switch it to https://download.fleetdm.com

@lukeheath lukeheath modified the milestones: 4.53.0, 4.54.0-tentative Jun 26, 2024
@roperzh
Copy link
Contributor

roperzh commented Jun 28, 2024

@xpkoala I used https://download-testing.fleetdm.com/ for the work at #20078 and can confirm that's working great.

Any way I can help you get this through ready to release?

@xpkoala
Copy link
Contributor

xpkoala commented Jun 28, 2024

@roperzh Nope! I was working on this with Victor yesterday and I just failed to move it over. I appreciate the extra eyes!

@roperzh
Copy link
Contributor

roperzh commented Jun 28, 2024

Thanks! @getvictor as soon as you update https://download.fleetdm.com I will merge #20078

@getvictor
Copy link
Member

@roperzh Please approve #20093

I already run the flow, so you can see the files at: https://download.fleetdm.com/stable/meta.json

getvictor added a commit that referenced this issue Jun 28, 2024
#19182
Releasing new fleetd-base flow
- The flow has been QA'd
- The flow puts the generated files into new directories (`stable` and
`archive`), so risk is low
@fleet-release
Copy link
Contributor

Binaries stored, like seeds,
In glass city's memory,
Ensure Fleet's smooth deeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~engineering-initiated Engineering-initiated story, such as a bug, refactor, or contributor experience improvement. #g-endpoint-ops Endpoint ops product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. story A user story defining an entire feature
Development

No branches or pull requests

7 participants