Skip to content

Instantly share code, notes, and snippets.

@tychoish
Created February 18, 2014 17:33
Show Gist options
  • Save tychoish/9075644 to your computer and use it in GitHub Desktop.
Save tychoish/9075644 to your computer and use it in GitHub Desktop.
title: Enable authentication on each component in the cluster.
stepnum: 2
ref: enable-auth
pre:
Enable authentication by specifying the key file on each
:program:`mongos` and :program:`mongod` in the cluster, including each
config server and shard. On each, specify the key file by doing one of
the following:
action:
- heading: Specify the key file in the configuration file.
pre:
In the configuration file, set the :setting:`keyFile` option to the
key file's path and then start the component, as in the following
example:
language: cfg
code: |
keyFile = /srv/mongodb/keyfile
- heading: Specify the key file at runtime.
pre:
When starting the component, set the :option:`--keyFile <mongos --keyFile>`
option, which is an option for both :program:`mongos`
instances and :program:`mongod` instances. Set the
:option:`--keyFile <mongos --keyFile>` to the key file's path. The
:setting:`keyFile` setting implies :setting:`auth`, which means in
most cases you do not need to set :setting:`auth` explicitly.
---
@bgrabar
Copy link

bgrabar commented Feb 18, 2014

[robots]: cowardly refusing to regenerate robots.txt on non-master branch.
mapping values are not allowed here
in "source/includes/steps-enable-authentication-in-sharded-cluster.yaml", line 13, column 16
mapping values are not allowed here
in "/Users/bob/docs/source/includes/steps-enable-authentication-in-sharded-cluster.yaml", line 13, column 16

and after removing the colon on line 13:

[robots]: cowardly refusing to regenerate robots.txt on non-master branch.
mapping values are not allowed here
in "source/includes/steps-enable-authentication-in-sharded-cluster.yaml", line 19, column 14
mapping values are not allowed here
in "/Users/bob/docs/source/includes/steps-enable-authentication-in-sharded-cluster.yaml", line 19, column 14

@bgrabar
Copy link

bgrabar commented Feb 18, 2014

lines 8 and 14 in the example above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment