Creating Keyfile For MongoDB Replication Set

Creating a keyfile is one of the required steps while you are configuring a MongoDB replication set for a Sitecore solution. In this post I will mention Why and How you can generate a keyfile. This post is a smaller extract for my upcoming post mentioning about creation of MongoDB Replication Set for Sitecore.

WHY a keyfile is required?

In a replication set all the participants, Mongod instances should talk to each other (authenticate each other) by supplying a password for inter-process authentication. The content of the key file is the shared secret used for all internal authentication.

How to create keyfile?

In order to create a keyfile you need to have OpenSSL installed, below are the links to download it,

Once OpenSSL is installed, open command prompt and navigate to \OpenSSL-Win32\bin and execute below command,

openssl rand -base64 741 > mongodb-keyfile

This will generate the required keyfile in the bin folder as seen in below screen, you can now deploy this file on all the mongod instances which are participating in replication set.

MongoDB Replication Set Keyfile

As mentioned earlier in this post, I am preparing myself to write another post maybe over the weekend showing how to create a full functional MongoDB Replication Set for a Sitecore Solution..

Advertisements

One Response to “Creating Keyfile For MongoDB Replication Set”

  1. Sitecore xDB: Creating Replication Set for MongoDB | Horizontal Integration Says:

    […] keyfile generation in this post itself but to keep it simple for your reading, have a look at “Creating keyFile for xDB Replication Set” post for creating the […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: