Update Fleet server configuration docs (#21283)

- Osquery configuration isn't server config
- Condense top section by removing examples
This commit is contained in:
Noah Talerman
2024-08-13 13:56:04 -07:00
committed by GitHub
parent 87f21b018f
commit e9b2217ae8
@@ -4,6 +4,8 @@ Fleet server configuration options update the internals of the Fleet server (MyS
Only self-managed users and customers can modify this configuration. If you're a managed-cloud customer, please reach out to Fleet about modifying the configuration.
## Configuration options
You can specify configuration options in the following formats:
1. YAML file
@@ -12,58 +14,6 @@ You can specify configuration options in the following formats:
All duration-based settings accept valid time units of `s`, `m`, `h`.
## YAML file
```sh
echo '
mysql:
address: 127.0.0.1:3306
database: fleet
username: root
password: toor
redis:
address: 127.0.0.1:6379
server:
cert: /tmp/server.cert
key: /tmp/server.key
logging:
json: true
' > /tmp/fleet.yml
fleet serve --config /tmp/fleet.yml
```
## Environment variables
```sh
FLEET_MYSQL_ADDRESS=127.0.0.1:3306 \
FLEET_MYSQL_DATABASE=fleet \
FLEET_MYSQL_USERNAME=root \
FLEET_MYSQL_PASSWORD=toor \
FLEET_REDIS_ADDRESS=127.0.0.1:6379 \
FLEET_SERVER_CERT=/tmp/server.cert \
FLEET_SERVER_KEY=/tmp/server.key \
FLEET_LOGGING_JSON=true \
/usr/bin/fleet serve
```
## Command-line flags
```sh
/usr/bin/fleet serve \
--mysql_address=127.0.0.1:3306 \
--mysql_database=fleet \
--mysql_username=root \
--mysql_password=toor \
--redis_address=127.0.0.1:6379 \
--server_cert=/tmp/server.cert \
--server_key=/tmp/server.key \
--logging_json
```
## Configuration options
#### MySQL
This section describes the configuration options for the primary. Suppose you also want to set up a read replica. In that case the options are the same, except that the YAML section is `mysql_read_replica`, and the flags have the `mysql_read_replica_` prefix instead of `mysql_` (the corresponding environment variables follow the same transformation). Note that there is no default value for `mysql_read_replica_address`, it must be set explicitly for Fleet to use a read replica, and it is recommended in that case to set a non-zero value for `mysql_read_replica_conn_max_lifetime` as in some environments, the replica's address may dynamically change to point
@@ -2891,7 +2841,7 @@ packaging:
region: us-east-1
```
## Mobile device management (MDM)
#### Mobile device management (MDM)
> The [`server_private_key` configuration option](#server_private_key) is required for macOS MDM features.
@@ -2962,11 +2912,6 @@ The content of the Windows WSTEP identity key. An RSA private key, PEM-encoded.
-----END RSA PRIVATE KEY-----
```
## Managing osquery configurations
We recommend that you use an infrastructure configuration management tool to manage these osquery configurations consistently across your environment. If you're unsure about what configuration management tools your organization uses, contact your company's system administrators. If you are evaluating new solutions for this problem, the founders of Fleet have successfully managed configurations in large production environments using [Chef](https://www.chef.io/chef/) and [Puppet](https://puppet.com/).
<h2 id="running-with-systemd">Running with systemd</h2>
This content was moved to [Systemd](http://fleetdm.com/docs/deploy/system-d) on Sept 6th, 2023.