GithubHelp home page GithubHelp logo

isabella232 / mongodb-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from canonical/mongodb-k8s-operator

0.0 0.0 0.0 51 KB

Operator charm for MongoDB

License: GNU General Public License v3.0

Python 98.44% Shell 1.56%

mongodb-operator's Introduction

MongoDB Operator

Description

The MongoDB operator provides a general purpose distributed document database. This repository contains a Juju Charm for deploying MongoDB on Kubernetes clusters.

Setup

A typical setup using snaps, for deployments to a microk8s cluster can be done using the following commands

sudo snap install microk8s --classic
microk8s.enable dns storage registry dashboard
sudo snap install juju --classic
juju bootstrap microk8s microk8s
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath

Build

Install the charmcraft tool

sudo snap install charmcraft

Build the charm in this git repository

charmcraft build

Usage

Create a Juju model for your operators, say "lma"

juju add-model lma

Deploy a single unit of MongoDB using its default configuration

juju deploy ./mongodb.charm

It is customary to use MongoDB with replication. Hence usually more than one unit (preferably and odd number) is deployed. Additionally units (say two more) may be deployed using

juju add-unit -n 2 mongodb

Alternatively multiple MongoDB units may be deployed at the outset. This is usually faster

juju deploy -n 3 ./mongodb.charm

If required, remove the deployed monitoring model completely

juju destroy-model -y lma --no-wait --force --destroy-storage

Note the --destroy-storage will delete any data stored by MongoDB in its persistent store.

Relations

Currently supported relations are

  • Peer relations for replication
  • Provides a mongodb database interface.

Developing

Use your existing Python 3 development environment or create and activate a Python 3 virtualenv

virtualenv -p python3 venv
source venv/bin/activate

Install the development requirements

pip install -r requirements-dev.txt

Testing

Just run run_tests:

./run_tests

mongodb-operator's People

Contributors

mthaddon 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.