Hi, I am working on ticket https://fedorahosted.org/fedora-infrastructure/ticket/4193. So far I have managed to port just the puppet's basic bodhi class. I think that should be basic role for bodhi in ansible. Now I am a little uncertain what to do next. I am not sure how many other roles should create in ansible. The most simple solution would be to have the following roles: - bodhi_base - bodhi_app - bodhi_app_masher - bodhi_proxy - bodhi_app_epelmasher - bodhi_app_masher_jobrunner This is just mapping of puppet's bodhi classes to ansible roles. What I am asking myself is do I really need that many roles? Is it possible to do the job with fewer roles? Could other infra team members share their thoughts with me and help me a little bit?
On Mon, Jan 27, 2014 at 08:44:32PM +0100, Janez Nemanič wrote:
Hi, I am working on ticket https://fedorahosted.org/fedora-infrastructure/ticket/4193. So far I have managed to port just the puppet's basic bodhi class. I think that should be basic role for bodhi in ansible. Now I am a little uncertain what to do next. I am not sure how many other roles should create in ansible. The most simple solution would be to have the following roles:
- bodhi_base
- bodhi_app
- bodhi_app_masher
- bodhi_proxy
- bodhi_app_epelmasher
- bodhi_app_masher_jobrunner
This is just mapping of puppet's bodhi classes to ansible roles. What I am asking myself is do I really need that many roles? Is it possible to do the job with fewer roles? Could other infra team members share their thoughts with me and help me a little bit?
I think its okay. However, I've recently learned that roles can be nested though, which might help with sprawl in our ansible/roles/ directory.
You can, for instance, have:
ansible/roles/bodhi/base ansible/roles/bodhi/app/wsgi ansible/roles/bodhi/app/masher
etc..
I plan to at some point namespace the badges and notifs roles like so:
ansible/roles/badges/frontend ansible/roles/badges/backend ansible/roles/notifs/frontend ansible/roles/notifs/backend
Cheers, and thanks for looking into the bodhi port! -Ralph
Additionally to that, you can pass roles variables...
ie:
roles: - base - { role: bodhi_app, type=epel }
so, you could do one app server and have it use the 'type' variable to differ the epel/fedora versions or the like if it's mostly the same plays just with different config.
Also, you can make roles depend on other roles now... so you could put anything common in a base one and add dependencies on the others.
Also, note that the proxy part is still staying in puppet until we get around to moving the proxies over to ansible.
kevin
infrastructure@lists.fedoraproject.org