Saltstack Official Apt Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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