-
Type:
Task
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Dev Tools 2019-07-01, Dev Tools 2019-07-15
Today a command-line value for [-f|--config] must be passed to the mongod binary as there are no built-in default config files used.
We minimize the pain today for Linux users within our packaging by specifying a default config file of /etc/mongod.conf in the sysvinit script / systemd unit file (e.g. Red Hat).
AFAICT, we offer no such help on Windows or macOS – and those are the platforms where the users are most likely to need the help as:
- On average they probably aren't as likely to have very extensive sysadmin experience and prefer to use OS level service management
- Modifying the command-line parameters used for the service isn't obvious, especially for macOS
- Windows: use sc.exe (command-line) or services.exe (GUI) to edit the start parameters for the mongodb service
- macOS: use launchctl or $EDITOR to manage the ProgramArguments array in the mongodb service's .plist file
- So this creates a painful situation for users just getting started, as they are likely to want to use a config file precisely because they're not comfortable managing the mongod process directly and passing command-line arguments, yet we force them to go to this level just to enable config file use (bit of a catch-22)
The end result is a lower quality user experience which violates our otherwise great user story around easily getting MongoDB up and running.
It would be great if we could improve this user experience by managing global default config file paths and a progression of overrides. For example:
- UNIX : /etc/mongod.conf --> <install prefix or dbpath>/mongod.conf --> command-line params
- Windows : c:\mongod.conf --> <install prefix or dbpath>\mongod.conf --> command-line params
As a competitive example, see MySQL. In the case of MySQL it's become far too complicated and convoluted–but we can find a nice middle ground.