docs
docs copied to clipboard
Request for Documentation: How to migrate config.json to the database in RHEL7/MySQL
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.
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?
Also, I think we need to consider the following updates:
- 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 - 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 - Would you be open to reviewing the existing product documentation to confirm whether any of the suggested updates here remain outstanding?
Documented via https://docs.mattermost.com/configure/configuation-in-a-database.html