Saltstack Official Apt Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README.rst 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. .. _readme:
  2. apt
  3. ===
  4. |img_travis| |img_sr|
  5. .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/apt-formula.svg?branch=master
  6. :alt: Travis CI Build Status
  7. :scale: 100%
  8. :target: https://travis-ci.com/saltstack-formulas/apt-formula
  9. .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
  10. :alt: Semantic Release
  11. :scale: 100%
  12. :target: https://github.com/semantic-release/semantic-release
  13. A formula to configure and manage update, upgrade, and dist-upgrade within apt.
  14. .. contents:: **Table of Contents**
  15. :depth: 1
  16. General notes
  17. -------------
  18. See the full `SaltStack Formulas installation and usage instructions
  19. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
  20. If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
  21. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
  22. If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
  23. which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
  24. See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
  25. Contributing to this repo
  26. -------------------------
  27. **Commit message formatting is significant!!**
  28. Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
  29. Available states
  30. ----------------
  31. .. contents::
  32. :local:
  33. ``apt.dist_upgrade``
  34. ^^^^^^^^^^^^^^^^^^^^
  35. Runs ``apt-get -y dist-upgrade``.
  36. ``apt.update``
  37. ^^^^^^^^^^^^^^
  38. Runs ``apt-get -y update``.
  39. ``apt.upgrade``
  40. ^^^^^^^^^^^^^^^
  41. Runs ``apt-get -y upgrade``.
  42. ``apt.repositories``
  43. ^^^^^^^^^^^^^^^^^^^^
  44. Allows you to configure and manage repositories from pillar. Check ``pillar.example``
  45. to see possible values. If used and no repositories are provided, sane default
  46. values from ``map.jinja`` are used.
  47. Check https://wiki.debian.org/SourcesList for an explanation about the resulting
  48. files structure.
  49. ``apt.apt_conf``
  50. ^^^^^^^^^^^^^^^^^^^
  51. Allows you to manage apt configuration from pillar. Check ``pillar.example`` to see
  52. possible values.
  53. Check https://wiki.debian.org/AptConfiguration#apt.conf and ``man 5 apt.conf`` for
  54. an explanation about the resulting files structure.
  55. ``apt.preferences``
  56. ^^^^^^^^^^^^^^^^^^^
  57. Allows you to configure and manage apt's preferences from pillar. Check
  58. ``pillar.example`` to see possible values.
  59. Check https://wiki.debian.org/AptConfiguration#apt_preferences_.28APT_pinning.29
  60. and ``man 5 apt_preferences`` for an explanation about the resulting files structure.
  61. ``apt.ppa``
  62. ^^^^^^^^^^^
  63. Installs ``python-software-properties``
  64. (``$ /usr/bin/apt-add-repository ppa:user/repository``).
  65. ``apt.unattended``
  66. ^^^^^^^^^^^^^^^^^^
  67. Installs and configures ``unattended-upgrades``
  68. ``apt.transports.debtorrent``
  69. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  70. Installs ``apt-transport-debtorrent``.
  71. ``apt.transports.https``
  72. ^^^^^^^^^^^^^^^^^^^^^^^^
  73. Installs ``apt-transport-https``. **Note that `apt-transport-https` has been deprecated
  74. since Debian 9 and it's now a dummy package**
  75. Testing
  76. -------
  77. Linux testing is done with ``kitchen-salt``.
  78. Requirements
  79. ^^^^^^^^^^^^
  80. * Ruby
  81. * Docker
  82. .. code-block:: bash
  83. $ gem install bundler
  84. $ bundle install
  85. $ bin/kitchen test [platform]
  86. Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
  87. e.g. ``debian-9-2019-2-py3``.
  88. ``bin/kitchen converge``
  89. ^^^^^^^^^^^^^^^^^^^^^^^^
  90. Creates the docker instance and runs the ``apt`` main state, ready for testing.
  91. ``bin/kitchen verify``
  92. ^^^^^^^^^^^^^^^^^^^^^^
  93. Runs the ``inspec`` tests on the actual instance.
  94. ``bin/kitchen destroy``
  95. ^^^^^^^^^^^^^^^^^^^^^^^
  96. Removes the docker instance.
  97. ``bin/kitchen test``
  98. ^^^^^^^^^^^^^^^^^^^^
  99. Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
  100. ``bin/kitchen login``
  101. ^^^^^^^^^^^^^^^^^^^^^
  102. Gives you SSH access to the instance for manual testing.