As all of us in the Sitecore community are aware, one of the major changes in Sitecore 7.5 and 8 is MongoDB, the new architectural component in Sitecore’s xDB.
If you are starting to work with these newer versions of Sitecore, you will be asked by your clients about the options to consider when deploying and supporting MongoDB.
We at Arke have had tremendous success implemented MongoDB using Rackspace’s ObjectRocket platform. There are however a few tricks to get it configured that I will cover in this post.
The post assumes that you already have an ObjectRocket account. If you don't, go ahead and sign up for their 30 day trial.
Your new strings will look something like this:
Looking at the strings above, mongouser and mongopassword represent the credentials that you set up for your instance user. The port and url (iad-mongos2.objectrocket.com:xxxx) come from your instance's SSL Connect String.
If you are starting to work with these newer versions of Sitecore, you will be asked by your clients about the options to consider when deploying and supporting MongoDB.
We at Arke have had tremendous success implemented MongoDB using Rackspace’s ObjectRocket platform. There are however a few tricks to get it configured that I will cover in this post.
The post assumes that you already have an ObjectRocket account. If you don't, go ahead and sign up for their 30 day trial.
Creating a New Instance
Click on the "Add Instance" button within your account's "Instances" dashboard, and then give your instance a name. Make sure that "MongoDB" is selected as the engine, and select the plan that suits your needs.
Adding an Instance User
After your newly created instance is up and running, go ahead and create a new instance user by clicking on the "Actions" button and then "Add User" link.Note
Something to keep in mind is that we will be using the same credentials that we set up for our instance user, for our Sitecore databases. So once you create the user, keep the username and password handy.Making the Connection
Within the Instance Details view, you will see that you have a couple of connection strings and an API key. We obviously want to have a secure connection, so we will be using the SSL Connect String.
ConnectionStrings.config
The next thing you want to do is set up the connection strings to point to your new instance. So you want to crack open your ConnectionString.config file, and add the necessary information.Your new strings will look something like this:
<add name="analytics" connectionString="mongodb://mongouser:mongopassword@iad-mongos2.objectrocket.com:xxxx/analytics?ssl=true"/>
<add name="tracking.live" connectionString="mongodb://mongouser:mongopassword@iad-mongos2.objectrocket.com:xxxx/tracking_live?ssl=true"/>
<add name="tracking.history" connectionString="mongodb://mongouser:mongopassword@iad-mongos2.objectrocket.com:xxxx/tracking_history?ssl=true"/>
Looking at the strings above, mongouser and mongopassword represent the credentials that you set up for your instance user. The port and url (iad-mongos2.objectrocket.com:xxxx) come from your instance's SSL Connect String.
Cranking up the Databases
At this point, we are ready to fire up Sitecore, and let it auto-provision the necessary MongoDB databases.
When Sitecore has finished "booting up", you will notice that the databases have been created in your instance, but they are empty. That's because you need to create a user account for each of the databases, so that Sitecore can start dumping data into them:
Creating Database Users
The final step is to add a user to each of the newly created databases that has the same credentials that we set up for our instance user in the Adding an Instance User step.
Simply click on the various database names on your instance details page, and then click the "Add User" button located in the user's section of the database details page.
Simply click on the various database names on your instance details page, and then click the "Add User" button located in the user's section of the database details page.