-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from sous-chefs/pr/344
User management in replicasets / sharding
- Loading branch information
Showing
5 changed files
with
137 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
# The username / password combination that is used | ||
# to authenticate with the mongo database | ||
default['mongodb']['authentication']['username'] = 'admin' | ||
default['mongodb']['authentication']['password'] = 'admin' | ||
|
||
default['mongodb']['admin'] = { | ||
'username' => 'admin', | ||
'password' => 'admin', | ||
'roles' => %w(userAdminAnyDatabase dbAdminAnyDatabase), | ||
'username' => default['mongodb']['authentication']['username'], | ||
'password' => default['mongodb']['authentication']['password'], | ||
'roles' => %w(userAdminAnyDatabase dbAdminAnyDatabase clusterAdmin), | ||
'database' => 'admin' | ||
} | ||
|
||
default['mongodb']['users'] = [] | ||
|
||
# Force creation of admin user. auth=true is an invalid | ||
# setting for mongos so this is needed to ensure the admin | ||
# user is created | ||
default['mongodb']['mongos_create_admin'] = false | ||
|
||
# For connecting to mongo on localhost, retries to make after | ||
# connection failures and delay in seconds to retry | ||
default['mongodb']['user_management']['connection']['retries'] = 2 | ||
default['mongodb']['user_management']['connection']['delay'] = 2 | ||
|
||
# For mongod replicasets, the delay in seconds and number | ||
# of times to retry adding a user. Used to handle election | ||
# of primary not being completed immediately | ||
default['mongodb']['mongod_create_user']['retries'] = 2 | ||
default['mongodb']['mongod_create_user']['delay'] = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters