docs icon indicating copy to clipboard operation
docs copied to clipboard

Request for Documentation: How to migrate config.json to the database in RHEL7/MySQL

Open matterdoc opened this issue 5 years ago • 3 comments

Mattermost user jason.blais from https://community-release.mattermost.com has requested the following be documented:

@stu.doherty Just confirmed these steps work for migrating config to the DB in RHEL7/MySQL

1. `cd /opt/mattermost`
2. `sudo bin/mattermost config migrate config/config.json "mysql://mmuser:really_secure_password@tcp(127.0.0.1:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"`
3. Create the file `/opt/mattermost/config/mm.environment` with these contents:

```
MM_CONFIG="mysql://mmuser:really_secure_password@tcp(127.0.0.1:3306)/mattermost?charset=utf8mb4,utf\u0026&readTimeout=30s\u0026writeTimeout=30s"
```

4. Add this line to `/etc/systemd/system/mattermost.service` before `ExecStart`

```
EnvironmentFile=/opt/mattermost/config/mm.environment
```

5. `sudo systemctl stop mattermost`
6. `sudo systemctl daemon-reload`
7. `sudo systemctl start mattermost.service`

See the original post here.

This issue was generated from Mattermost using the Doc Up plugin.

matterdoc avatar Oct 23 '19 01:10 matterdoc

Can we add some language about how cluster nodes are triggered to pick up the new configuration change? Are they polling the DB? Is there some refresh period?

sadohert avatar Oct 23 '19 14:10 sadohert

Also, I think we need to consider the following updates:

  1. Specifically link to the 2 sets of properties in config.json that are NOT visible in the System console, with description of how these properties must be updated using the CLI
  2. Describe how invoking the CLI should work to still leverage config-in-database. It seems we have to ensure the shell that invokes the cli needs to include any environment variable ovverides items like MM_CONFIG (MM_SERVICESETTINGS...). This is not immediately obvious for a deployment that has put all the variables into the systemD unit file (mattermost.service).

sadohert avatar Nov 12 '19 11:11 sadohert

@sadohert - Would you be open to reviewing the existing product documentation to confirm whether any of the suggested updates here remain outstanding?

cwarnermm avatar Jan 20 '22 14:01 cwarnermm

Documented via https://docs.mattermost.com/configure/configuation-in-a-database.html

cwarnermm avatar Aug 17 '23 14:08 cwarnermm