Git Product home page Git Product logo

mongodb's Introduction

Jetson-mongoDB-Atlas

MongoDB Atlas is a fully-managed cloud database developed by the same people that build MongoDB. Atlas handles all the complexity of deploying, managing, and healing your deployments on the cloud service provider of your choice (AWS, Azure, and GCP). You may use this service totally FOR FREE.

Notes: This software is written in Python. You may use this repo as a tool to constantly post data (ie: sensors data) from your device to your database hosted by MongoDB Atlas. If you have Python >=3.6 installed in your machine, you should be good to go. The demo below is done with a Jetson AGX Xavier DevKit. Other edge devices such as Raspberry Pi and Jetson Nano, or a normal Linux Desktop should also work.

Official Website: https://docs.atlas.mongodb.com/
Blog Post: https://hikariai.net

Demo

Setup

Step #0: Register a MongoDB Atlas Account

  • Go to MongoDB Atlas Login Page here, log in with a Google Account, or register a new one.

Step #1: Create a cluster

  • After you successfully log in with credentials, the window will lead you to choose a plan. Just Click the leftmost option "Shared Cluster"
  • Choose a Cloud Provider and Region, then press "Create Cluster"

Step #3: Create a project

  • On the very upper left corner, you will find a tab with "Project 0", press "New Project", create one with your own prefrence.
  • Once the project has been created, you will find an option with "Build a Cluster", follow the instructions in Step #1.
  • Wait until the cluster has been succesfully created

Step #4: Create a database

  • Find the tab with "Cluster 0", and press it
  • Find the tab with "collections", and press it
  • Press "Add My Own Data"
  • Type a name for the database, and a name for the collection (instance of database)
  • Press "Create"

Step #5: Build Connection

  • Find the tab with "Cluster" on the left column, and press it
  • Under "Cluster 0" section, you will find a tab named "CONNECT", press it
  • On the "Whitelist a connection IP address" tab, press "Add Your Current IP Address"
  • On the "Create a MongoDB User" tab, type in a username and a password
  • Press "Choose a Connection Method", find the tab "Connect your application", and press it
  • From the "Driver" tab, choose "Python", "Version 3.6 or later"
  • Copy the **"Conenction String", save it in a text file

How To Use

Clone the Repo

$ cd ~
$ git clone https://github.com/yqbu/mongoDB
$ cd mongoDB

Install Software Dependencies

*** Please make sure you are using Python >=3.6

$ pip install -U pip
$ pip install -r requirement.txt

Run

Modify parameters in main.py

*** Modify the following parameters:

  • URL = 'url'
  • DATABASE_NAME ='db_name'
  • COLLECTION_NAME = 'collection_name'

Run the app

$ python main.py

db.help()

  • Carefully read the descriptions in the console
  • Call a specific function based on your need
  • Customize post data

Enjoy!

mongodb's People

Contributors

miooochi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.