On Oct 21, Maciej Delmanowski wrote:
Yesterday the number of pending DebOps pull requests on GitHub
reached 0.
Therefore, today I merged the current code from most of the DebOps roles and
some other repositories. The new repository is available at:
https://github.com/debops/debops.git
The repository contains code from the 'master' branch of most of the DebOps
roles as of 2017-10-21. This repository should now be considered as a base
DebOps repository, and all changes to the existing roles, or any new roles
and other code, should be directed to it.
Existing DebOps repositories ('debops-tools', Ansible roles, documentation,
etc.) haven't been changed and they are still available. The 'debops'
scripts
installed from PyPI will still use the old repositories to install DebOps; the
same goes with installing individual roles via Ansible Galaxy.
As a followup, I just released a new version of the 'debops-tools' package on
PyPI. The 0.6.0 version will now install or update the DebOps monorepo
directly, instead of installing the 'debops-playbooks' repository and all
roles based on it. The monorepo will be installed in:
~/.local/share/debops/debops/
directory (a bit awkward, perhaps it will be changed later).
The old 'debops-playbooks' and its roles are not changed if they are present,
but they won't be installed by the 'debops-update' script anymore. The
'debops' command will use both the DebOps monorepo roles/playbooks and, if
they are detected, the old 'debops-playbooks' roles and playbooks.
To make this release work I had to export the 'lib/debops-tools/' directory to
a separate git repository, so that the download URL from GitHub would be
valid. I used the instructions from
https://ariya.io/2014/07/extracting-parts-of-git-repository-and-keeping-t...
and it worked out pretty well - I didn't have to move the files to the root of
the repository by hand, git commit history was recreated from scratch, however
GPG signatures of the commits were not preserved, as expected. For now,
I rebased the changes on top of existing 'debops-tools' repository, however in
the future I might just do a force push to replace the current contents of the
repository on GitHub with the new ones; I'm still experimenting with the
process.
In the future I'll probably use the same method, automated, to export the
Ansible roles to their own repositories. After an export the script will add
and commit a set of standardized files like LICENSE, README, etc. so that they
don't have to be duplicated across all of the roles in the monorepo. The code
in the exported repositories won't be signed by me - perhaps a separate set of
GPG keys used by a bot and signed by me will be set up to provide some kind of
authentication by proxy for the exported repositories.
Additionally, the monorepo now has a working Travis-CI configuration,
.gitignore, a Makefile, and debops-tools scripts are tested via Python nose2
test suite, as well as pycodestyle which will be enabled for the entire
repository when all errors are cleaned up.
At the moment the 'debops-tools' tests are in the subdirectory alongside the
scripts and this layout can be tested from the root of the repository via
a Makefile. I wonder if the tests for each Ansible role should be put
alongside the roles themselves, or I should put all test code in the tests/
directory at the repository root. Having the tests alongside roles could be
useful when they are exported, and Travis could test them separately that way
just how it's done now... I suppose that the monorepo test suite can just cd
into each role, perform the tests and cd back, it would be more convoluted but
perhaps worth it?
Anyway, work on the DebOps roles and playbooks can be resumed now, since the
changes will be available after an update. If you have any pending changes to
roles, bring them in. :-) I'll be looking into setting up the 'docs/'
directory and ReadTheDocs deployment next.
Cheers,
Maciej