I’m jumping onto the EDA band wagon. I’ve authored some fairly simple runbooks and a couple of custom event source plugins and all works well on the command-line via ansible-runbook. So now I want a server to do this (much like I have an AWX server for scheduled playbook runs).
I found the eda-server-operator project, which seems to function much like the awx-operator project. Using it, I was able to deploy EDA to my existing K8S cluster that runs AWX…nice!
I can login to the GUI and I’ve created various Credentials (for accessing git-based projects and Decision Environment images). I created a couple of Projects (using a credential) and the project successfully “syncs”. I also created a Decision Environment (I assume that is pulled when an activation is triggered?).
Now the last part (the one that isn’t working). I’m trying to create my first Activation. I specify various details, choose the project, etc. There is a drop-down list to pick the rulebook to use (assuming the rulebook comes from the imported Project). However this drop-down is always empty for me. Also, unlike AWX where there was a drop-down with free-form text, there is no free-form text for me to specify which rulebook to use (manually) for this activation.
If I look at the logs of the “default workers” running in the cluster at Project import/sync time, I can see messages like this:
The “Task started” / “Task complete” messages happen in under a second, which makes me think something is wrong or being skipped in the import/sync process (just cloning a repo could take a second). Alas, I don’t see anywhere else in the code where logging would show me anything nor do I know how to turn up the logging level.
I fully understand that EDA operator and various sub components (eda-server, eda-ui, etc.) are probably still alpha/beta at this time. Just thought I’d share some feedback, solicit some help, and see if I can help further my understanding and the project itself.
I can’t reproduce your issue on my side with the following fresh setup:
This is my log from my default worker:
2023-10-26 11:50:59,276 INFO default: aap_eda.tasks.project.import_project(project_id=1) (eb64b02f-fb1d-4ddc-9720-57b531876180)
2023-10-26 11:50:59,287 INFO Task started: Import project ( project_id=1 )
2023-10-26 11:51:00,118 INFO Task complete: Import project ( project_id=1 )
2023-10-26 11:51:00,120 INFO default: Job OK (eb64b02f-fb1d-4ddc-9720-57b531876180)
2023-10-26 11:51:00,120 INFO Result is kept for 500 seconds
Could you test with my example repository that contains two rulebooks?: https://github.com/kurokobo/awx-on-k3s
Also, try super-reloading (Shift + F5) on the page to add rulebook activations, or using incognito tab.
Interesting. I mirrored your repo over to my private GitLab instance and imported it into EDA and I can, in fact, see your two rulebooks available for activations. The one glaring difference I see immediately is that you’ve suffixed your files as *.yaml whereas I always use *.yml. Is there any content inspection done on the EDA side to see that the content of the rulebook is “valid”?
Alright, I figured it out. Because I had both of these paths in my repo:
And because #1 was empty, the project import must have skipped #2 given the presence of #1. Seems these paths are mutually exclusive (one OR the other, but not both).
I was using this repo to both develop a custom EDA source plugin and to have some rulebooks for testing (all worked great on the command line). Later I moved my custom source plugins into an Ansible collection (tested with the FQCN of the plugin on the command-line and that worked too). Now that collection is in my custom Decision Environment, so I probably should have cleaned out the extensions folder altogether.
Might be worth updating docs to account for this behavior or support discovery of rulebooks from both directories.