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.9KB

8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. =======
  2. icinga2
  3. =======
  4. Icinga2 Formula
  5. .. note::
  6. See the full `Salt Formulas installation and usage instructions
  7. <http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
  8. Features
  9. ========
  10. This formula can install, configure and run Icinga2. Can implement a single server or a cluster.
  11. In cluster mode it is tested for `Local Configuration <http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-client#icinga2-client-configuration-local>`_ scenario. So in this case Saltstack manage the changes of the configurations for each Icinga2 Client
  12. Compatibility
  13. =============
  14. **Saltstack**: 2015.8.8
  15. **Icinga2**: 2.4.8
  16. Available states
  17. ================
  18. .. contents::
  19. :local:
  20. ``icinga2``
  21. -----------
  22. * Configure icinga2 repo
  23. * Install icinga2 package
  24. * Run icinga service
  25. ``icinga2.conf``
  26. ----------------
  27. Configure almost all the options for icinga2 reading information from default values and/or pillar. It uses a wrapper to generate each configuration file programmaticaly reading the data from yaml. The `defaults.yaml <https://github.com/HeyStaks/icinga2-formula/tree/master/icinga2/defaults.yaml>`_ file has all the values for the default configuration of the basic installation for icinga2
  28. ``icinga2.pki``
  29. ---------------
  30. * Install python-m2crypto dependency
  31. * Create base directory for pki
  32. ``icinga2.pki.ca``
  33. ******************
  34. Setup an CA for icinga2 to use. It uses the features of saltstack and the `x509 <https://docs.saltstack.com/en/latest/ref/states/all/salt.states.x509.html#module-salt.states.x509>`_ state module. It exports the CA certificate to the saltstack mine for other nodes to use it
  35. ``icinga2.pki.master``
  36. **********************
  37. Create the master certificate, send it to the CA server to sign it and retrieve the signed certificate to store it. Then it exports the certificate to the mine for other nodes to use it
  38. ``icinga2.pki.node``
  39. ********************
  40. Create the node certificate, send it to the CA server to sign it and retrieve the signed certificate to store it. It also retrieves the master certificate.
  41. ``icinga2.features``
  42. --------------------
  43. Configure and enable features. For now it only manage the *api* feature
  44. ``icinga2.node``
  45. ----------------
  46. * Run pki node
  47. * Run config
  48. * Run features
  49. ``icinga2.master``
  50. ------------------
  51. * Run pki master
  52. * Run config
  53. * Run features
  54. Running
  55. =======
  56. Standalone
  57. ----------
  58. If you want to only install and run icinga with default configs
  59. .. code-block:: bash
  60. salt '*' state.sls icinga2
  61. If you want to only install and run icinga with default configs
  62. .. code-block:: bash
  63. salt '*' state.sls icinga2.config
  64. Cluster
  65. -------
  66. You must first create an orchestration state to run the steps in the proper way. The formula provides an example on `test/salt/orch/icinga2.sls <https://github.com/HeyStaks/icinga2-formula/tree/master/test/salt/orch>`_ and then run
  67. .. code-block:: bash
  68. salt-run state.orch orch.icinga2
  69. The formula make use of saltstack mine functionality to store the certificates of the CA and master servers so you need to configure a couple of mine_functions to use this functionality.
  70. Is also necessary to allow peer communication to allow communication between the minions that will become icinga2 nodes and the CA.
  71. .. code-block:: yaml
  72. peer:
  73. .*:
  74. - x509.sign_remote_certificate
  75. Example pillar files to have the settings necessary for a cluster deployment can be found on the `test/cluster <https://github.com/HeyStaks/icinga2-formula/tree/master/test/cluster>`_ folder
  76. Ideas and future development
  77. ============================
  78. * Implement a proper salt module to communicate with Icinga2. Via CLI and/or API
  79. * Support other modes of Icinga2 clustering manager
  80. * Add configuration for all the features
  81. Template
  82. ========
  83. This formula was created from a cookiecutter template.
  84. See https://github.com/richerve/saltstack-formula-cookiecutter.