Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleCLI
Info

In order to connect to the DocumentDB, you need to install the MongoDB Shell. Instructions to install the MongoDB shell vary depending on your distribution. In the example shown below, I will the steps I followed using an Ubuntu 22.04 instance created on Spinup.

  1. Follow the instructions for your computer on the MongoDB website to install the MongoDB Shell. These are the commands I ran for Ubuntu 22.04:

    Code Block
    languagebash
    wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-7.0.asc
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
    sudo apt-get update
    sudo apt-get install -y mongodb-mongosh
Info

Run the following command to confirm that mongosh installed successfully: mongosh --version

  1. Download the CA certificate from AWS.

    Code Block
    languagebash
    wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
  2. Navigate back to Spinup, and under the 'Firewall' tab on your Space's home page, add Port 27017 as an inbound rule. Choose Other (custom) as the 'Service', 27017 as the 'Port', and select Anywhere for the 'Source IP subnet' (for further information: How do I use the Firewall in Spinup Spaces?)

  1. Follow the instructions to connect to a deployment on a remote host. Copy the endpoint from the details page of your DocumentDB.

Code Block
languagebash
mongosh -tls <cluster endpoint>:27017 --username <username> --tlsCAFile rds-combined-ca-bundle.pem

# Example
# mongosh -tls spinup-docdb00245c.cluster-c9ukc6s0rmbg.us-east-1.docdb.amazonaws.com:27017 --username test1234 --tlsCAFile rds-combined-ca-bundle.pem

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@ca98fe5d
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "database" , "documentdb" ) and type = "page" and space = "spinup"
labelsspinup selfservice

...