What are Atlas deployments

Hi. I’m new to MongoDB Atlas and I’m interested in running MongoDB Atlas in Docker locally. How to do this, is described here on the MongoDB website.

Although I was able to walk through all the steps, I still don’t understand what an Atlas deployment is. In the tutorial it is explained as:

This tutorial shows you how to use the atlas deployments command to create a local Atlas deployment with Docker

So, an Atlas deployment creates an Atlas deployment :thinking:

What I would like to know about the

$> atlas deployments setup

command is, why do I have to do this, what does it do? And why can I have multiple deployments?

Any explanation or a link to where this is explained would be appreciated!

This CLI is an all-in-one type solution to manage Atlas related job in one place. Here, instead of installing the CLI directly on your system, you use docker so you can later easily remove if you want, change settings without disturbing your OS, or create a local server as you pointed out.

You could instead use Docker and Kubernetes tutorials to run clusters, and then manually install, setup and run MongoDB servers/clusters. That is a bit tiresome as you would guess, and it is already the second part of the tutorial you linked:
https://mongodb.prakticum-team.ru/docs/atlas/cli/stable/atlas-cli-deploy-docker/#create-a-local-atlas-deployment-with-docker-compose.

The old/common way is to install MongoDB itself. But here, you installed a mini Atlas server which has at least one extra as mentioned in the text: a local Atlas deployment with Atlas Search capabilities enabled.

This is a new in-preview feature to have more than just the database server itself.

PS: You can use the CLI to manage your Atlas cloud, but I am guessing you are already familiar with that :wink:

1 Like

So, atlas deployments setup xyz basically installs a mongo database service with semantic search capabilities, right?
But why would you want to have multiple deployments on one server, as you can just start just one? I noticed that you can start and stop deployments, just as if you start different databases with different data.

Hi again @Lucas_Calje

Let’s look at this command first:


atlas deployments setup --bindIpAll --username root --password root --type local --force

If you look closely, you will see --type local part. This is the reason this command creates a local deployment.

It is for development on your machine so that you can play around as much as you want to get experience. You can still use it for production purposes, though, if you have a limited resource and/or small project.

Now, let take a step back and look at the CLI as you seem to have missed its intent. Forgive me if I mistaken, but despite my inital guess I think you have jumped in directly to that page while searching something else.

You can login Atlas web interface and do your all administration through that web interface.

But this can be daunting at times, especially when you want some automated access.

The CLI comes in to do that. If you are comfortable using terminal, or live with the terminal, you don’t need to leave it while doing MongoDB Atlas Cloud management.

The CLI itself is a big topic. If you missed the beginning, please visit this link (it is the parent item on the left side chapter list)

And for the “local” name, this actually has another meaning: any cloud provider that you use outside MongoDB and have access to terminal utilities of them.

MongoDB Atlas already uses cloud providers to host your data. You will remember selecting a location for your data. But these deployments are controlled by the MongoDB through Atlas interface.

Instead, you may already have your own subscription to one of them, and want to try/use MongoDB there. You would just login to their terminal interface and follow procedures to create your own deployment there. This is just like installing on your own computer, and hence the “–type local” parameter. Your subscription fees will be to the provider you are using.

If you use “–type atlas” instead, you will be managing deployments on servers that MongoDB Atlas manages. Your subscription will be to MongoDB Atlas, and you may also manage them through Atlas web interface.

I hope this clears your mind. Let us know if things still lingers on your mind.

Cheers.

Thanks for all the information. I have some reading todo!
Just one last question, running MongoDB Atlas locally (docker), is that also ment for production or just for development only?

This warning at the top of that page:

Creating Local Atlas Deployments with Docker Compose is available as an experimental feature. The feature and the corresponding documentation might change at any time during the experiment.

It is a MongoDB database server at the core but this is a new feature to have a local “Atlas” deployment. Since it is subject to changes, I cannot say if it is production ready.

You may check the docker image content to see what happens in it if you know how to inspect docker images/containers.

In addition to my above posts, for considerate eyes, here is how old “atlas deployments” is (pretty young as of now):

Atlas CLI 1.12.0

Released 22 September 2023

  • Adds atlas deployments commands so that you can work with Atlas, including using Atlas Search and Atlas Vector Search, throughout the entire software development lifecycle from your local environment to the cloud. To learn more, see Manage Local and Cloud Deployments from the Atlas CLI.