Giter VIP home page Giter VIP logo

mongodb's Introduction

MongoDB K8s Role

A simple role for deploying an ephemeral instance of MongoDB to Kubernetes. This role defaults to deploying MongoDB v3.6 from Red Hat Software Collections. It uses the k8s module for Ansible, and can be used in an Ansible Operator.

Requirements

  • A Red Hat account for authentication to registry hosting the image (registry.redhat.io)
  • The k8s modules requires the following python packages to run (for RHEL/CentOS/Fedora)
  • python-kubernetes
  • python-openshift
  • It is highly recommended to change the default password values by providing the respective variables at role invocation
  • You must have access (and an active login session) to a Kubernetes cluster to use this role.

Role Variables

This role supports the following variables, all of which have default values within the role:

  • mongodb_user - username that will be used to authenticate (default: exampleusr)
  • mongodb_password - password that will be used to authenticate (default: REDACTED)
  • mongodb_database - name of the database that will be instantiated (default: exampledb)
  • mongodb_admin_password - password used to protect the admin account (default: REDACTED)
  • memory_limit - memory limit imposed by kubernetes to the pod (default: 512Mi)
  • name - name to use for the created resources (default: mongodb)
  • namespace - namespace where the resources will be created (default: mongodb)

NOTE: Neither Ansible Vault nor Kubernetes Secrets are currently utilized to secure the values of password variables. Consider this a security risk and proceed with caution.

Dependencies

This role has no role dependencies

Example Playbook

The playbook should be run against localhost with gather_facts disabled (as this has no effect but to lengthen playbook run time). An example invocation is below (shown with optional variable overrides):

    - hosts: localhost
      gather_facts: no
      roles:
         - { role: jsm84.mongodb, mongodb_user: exampleusr, mongodb_password: examplepasswd, mongodb_database: exampledb, mongodb_admin_password: exampleadminpasswd, memory_limit: 1024Mi }

License

BSD

Author Information

Josh Manning (@jsm84)

Red Hat Partner Connect: https://connect.redhat.com

GitHub: https://github.com/jsm84/mongodb-k8s-ansible-role

mongodb's People

Contributors

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