20

I use a Mac and mostly work on Node.js projects. I would like to try out DocumentDB to compare it against MongoDB. Is there anyway to run a local instance of Azure DocumentDB without going thru the hassles of setting up a real account?

Thanks!

Sunny Day
  • 523
  • 2
  • 8
  • 16

6 Answers6

23

Since Nov 16, 2016 (announcement), you can download the new official DocumentDB emulator.

rnrneverdies
  • 15,243
  • 9
  • 65
  • 95
  • 2
    The OP said they "use a Mac" but the [system requirements](https://learn.microsoft.com/en-us/azure/cosmos-db/local-emulator#system-requirements) on that page say: "Windows Server 2012 R2, Windows Server 2016, or Windows 10". The [docker image](https://learn.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-on-docker) doesn't even work on non-windows: "The Azure Cosmos DB Emulator can be run on Docker for Windows. The Emulator does not work on Docker for Oracle Linux." I haven't been able to find any way to do this with a local instance of CosmosDB on a non-windows machine. :( – gabe Jun 04 '18 at 00:21
3

as astaykov mentioned, there is no local instance of DocumentDB available at this time. Your options are to either sign up for an Azure Trial at https://azure.microsoft.com/en-us/pricing/free-trial/ or you can send mail to askdocdb AT microsoft. We are currently running a program where we provide free database accounts (no signup required) for evaluation periods.

Thanks

3

You can use the DocumentDB emulator now. Just released yesterday.

Get it here: Use the Azure DocumentDB Emulator for development and testing

Lybecker
  • 618
  • 5
  • 16
2

Looks like a local development environment might ship by end of this year (2016) or sooner.

More information is at https://feedback.azure.com/forums/263030-documentdb/suggestions/6328798-standalone-local-instance

kotpal
  • 437
  • 8
  • 11
1

Still not a local solution, but if you sign up for the 'dev essentials' program, you get a 25 USD/month credit for free, forever. If you're a little bit careful this allows to do enough dev/test work in the cloud.

jeroenh
  • 26,362
  • 10
  • 73
  • 104
0

This is now supported with DocumentDB emulator.

you can download from the above link. Based on Docs,

The DocumentDB Emulator provides a high-fidelity emulation of the DocumentDB service. It supports identical functionality as Azure DocumentDB, including support for creating and querying JSON documents, provisioning and scaling collections, and executing stored procedures and triggers. You can develop and test applications using the DocumentDB Emulator, and deploy them to Azure at global scale by just making a single configuration change.

// Connect to the Azure Cosmos DB Emulator running locally
DocumentClient client = new DocumentClient(new Uri("https://localhost:8081"),"C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==");

You can read more about how to setup Azure CosmosDB on local with VSCODE.

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396