Atlas CLI
The MongoDB Atlas Command Line Interface, or Atlas CLI (mongodb-atlas-cli), allows you to create, manage, and automate operations related to your MongoDB Atlas deployment. This includes tasks like provisioning clusters, creating and deleting users, and controlling network access. You can also access related products like Atlas Search. With the Atlas CLI, you can quickly interact with MongoDB services from the command line for easier testing and scripting.
To report bugs, please use our mongodbcli github issues.
18 results found
-
Image execution in LXC
For our CI we use Github actions with self hosted runners, the server machines have Proxmox with LXC and Ubuntu. For automated tests we start a docker compose which should start the official atlas docker image. During deployment creation it fails with Error 127. Is there anything that is required to execute it on those machines?
The command which I run and the output look like the following:
docker run --privileged -p 27017:27017 -v "/var/run/docker.sock:/var/run/docker.sock" mongodb/atlas:v1.14.2 atlas deployments setup core-data \
--type local \
--mdbVersion 7.0 \
--force \
--bindIpAll \
--username admin \
--password notasecretwith this…
5 votes -
Possibility to download binaries in advance, or start a deployment in docker images
The problem is the following:
When I create a deployment during docker image build, it won't start the deployment during image execution but end in an endless spinner. Therefore I created a deployment which will at least the binary download to speed up the image startup, which worked last year.
Currently on startup of this image it will then try to create a new deployment and results in an error that python could not be found.Creating your cluster core-data
1/2: Starting your local environment...
2/2: Creating your deployment core-data...
Error: exit status 127: Error: runc: runc create failed: unable…5 votesIf I understand this request correctly, we support your use case now.
We have a new docker image that includes the MongoDB server and Atlas Search and Vector Search: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-docker/. This image is designed (and licensed for) development and testing locally and in CI/CD. It is not intended for production use.
The image is currently in public preview and we expect to GA it later in the year (2024).
-
Allow all IPs for local atlas deployments
Hello,
we want to create a docker container which runs the atlas-cli with --type local, the base is the official mongodb/atlas docker image. We need this so we can work with atlas-search. The access list which can be provided during deployment setup, is not passed down to the mongod config and we get blocked. A reverse proxy doesn't help in this case. If we enter the final podman image and modify the config, we can't restart the server without crashing the container and which breaks again.
We would really appreciate it if we could somehow get bind IPs activated.Thank…
3 votes -
Using atlas cli local deployment feature in a docker-compose based automatic testing environment
Is it possible to use this in a CI based on docker compose for automated testing?
1 vote -
No sufficient instructions
Please improve tutorials. This page (https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-docker/) is no sufficient.
PS C:\ivo\projects\nest1> docker pull mongodb/atlas
...
PS C:\ivo\projects\nest1> docker run --env-file atlas.env --rm -it mongodb/atlas bash
[root@9bd3eed47f2d /]#
[root@9bd3eed47f2d /]# show dbs
bash: show: command not found
[root@9bd3eed47f2d /]# mongo
bash: mongo: command not found
[root@9bd3eed47f2d /]#Please write more perfect and working tutorial for it.
Second problem is docker's mongo-express (https://hub.docker.com/_/mongo-express). I've windows' Docker Desctop and the mongo-express doesn't simply work. Please improve it if it's yours, and make possible good instructions for it.
For example i use with docker-compose.yml:
version: "3.8"
services:
mongodb:
#image: mongo:5.0.6-focal…1 voteFor Docker and Docker Compose please follow the documentation at https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-docker/.
The docker image described there provides a simple way to run MongoDB with Atlas Search and Vector Search capabilities included in Docker and Docker Compose for development and testing purposes.
-
JSON
An export function to export the configuration of an existing Cluster to a JSON config file, of the kind used by Atlas CLI to create clusters.
I can imagine this as a flag for a detailed output of "atlas cluster describe "
1 voteThanks for raising this suggestion.
As per the comment earlier, this is already available with "--output json" flag. If you'd like to export it to a file, feel free to add "> filename.json" at the end of command.
I hope this helps.
Thanks,
Jakub
-
Please help with official github action to setup Atlas CLI
Please help with official github action from Atlas in Github Action Marketplace to setup Atlas CLI, same as https://github.com/andreaangiolillo/atlas-cli-github-action
2 votesHello again,
Thank you for being patient while we've been working hard to add this new capability. I'm happy to share that it's now available and ready to use.
You can get started by visiting: https://github.com/mongodb/atlas-github-action
Keep the feedback coming.
Jakub
-
Add `atlas backups restores watch` command
I like the ability to monitor snapshot progress with
atlas snapshot watch
. It lets me wait for the snapshot to finish up before progressing on to some future step of an automated workflow.Could we add the same watch command to atlas backup restore? The API I'm envisioning is just this:
atlas backups restores watch <restoreId> [options]
Where
[options]
are all the usual suspects like--projectId
--profile
and so forth. Like thesnapshots watch
command, this will help me wait for a database to finish restoring some snapshot before going and doing some other step of an automated workflow.…
5 votesThank you again for all your feedback and engagement in making the Atlas CLI more usable for you and other customers.
As per my colleagues earlier comment: this capability was delivered in Atlas 1.2.0 release and you can view the changelog here: https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-changelog/#atlas-cli-v1.2.0
We appreciate all your insights so please keep them coming.
Thank you,
Jakub
-
Please help with official docker image which is preinstalled with Atlas CLI
Please help with official docker image which is preinstalled with Atlas CLI, same as
mcr.microsoft.com/azure-cli which gives us the built image with azure cli
amazon/aws-cli - Docker Image | Docker Hub1 voteThank you for waiting for the official Docker image for Atlas CLI. It's now live and available for you to pull: https://hub.docker.com/r/mongodb/atlas
Please use "docker pull mongodb/atlas" to get started.
Looking forward to getting more feedback.
Thank you,
Jakub
-
Add `edit` to `atlas config` help listing.
When listing help for
atlas config
theedit
option is not currently visible:
```
~ 🍤 atlas config --help 23:14:37 UTC
Configure settings in a user profile.
All settings are optional. You can specify settings individually by running:
$ atlas config set --helpYou can also use environment variables (MONGODBATLAS*) when running the tool.
To find out more, see the documentation: https://dochub.mongodb.org/core/atlas-cli-env-variables.Usage:
atlas config [command]Available Commands:
init Configure a profile to store access settings for your MongoDB deployment.
set Configure specific properties of a profile.
list Return a list of available profiles by name.
describe…1 voteHi Alicja,
Thank you again for raising this feedback. This new command "atlas config edit" is available on Atlas CLI since version 1.2.0.
Looking forward to seeing more feedback on the Atlas CLI.
Thanks,
Jakub
-
Add a command to open the CLI config on my system editor
A new command like
mongocli config edit
that opens the config file on my system editor3 votes -
Add description of JSON file used to create cluster.
According to doco https://www.mongodb.com/docs/atlas/cli/upcoming/command/atlas-clusters-create/
"For full control of your deployment, or to create multi-cloud clusters, provide a JSON configuration file with the --file flag."
it would be nice to get detailed description what should be in this file, what can be changed and what is the expected format of parameters in this file.
1 voteHi Sergey,
Apologies for the late response here and thank you for raising it in the first place.
In version 1.5.0 of the Atlas CLI we've updated the command's help to provide better guidelines and links to more details on the configuration file.
You'll see the following information
-f, --file string Path to an optional JSON configuration file that defines cluster settings. To learn more about configuration files for the Atlas CLI, see https://www.mongodb.com/docs/atlas/cli/stable/cluster-config-file/. To learn more about configuration files for MongoCLI, see https://www.mongodb.com/docs/mongocli/stable/reference/mms-cluster-settings-file/.
Please let me know if there's anything unclear.
Thanks,
Jakub
-
Add --currentIp to atlas accessList
Would be nice to have the --currentIp option when using "atlas accessList".
The current workaround in linux/macOS ismongocli atlas accessList create
curl ifconfig.me
1 vote -
Add commands to stop/start/restart a mongodb process in a cluster
Currently, we see that mongocli supports stop/start the "entire" cluster which is not suitable for general maintenance scenario which requires cluster availability.
Commands to stop/start/restart a mongodb process in a cluster will be useful for the scenario of the server maintenance that requires MongoDB Administrator to stop a single node prior to the maintenance time and start it afterward.
3 votesAdded in MongoDB CLI v1.19 https://docs.mongodb.com/mongocli/stable/release-notes/
-
Support setting userToDNMapping in LDAP config
There are flags to save other LDAP configuration settings but none for this portion. I would imagine it to be three flags with two being mutually exclusive (per docs at https://docs.mongodb.com/manual/reference/configuration-options/#security.ldap.userToDNMapping):
[ --mappingMatch <regex> { --mappingLdapQuery <query> | --mappingSubstitution <DN> } ]1 voteAdded in MongoDB CLI v1.16 https://docs.mongodb.com/mongocli/stable/release-notes/
-
Add command to restart the cluster
Refer to the Ops Manager Commands => https://docs.mongodb.com/mongocli/stable/reference/ops-manager/cluster-commands/, there are the commands to startup/shutdown cluster but not restart.
It will be helpful to have a restart command that will rolling restart a cluster.1 voteAdded in MongoDB CLI v1.19 https://docs.mongodb.com/mongocli/stable/release-notes/
-
option for activate/deactivate monitoring/backup agents
Currently, there is no command for simple activation and deactivation of monitoring/backup agents.
2 votesAdded in MongoDB CLI v1.14 https://docs.mongodb.com/mongocli/stable/release-notes/
-
Allow to perform rolling compact via restapi
Allow to perform rolling compact via CM/OM restAPI (processes.lastCompact parameter)
3 votesAdded in MongoDB CLI v1.19 https://docs.mongodb.com/mongocli/stable/release-notes/
- Don't see your idea?