Module mongodb — Inmanta 2017.4dev documentation

# Module mongodb

> - License: Apache 2.0
> - Version: 0.3.1
> - Author: Inmanta <code@inmanta.com>
> - Upstream project: https://github.com/inmanta/mongodb.git

## Entities

entity `mongodb::Database`

  Parents: `std::State`

  Mongodb database

  attribute bool `purged`=False
  attribute string `name`
  relation mongodb::MongoDB `server` [1]

    other end: `mongodb::MongoDB.databases [0:*]`

  The following implements statements select implementations for this entity:

  > - `std::none`

entity `mongodb::MongoDB`

  Parents: `ip::services::Server`

  Set up a single mongodb server

  attribute bool `smallfiles`=False
  attribute ip::ip `bindip`='127.0.0.1'
  relation mongodb::ReplicaSet `rs_slave` [0:1]

    other end: `mongodb::ReplicaSet.slave_servers [2:*]`

  relation mongodb::Database `databases` [0:*]

    other end: `mongodb::Database.server [1]`

  relation mongodb::ReplicaSet `rs_master` [0:1]

    other end: `mongodb::ReplicaSet.master_server [1]`

  The following implementations are defined for this entity:

  > - `mongodb::mongoServerFedora`
  > - `mongodb::mongoServerEpel`
  > - `mongodb::mongoServerUbuntu`

  The following implements statements select implementations for this entity:

  > - `mongodb::mongoServerFedora` constraint `std::familyof(host.os,'fedora')`
  > - `mongodb::mongoServerEpel` constraint `std::familyof(host.os,'rhel')`
  > - `mongodb::mongoServerUbuntu` constraint `std::familyof(host.os,'ubuntu')`

entity `mongodb::ReplicaSet`

  Parents: `std::Entity`

  A mongo replica set

  attribute string `name`='rs01'
  relation mongodb::MongoDB `master_server` [1]

    other end: `mongodb::MongoDB.rs_master [0:1]`

  relation mongodb::MongoDB `slave_servers` [2:*]

    other end: `mongodb::MongoDB.rs_slave [0:1]`

  The following implementations are defined for this entity:

  > - `mongodb::mongoServerMaster`

  The following implements statements select implementations for this entity:

  > - `mongodb::mongoServerMaster`

## Implementations

implementation `mongodb::mongoServerEpel`

implementation `mongodb::mongoServerFedora`

implementation `mongodb::mongoServerMaster`

implementation `mongodb::mongoServerUbuntu`

## Resources

class `mongodb.` `Database`

  > A mongodb database

  - Resource for entity `mongodb::Database`
  - Id attribute `name`
  - Agent name `server.host.name`
  - Handlers `mongodb.DatabaseHandler`

## Handlers

class `mongodb.` `DatabaseHandler`

  > A handler to manage database on a mongodb server and snapshot/restore

  > (this handler currently does nothing because mongo creates its database lazily)

  - Handler name `mongodb`
  - Handler for entity `mongodb::Database`