mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Make fleetctl preview available over HTTP (#508)
Make fleetctl preview available over HTTP Run a second copy of the Fleet server listening over HTTP on localhost:1337 so that the UI can be used without the errors displayed with a self-signed TLS certificate. Osquery clients and fleetctl continue to communicate with the existing Fleet server on https://localhost:8412. Closes #504 Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
This commit is contained in:
parent
7f43472431
commit
b4f0f461c2
@ -18,9 +18,7 @@ npm install -g fleetctl
|
||||
sudo fleetctl preview
|
||||
```
|
||||
|
||||
A local demo copy of the Fleet server is now running at https://localhost:8412.
|
||||
|
||||
> **Seeing a warning in your browser?** You can safely skirt the browser warning ("Your connection is not private") when accessing Fleet locally over https. For example in Google Chrome, visit `chrome://flags/#allow-insecure-localhost` to enable self-signed certs on localhost. Then [refresh Fleet](https://localhost:8412) and click through this warning using the "Advanced" option.
|
||||
The Fleet UI is now available at http://localhost:1337.
|
||||
|
||||
#### Your first query
|
||||
Ready to run your first query? Target some of your sample hosts and try it out:
|
||||
|
@ -67,7 +67,7 @@ Use the stop and reset subcommands to manage the server and dependencies once st
|
||||
}
|
||||
|
||||
fmt.Println("Pulling Docker dependencies...")
|
||||
out, err := exec.Command("docker-compose", "pull", "mysql01", "redis01", "fleet01").CombinedOutput()
|
||||
out, err := exec.Command("docker-compose", "pull").CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Println(string(out))
|
||||
return errors.Errorf("Failed to run docker-compose")
|
||||
@ -85,6 +85,15 @@ Use the stop and reset subcommands to manage the server and dependencies once st
|
||||
return errors.Wrap(err, "wait for server startup")
|
||||
}
|
||||
|
||||
// Start fleet02 (UI server) after fleet01 (agent/fleetctl server)
|
||||
// has finished starting up so that there is no conflict with
|
||||
// running database migrations.
|
||||
out, err = exec.Command("docker-compose", "up", "-d", "--remove-orphans", "fleet02").CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Println(string(out))
|
||||
return errors.Errorf("Failed to run docker-compose")
|
||||
}
|
||||
|
||||
fmt.Println("Initializing server...")
|
||||
const (
|
||||
address = "https://localhost:8412"
|
||||
@ -133,10 +142,9 @@ Use the stop and reset subcommands to manage the server and dependencies once st
|
||||
return errors.Wrap(err, "Error writing fleetctl configuration")
|
||||
}
|
||||
|
||||
fmt.Println("Fleet is now available at https://localhost:8412.")
|
||||
fmt.Println("Fleet UI is now available at http://localhost:1337.")
|
||||
fmt.Println("Username:", username)
|
||||
fmt.Println("Password:", password)
|
||||
fmt.Println("Note: You can safely ignore the browser warning \"Your connection is not private\". Click through this warning using the \"Advanced\" option. Chrome users may need to configure chrome://flags/#allow-insecure-localhost.")
|
||||
|
||||
// Create client and get enroll secret
|
||||
client, err := unauthenticatedClientFromCLI(c)
|
||||
|
Loading…
Reference in New Issue
Block a user