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

Add fdm serve / up command to easily start local Fleet development server #27889

Open
sgress454 opened this issue Apr 4, 2025 · 0 comments
Open
Assignees
Labels
~engineering-initiated Engineering-initiated story, such as a bug, refactor, or contributor experience improvement.

Comments

@sgress454
Copy link
Contributor

Goal

User story
As a Fleet developer,
I want to be able to quickly start a Fleet development server
so that I can do my work without having to hunt for the right commands to type

Currently developers hunt through command history or saved notes to get the command to start the Fleet server, or else memorize long command strings. They should be able to just do fdm up to build and start the server quickly.

@sgress454 sgress454 added the ~engineering-initiated Engineering-initiated story, such as a bug, refactor, or contributor experience improvement. label Apr 4, 2025
@sgress454 sgress454 self-assigned this Apr 4, 2025
sgress454 added a commit that referenced this issue Apr 7, 2025
For #27889 

This PR introduces several improvements to the Makefile/`fdm` tool for
development:
 
### `fdm serve` (alias `fdm up`)

Starts a local Fleet server (building the binary first). The first time
this is called, it will start the server on `localhost:8080` with the
`--dev` and `--dev_license` flags, but the command accepts all of the
options that you can pass to `fleet serve`. If you pass options to `fdm
serve`, then subsequent invocations _without_ options will replay your
last command. Additionally, `fdm serve` supports the following:

- `--use-ip`: start the local server on your system's local IP address
rather than `localhost`. This makes it easier to point VMs on your
system to the fleet server to act as hosts.
- `--no-build`: don't rebuild the fleet binary before starting the
server.
- `--no-save`: don't save the current command for future invocations
(useful for scripting)
- `--show`: show options for the last-invoked `fdm serve` command
- `--reset`: reset the options for `fdm serve`. The next time `fdm
serve` is invoked, it will use the default options.
- `--help`: show all of the Fleet server options

### `fdm snapshot` improvements

* Added `fdm snap` alias
* Tracks the name of the last snapshot saved, to use as the default for
`fdm restore`
* Suppresses the "don't use password in CLI" warning when saving the
snapshot

### `fdm restore` improvements

* Added `--prep` / `--prepare` option to run db migrations after
restoring snapshot.
* Improved UI (more options displayed, and clearer indicator for
selected option)
* Now defaults to last snapshot restored
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.
Projects
None yet
Development

No branches or pull requests

1 participant