Saltstack Official Nginx Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.rst 3.8KB

11 anos atrás
7 anos atrás
7 anos atrás
7 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. =====
  2. nginx
  3. =====
  4. Install nginx either by source or by package.
  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. Available states
  9. ================
  10. .. contents::
  11. :local:
  12. ``nginx``
  13. ---------
  14. Runs the states to install nginx, configure the common files, and the users.
  15. ``nginx.common``
  16. ----------------
  17. Ensures standard nginx files are in place, and configures enabled sites.
  18. ``nginx.luajit2``
  19. -----------------
  20. Installs luajit.
  21. ``nginx.openresty``
  22. -------------------
  23. Installs openresty.
  24. ``nginx.package``
  25. -----------------
  26. Installs the nginx package via package manager.
  27. ``nginx.source``
  28. ----------------
  29. Installs nginx via the source files.
  30. ``nginx.users``
  31. ---------------
  32. Installs apache utils, and configures nginx users specified in the pillar.
  33. This requires `basicauth <https://github.com/saltstack/salt-contrib/blob/master/modules/basicauth.py>`_
  34. from `salt-contrib <https://github.com/saltstack/salt-contrib/>`_ (either add it to your salt or ship
  35. this single file in your `_modules` directory see `Dynamic Module Distribution
  36. <https://docs.saltstack.com/en/latest/ref/file_server/dynamic-modules.html>`_
  37. Next-generation, alternate approach
  38. ===================================
  39. The following states provide an alternate approach to managing Nginx and Nginx
  40. servers, as well as code organization. Please provide feedback by filing issues,
  41. discussing in ``#salt`` in Freenode and the mailing list as normal.
  42. .. contents::
  43. :local:
  44. ``nginx.ng``
  45. ------------
  46. Meta-state for inclusion of all ng states.
  47. **Note:** nginx.ng requires the merge parameter of salt.modules.pillar.get(),
  48. first available in the Helium release.
  49. ``nginx.ng.pkg``
  50. --------------------
  51. Installs nginx from package, from the distribution repositories, the official nginx repo or the ppa from Launchpad.
  52. ``nginx.ng.src``
  53. --------------------
  54. Builds and installs nginx from source.
  55. ``nginx.ng.config``
  56. -------------------
  57. Manages the nginx main server configuration file.
  58. ``nginx.ng.service``
  59. --------------------
  60. Manages the startup and running state of the nginx service.
  61. ``nginx.ng.servers_config``
  62. --------------------------
  63. Manages virtual host files. This state only manages the content of the files
  64. and does not bind them to service calls.
  65. ``nginx.ng.servers``
  66. -------------------
  67. Manages nginx virtual hosts files and binds them to service calls.
  68. ``nginx.ng.passenger``
  69. ----------------------
  70. Installs and configures Phusion Passenger module for nginx. You need to enable
  71. the upstream phusion passenger repository with `install_from_phusionpassenger: true`.
  72. Nginx will also be installed from that repository, as it needs to be modified to
  73. allow the passenger module to work.
  74. Running Tests
  75. =============
  76. This test runner was implemented using the formula-test-harness_ project.
  77. Tests will be run on the following base images:
  78. * ``simplyadrian/allsalt:centos_master_2017.7.2``
  79. * ``simplyadrian/allsalt:debian_master_2017.7.2``
  80. * ``simplyadrian/allsalt:opensuse_master_2017.7.2``
  81. * ``simplyadrian/allsalt:ubuntu_master_2016.11.3``
  82. * ``simplyadrian/allsalt:ubuntu_master_2017.7.2``
  83. Local Setup
  84. -----------
  85. .. code-block:: shell
  86. pip install -U virtualenv
  87. virtualenv .venv
  88. source .venv/bin/activate
  89. make setup
  90. Run tests
  91. ---------
  92. * ``make test-centos_master_2017.7.2``
  93. * ``make test-debian_master_2017.7.2``
  94. * ``make test-opensuse_master_2017.7.2``
  95. * ``make test-ubuntu_master_2016.11.3``
  96. * ``make test-ubuntu_master_2017.7.2``
  97. Run Containers
  98. --------------
  99. * ``make local-centos_master_2017.7.2``
  100. * ``make local-debian_master_2017.7.2``
  101. * ``make local-opensuse_master_2017.7.2``
  102. * ``make local-ubuntu_master_2016.11.3``
  103. * ``make local-ubuntu_master_2017.7.2``
  104. .. _formula-test-harness: https://github.com/intuitivetechnologygroup/formula-test-harness