diff --git a/README.md b/README.md index 94ccd94..47ddd52 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,41 @@ input files. - For for the old version [switch to the master branch](https://github.com/adfinis/pyaptly/tree/master) - Main branch builds contain [alpha packages](https://github.com/adfinis/pyaptly/actions/runs/8147002919), see Artifacts -# Debugging +## Example commands -The most interesting mode for users is not `--debug` but `--info` which show all commands executed. +Initialize a new aptly server. + +```shell +pyaptly -c mirrors.toml mirror create +pyaptly -c mirrors.toml mirror update +pyaptly -c mirrors.toml snapshot create +pyaptly -c mirrors.toml publish create +``` + +Update mirrors and snapshots and switch publish endpoints with ```automatic- +update: true``` to the new snapshots. + +```shell +pyaptly -c mirrors.toml mirror update +pyaptly -c mirrors.toml snapshot create +pyaptly -c mirrors.toml publish create +pyaptly -c mirrors.toml publish update +``` + +Manually trigger a switch to the new snapshots for the publish endpoint +ubuntu/stable. + +```shell +pyaptly -c mirrors.toml publish update ubuntu/stable +``` + +## Debugging + +The most interesting mode for users is not `--debug` but `--info` which shows +all commands executed. ```bash -# pyaptly legacy -- --info --config pyaptly/tests/repo.toml repo create +> pyaptly legacy -- --info --config pyaptly/tests/repo.toml repo create Command call cmd: gpg --no-default-keyring --keyring trustedkeys.gpg --list-keys --with-colons -> 0 stdout: 'tru::1:1709575833:0:3:1:5 @@ -42,4 +71,5 @@ Command call You can run 'aptly repo add centrify ...' to add packages to repository.' ``` -Commands that fail are always displayed in red on a tty, but actually only happen if something is broken. +Commands that fail are always displayed in red on a tty, but that actually only +happens if something is broken. diff --git a/README.rst b/README.rst deleted file mode 100644 index 55a58d2..0000000 --- a/README.rst +++ /dev/null @@ -1,112 +0,0 @@ -======= -Pyaptly -======= - -Automates the creation and managment of aptly mirrors and snapshots based on toml -input files. - -|pypi| |travis| |coverage| [1]_ - -.. |pypi| image:: https://badge.fury.io/py/Pyaptly.svg - :target: https://badge.fury.io/py/Pyaptly -.. |travis| image:: https://travis-ci.org/adfinis-sygroup/pyaptly.png?branch=master - :target: https://travis-ci.org/adfinis-sygroup/pyaptly -.. |coverage| image:: https://img.shields.io/badge/coverage-100%25-brightgreen.svg - -`Read the Docs`_ - -.. _`Read the Docs`: https://docs.adfinis-sygroup.ch/public/pyaptly/ - -.. [1] Coverage enforced by tests (on travis) - -Example commands ----------------- - -Initialize a new aptly server. - -.. code:: shell - - pyaptly -c mirrors.yml mirror create - pyaptly -c mirrors.yml mirror update - pyaptly -c mirrors.yml snapshot create - pyaptly -c mirrors.yml publish create - -Update mirrors and snapshots and switch publish endpoints with -``automatic-update: true`` to the new snapshots. - -.. code:: shell - - pyaptly -c mirrors.yml mirror update - pyaptly -c mirrors.yml snapshot create - pyaptly -c mirrors.yml publish create - pyaptly -c mirrors.yml publish update - -Manually trigger a switch to the new snapshots for the publish endpoint -ubuntu/stable. - -.. code:: - - pyaptly -c mirrors.yml publish update ubuntu/stable - -Install Debian/Ubuntu -===================== - -Sources: - -.. code-block:: text - - deb http://aptly.adfinis-sygroup.ch/adsy-public/debian wheezy main - - deb http://aptly.adfinis-sygroup.ch/adsy-public/debian jessie main - - deb http://aptly.adfinis-sygroup.ch/adsy-public/ubuntu trusty main - - deb http://aptly.adfinis-sygroup.ch/adsy-public/ubuntu vivid main - - deb http://aptly.adfinis-sygroup.ch/adsy-public/ubuntu xenial main - -Install: - -.. code-block:: bash - - wget -O - http://aptly.adfinis-sygroup.ch/aptly.asc | apt-key add - - apt-get update - apt-get install python-pyaptly - -Testing -------- - -Automatic - -.. code:: shell - - git submodule update --init --recursive - make test-local - -Manual. There is a safety check in tests. They won't work if you don't set -$HOME. - -.. code:: shell - - git submodule update --init --recursive - source testenv - py.test -x - -or - -.. code:: shell - - git submodule update --init --recursive - export HOME="$(pwd)" - export PATH="$HOME/aptly_0.9.6_linux_amd64/:$PATH" - py.test -x - -Vagrant Box ------------ - -The box provisions aptly, nginx and two repos which can be used for tests: - -.. code:: - - aptly mirror create mirro-fakerepo01 http://localhost/fakerepo01 main - aptly mirror create mirro-fakerepo02 http://localhost/fakerepo02 main