-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determine the tasks and division of roles required to migration Zabbix roles #16
Comments
Ok, so we now compose some task list here and then move each item as a separate issue/note under this project? Lets start with original skeleton. I am adding a few new tasks, but please feel free to shuffle, change, delete as see fit:
|
I volunteer to open an issue for each task we agree to go with after this discussion. |
yes :) |
@sky-joker @D3DeFi once the PR for the roles are added, I can do the PR on top of that fork that would include the molecule testing, similar to https://github.com/ericsysmin/ansible-collection-system. Looks like I figured out how to do testing for multiple modules etc with molecule |
Ok, I've tried to populate the project with the steps we discussed in this thread. I've also updated my previous comment with tasks list to include references to PR numbers as well. Issues/notes should be addressed from top to bottom as present in the To Do column. Does it make sense to you guys? Edit: I wasn't able to assign neither @dj-wasabi to #20 nor @ericsysmin to #22 |
Thank you so much @D3DeFi for adding the tasks to the project! |
@dj-wasabi, I will work on the CI Tests for the Agent role. I did take a look at the existing molecule test, and was curious where this file was coming from
|
I believe I found a problem caused by the use of Update: it's confirmed. Using the |
Oh, that actually hurts. I've had a brief thought about renaming modules into short names in the past. Since the collection now identifies scope by itself, we no longer need the If we actually decide to do this for both modules and roles, we can release something like Depends on what do you guys think about this. Either changing roles from |
I would say removing it. The collection is already specific to Zabbix thus all the module/roles/plugins etc is Zabbix specific, having a My 2 cents |
Out of the blue, no specific logic behind it. 😄 |
I created all PR's to move the roles to this collection. |
Thanks for the PRs @dj-wasabi ! @ericsysmin have you progressed with CI adjustments? I believe we should start with removing "zabbix-" prefixes and #21 . @sky-joker do we remove "zabbix_" prefixes from modules as well? If yes, I think that at least symlinks |
I think it's a good idea to to remove ---
- name: test
hosts: localhost
gather_facts: no
collections:
- community.zabbix
tasks:
- import_role:
name: host But I have to worry if the other role has the same role name. ---
- name: test
hosts: localhost
gather_facts: no
tasks:
- import_role:
name: community.zabbix.host |
I personally like the 2nd example as it is exactly clear what role will be executed, which if you have multiple collections configured with the 1st example isn't the case. If we document the examples in the roles documentation with the 2nd example, then we can sort of guarantee that it works? |
I agree with the 2nd example as well. We definitely should promote more explicit approach in our documentation to not further confuse users. What I originally meant with my question was what to do with plugins/modules since we already know that we do need to rename roles as confirmed by @ericsysmin in the comment above. As per the Using collections documentation example we have two options here:
- hosts: all
collections:
- community.zabbix
tasks:
- zabbix_host:
server_url: https://zabbix.example.com
... But will create duplicity for word 'zabbix' if used as FQCN: - hosts: all
tasks:
- community.zabbix.zabbix_host:
server_url: https://zabbix.example.com
...
- hosts: all
collections:
- community.zabbix
tasks:
- host:
server_url: https://zabbix.example.com
... But will be prettier with FQCN: - hosts: all
tasks:
- community.zabbix.host:
server_url: https://zabbix.example.com
... Middle ground is to symlink From the blog post a few months back, they suggest dropping the prefixes as it is known from a collection name to which namespace they belong. At the same time I believe that most of the collections will keep the prefixes (e.g. grafana collection repo) for backwards compatibility, but it is essential for me to at least discuss this possibility with modules since we need to handle this with roles no matter what. Btw, there is still possibility to rename roles from |
I went through the other collections in https://github.com/ansible-collection and none of them decided to remove prefixes they were using so far, so we can probably ignore my blabbering in the previous comment. I am starting to think that simply renaming roles to |
I think that is good. For example, if use collections keyword to execute the module. - hosts: all
collections:
- community.zabbix
tasks:
- zabbix_host:
(snip) For example, if use FQCN to execute the module. - hosts: all
tasks:
- community.zabbix.zabbix_host:
(snip) For example, if use collections keyword to execute the role. - hosts: all
collections:
- community.zabbix
tasks:
- import_role:
name: zabbix_host: For example, if use FQCN to execute the role. - hosts: all
tasks:
- import_role:
name: community.zabbix.zabbix_host: I think that's better rename role to |
I ran into issues on testing, we currently molecule does not support the proper installation of roles and collections mixed together yet as part of dependencies. I am working on a solution. |
@D3DeFi @dj-wasabi there's the only roles that should exist would be
I do believe however that modifying the default/vars will create a lot of issues as people may be using higher level vars to fill in those values for example a hosts file providing vars for the host instead of within the playbook which calls that role. https://github.com/ericsysmin/community.zabbix/tree/devel-roles-migration |
@dj-wasabi how were you testing all of this before? it looks like you were deploying the entire Zabbix infrastructure, do we still want to test out an entire infrastructure @D3DeFi I was hoping to test each piece independently not all tied together. |
With the Zabbix Agent I had 3 scenario's for Molecule:
Server + Proxy had 1 scenario, both mysql and postgressql where deployed for CentOS, Ubuntu and Debian; Web had 1 scenario, both mysql and posgresql where deployed, but had to deploy the servers as well. I don't think there was much with the javagateway? |
@ericsysmin I strongly advice against renaming anything from vars/ or defaults/ as this will create a lot of chaos (You've already pointed that out too). I was wondering before if simply renaming roles from roles:
- role: community.zabbix.zabbix_agent
zabbix_agent_server: example I also believe that most of the users will opt for using shorter names with collections:
- community.zabbix @dj-wasabi have you thought about this after my last set of comment in this thread? Or you would still rather go with removing |
Judging from other comments too, I think that it is better for now to at least test each role separately than not at all :) We can always think of how to merge it together later. |
@D3DeFi We could always remove in a later stage the |
I believe we are ready to merge We probably should address #77 before the merge tho. I have enough of documentation for today, so volunteers are welcome :) |
I am closing this issue as it is no longer used for any communication regarding migration of zabbix roles (which was successfully done, good job everyone!) and any follow up tasks have their separate issues open |
PURPOSE
In this here, we would like to identify the tasks and division of roles required for the below role migration.
The text was updated successfully, but these errors were encountered: