-
-
Notifications
You must be signed in to change notification settings - Fork 246
Move to https://github.com/ansible-collections/community.zabbix/issues #341
Comments
Hi @ericsysmin I'm all for it, but I have no idea yet how to proceed with it. |
Hi guys, I was searching for this based on @ericsysmin issue. First of all, I am still a bit confused myself about the whole collection movement as there haven't been any "official" instructions since this post from March. Ansible 2.10 should use some kind of hook to pull all of the collections (that contain modules previously included with Ansible) when being installed. Me with @sky-joker have decided to move zabbix modules from community.general to community.zabbix in order to have some possibilities into the future, like CI not too tightly restricted by upstream and so on. Unfortunately, we are not very active lately due to a limited time available for such activity (at least on my side, but I pressume sky-joker has the same problem). As I see it, we now have mostly a free ruling about the collection, except a few details that should get specified by Ansible (like semantic versioning, releasing on galaxy, etc..). Collections do encourage developers to collect content with the same matter of subject into a single place, so merging your modules with community.zabbix collection would make a sense. This is however accompanied by bundling them all together (single repo for everything). Have you thought about something like this since we last touched the subject in this PR? |
Hi @ericsysmin & @D3DeFi I think it is in the best interest for the Zabbix community that is using Ansible, that everything Zabbix related will be available in 1 place. So, if you @D3DeFi and @sky-joker are the collection maintainers and you agree with it as well, then we should move forward and move the roles to the collection. I'm not sure how to proceed with this one? @ericsysmin has created an example repo like this one https://github.com/ericsysmin/ansible-collection-zabbix/tree/master/roles that might work... or we just move everything.. |
I agree with this here. It would make the most sense, and allow better visibility and allow a single place for everything. @dj-wasabi @D3DeFi If you would like we can do a quick zoom, and build a PR copy all the roles into this repo and go from there? If we really do just move them here, there is no reason to use git submodules like I did in my example. |
Hi, |
Friends don't let friends use git submodules. |
We had a few interactions previously regarding zabbix modules/roles, so this plan is probably a good idea. Take these as just an ideas. I see something like this happening:
#Roles documentation
* [ansible-zabbix-agent](https://repo/blob/master/roles/zabbix-agent/README.md)
* etc...
@ericsysmin, I have no trouble joining zoom call for this, but you can probably expect more questions from me than answers as I am sysadmin rather than developer |
@sky-joker what is your take on @dj-wasabi joining us in the community.zabbix collection with his roles? |
I have done to create a migration project :) https://github.com/ansible-collections/community.zabbix/projects/3 |
I've created a discussion issue for Zabbix roles migration. |
@sky-joker @D3DeFi @dj-wasabi we need to decide when we want to copy the modules in, and we can each do a PR for each one. The migration is fairly straight forward on moving roles to Collections. @sivel has even written some tools to help. https://gist.github.com/sivel/bca2fe56680c76f0eea647f5477dd46b, it was written for Python 3.8 so ensure you have that version of python. |
In ansible-collections/community.zabbix#17 (comment) @ericsysmin asked:
There are two ways manually, or via GitHub issue transfer Manually
GitHub Issue transfer
Unfortunately doing this will break any links people have to the old issues. Given there are at most 13 issues to be moved, I think we are OK to move the issues manually. |
Thank you @ericsysmin for the PR :) Since the master branch will be heavily modified, I think the destination of the Pull Request needs to be a separate development branch instead of the master branch. |
Lets make it as easy and painless as possible. Separate branch is a good idea. As we haven't implemented any branching design for the repo yet, I would say we create a (e.g.
Lets use project created by @sky-joker to lay down a basic road map, something like an overview. I can open the tasks if you agree with the proposed plan. Details as their arise. As of when to migrate these amazing roles. I don't see any blocker to start working on it ASAP. We can create roles-migration branch for you right away. We can probably even make it before ansible 2.10 release if it is not planned to release in the begging of May :) |
I like the plan, my PR was basically a starting ground to help us see what would be needed, etc. If you provide that branch I can start making some PR's to it. I've identified one role however we will have to figure out as it does have role dependencies and zabbix_web uses @geerlingguy's apache and database roles which do not have a collection yet. I am moving a lot of our internal code to use collections and hence why I am trying to help drive this now. Since I am having to move other code to collections to get updated/patched modules, it's only natural. |
Regarding my roles; I am currently postponing moving any of them to collections for two reasons:
Currently roles can't depend on collections, nor is the inverse possible, so in addition to listing any pip/python library requirements that would need to be manually installed, the instructions for using the zabbix role would also need to include a blurb about needing to manually install the One last issue I have with roles-in-collections is that the de facto way you would document a role was to have an overview, examples, and available vars in the README file, which was rendered on Galaxy. With Collections, only the main collection README is rendered, which may be okay for a 1:1 role-to-collection migration (when that becomes possible), but falls apart when you have more than one role in a collection. In that case, it seems we'll be on the hook for rendering documentation somewhere. |
@ericsysmin sorry for the delay, |
@dj-wasabi does information from @geerlingguy somehow affect the decision regarding migration of your zabbix roles to community.zabbix repo? |
@dj-wasabi @D3DeFi We will likely need to do some testing and have a note that users need to run an included galaxy_requirements.yml file or similar that would download the roles since those won't be automatic on collections. I am working on how to migrate Molecule tests over from old role format to collection format, and how the roles should be called. I actually just finished migrating ericsysmin.docker to ericsysmin.docker.docker Collection so that my docker role is supported by Red Hat Automation Hub and Collections design. |
I understand both of his concerns and altough the first one doesn't apply to "my" work ("my" in quotes, because a lot of people have contributed to the roles to make something beautifull on which I can and will not take the credits for), I don't think waiting on 2.7 becoming eol is important for the Zabbix roles. I do think 2.7 is the minimum ansible version configured in the various roles, but we are just talking over 5 roles. @geerlingguy has a bit more than 5 and his userbase is also a bit bigger. 😄 So I don't see it as a huge issue. That is not the case with the 5 Zabbix Roles. So what I can do is:
That is what I would do: any thoughts, ideas, questions or things that I missed that should be done as well? |
@D3DeFi I could help migrate the molecule tests, however, with the new repo how should we configure that? In the past everyone has been using Travis-CI for testing and the .travis.yml file. |
Since community.zabbix uses GitHub Actions, I think it's better to adapt the way we test to GitHub Actions. name: CI
on:
- pull_request
jobs:
(snip)
roles-test:
runs-on: ubuntu-latest
strategy:
matrix:
zabbix_roles:
- "role name1"
- "role name2"
- "role name3"
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/community/zabbix
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: pip install zabbix-api molecule
- name: Install ansible-base
run: pip install git+https://github.com/ansible-collection-migration/ansible-base.git --disable-pip-version-check
- name: Run role test
run: |
cd roles/${{ zabbix_roles }}
molecule --version
ansible --version
molecule test -s ${{ MOLECULE_SENARIO }} This is just an idea, so we'll have to see if it works as it is. |
How do you test against multiple operating systems? Is there a way to do that since installs do differ from one to another. @sky-joker Using GitHub Actions works for me as well, as long as we can keep all the same tests. |
Nevermind, I did find it, you can reference the matrix from outside of the matrix. |
@sky-joker thanks for the suggestion, I am changing my own repo now, apparently the matrix feature here is 10x better than that of Travis-CI as I can do a multi axis matrix easier. |
@sky-joker thanks for stepping in for me and helping @ericsysmin @dj-wasabi your plan sounds good. Btw, we've started to identify steps required for these migrations with @sky-joker in ansible-collections/community.zabbix#16 . Since @sky-joker made a project for this, we might as well use it for you guys as well if you are interested. Feel free to suggest addition, removal or modification for each step as you see fit. I plan to create issues for some of them and can make assignements to who will be responsible for each step if we want (e.g. open PRs for roles can be assigned to @dj-wasabi for example, @ericsysmin can rework CI and so on). Lets say that I will create the issues tomorrow, so if you can state your opinion in the linked discussion until then, that will be perfect. |
Is your feature request related to a problem? Please describe.
Should we decide to move these roles to the collection within the Ansible project?
Describe the solution you'd like
I'd like to see a consolidated option where we can all a single collection for both modules, and roles to handle Zabbix
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: