Saltstack Official MongoDB Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.rst 3.7KB

9 years ago
9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. =======
  2. MongoDB
  3. =======
  4. MongoDB (from "humongous") is an open-source document database, and the leading NoSQL database. Written in C++.
  5. Available states
  6. ================
  7. .. contents::
  8. :local:
  9. ``mongodb.server``
  10. --------------------
  11. Setup MongoDB server
  12. Available metadata
  13. ==================
  14. .. contents::
  15. :local:
  16. ``metadata.mongodb.server.single``
  17. ----------------------------------
  18. Single-node MongoDB setup
  19. ``metadata.mongodb.server.cluster``
  20. -----------------------------------
  21. Clustered MongoDB setup
  22. Configuration parameters
  23. ========================
  24. Example reclass
  25. ===============
  26. Setup MongoDB with database for ceilometer.
  27. .. code-block:: yaml
  28. classes:
  29. - service.mongodb.server.cluster
  30. parameters:
  31. _param:
  32. mongodb_server_replica_set: ceilometer
  33. mongodb_ceilometer_password: cloudlab
  34. mongodb_admin_password: cloudlab
  35. mongodb_shared_key: xxx
  36. mongodb:
  37. server:
  38. database:
  39. ceilometer:
  40. enabled: true
  41. password: ${_param:mongodb_ceilometer_password}
  42. users:
  43. - name: ceilometer
  44. password: ${_param:mongodb_ceilometer_password}
  45. Sample pillars
  46. ==============
  47. Simple single server
  48. .. code-block:: yaml
  49. mongodb:
  50. server:
  51. enabled: true
  52. bind:
  53. address: 0.0.0.0
  54. port: 27017
  55. admin:
  56. username: admin
  57. password: magicunicorn
  58. database:
  59. dbname:
  60. enabled: true
  61. encoding: 'utf8'
  62. users:
  63. - name: 'username'
  64. password: 'password'
  65. Cluster of 3 nodes
  66. .. code-block:: yaml
  67. mongodb:
  68. server:
  69. enabled: true
  70. logging:
  71. verbose: false
  72. logLevel: 1
  73. oplogLevel: 0
  74. admin:
  75. user: admin
  76. password: magicunicorn
  77. master: mongo01
  78. members:
  79. - host: 192.168.1.11
  80. priority: 2
  81. - host: 192.168.1.12
  82. - host: 192.168.1.13
  83. replica_set: default
  84. shared_key: magicunicorn
  85. It's possible that first Salt run on master node won't pass correctly before
  86. all slave nodes are up and ready.
  87. Simply run salt again on master node to setup cluster, databases and users.
  88. To check cluster status, execute following:
  89. .. code-block:: bash
  90. mongo 127.0.0.1:27017/admin -u admin -p magicunicorn --eval "rs.status()"
  91. Read more
  92. =========
  93. * http://docs.mongodb.org/manual/
  94. * http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
  95. * https://www.linode.com/docs/databases/mongodb/creating-a-mongodb-replication-set-on-ubuntu-12-04-precise
  96. Documentation and Bugs
  97. ======================
  98. To learn how to install and update salt-formulas, consult the documentation
  99. available online at:
  100. http://salt-formulas.readthedocs.io/
  101. In the unfortunate event that bugs are discovered, they should be reported to
  102. the appropriate issue tracker. Use Github issue tracker for specific salt
  103. formula:
  104. https://github.com/salt-formulas/salt-formula-mongodb/issues
  105. For feature requests, bug reports or blueprints affecting entire ecosystem,
  106. use Launchpad salt-formulas project:
  107. https://launchpad.net/salt-formulas
  108. You can also join salt-formulas-users team and subscribe to mailing list:
  109. https://launchpad.net/~salt-formulas-users
  110. Developers wishing to work on the salt-formulas projects should always base
  111. their work on master branch and submit pull request against specific formula.
  112. https://github.com/salt-formulas/salt-formula-mongodb
  113. Any questions or feedback is always welcome so feel free to join our IRC
  114. channel:
  115. #salt-formulas @ irc.freenode.net