Skip to content

Commit

Permalink
DOC: Add tutorial: how to setup devel environment
Browse files Browse the repository at this point in the history
I find out that this cannot be just a generic tutorial in framework
as in case of leapp-repository people needs to register the upgrade
repositories explicitely. So let's do it in this way.
  • Loading branch information
pirat89 committed Feb 14, 2025
1 parent a0fa1d9 commit a7674d6
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/source/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ Tutorials

Tutorials here are focused on In-Place Upgrades with leapp repositories
covered by the `leapp-repository <https://github.com/oamg/leapp-repository>`_ project.
Therefore the main focus of these tutorials is to provide information how to
write leapp actors for **In-Place Upgrades (IPU)** with the leapp framework.

.. note::
These tutorials are under reconstruction and we will be glad for a feedback.
Feel free to contact us via `GH discussion <https://github.com/oamg/leapp-repository/discussions>`_
in our upstream project.


.. toctree::
:maxdepth: 4
:caption: Contents:
:glob:

setup-devel-env
howto-first-actor-upgrade
custom-content
templates/index
Expand Down
50 changes: 50 additions & 0 deletions docs/source/tutorials/setup-devel-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# How to setup the development environment

To ensure you can follow the other guidelines, here we are adding tips how
to prepare your development environment.

## Clone official leapp repositories for IPU

If you are creating your custom content for IPU or want to contribute to the
upstream leapp-repository project, most likely you will want to have the
repository cloned to be able to
* get insipration from existing content
* search what you could use from the prepared content (shared libraries,
existing models, ...)
* etc.

Simply clone the [official upstream repository](https://github.com/oamg/leapp-repository) using Git:
```shell
git clone [email protected]:oamg/leapp-repository.git
```

In case you want to contribute to the upstream project, [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).

## Install snactor
Simply follow instructions in the leapp tutorials [here](https://leapp.readthedocs.io/en/latest/devenv-install.html)

## Register IPU repositories in snactor

By default, repositories on your system are not registered for snactor unless
you created them on your system with snactor directly. So typically `snactor`
commands working with existing repositories does not work correctly. To register
all wanted repositories, go to the cloned leapp-repository repository and make
snactor to search all repos:
```shell
snactor repo find --path repos/
```

This will register all leapp repositories in the project. You can list all
registered repositories with snactor using: `snactor repo list`.

The configuration file with registered repositories is by default here: `~/.config/leapp/repos.json`

```{warning}
If you are on system with installed `leapp-upgrade-*` RPMs and you register
the upgrade repositories from installed packages using `snactor`, it's possible it will
not be the best idea to register also repositories from the cloned Git repository.
In such a case we suggest to use different config files when trying
to work with snactor in one or the other set of repositories. See the `--config`
option. You can also always clear the file and re-register repositories you
want again.
```

0 comments on commit a7674d6

Please sign in to comment.