-
Notifications
You must be signed in to change notification settings - Fork 196
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
Using Molecule for Wazuh Manager #169
Conversation
Fantastic work @dj-wasabi! Thank you. |
Regarding the 4th check of the description, it's absolutely great if we follow the first idea of having one single scenario and do the design according to it. If you say that it would be less messy, it was the original purpose and this PR is based on it, let's do it 👍 it's still hugely helpful. |
Hi @manuasir I did some thinking about the scenarios and in the end, and I think it helps to have multiple scenarios. Currently the The "2nd" scenario can be executed by starting a single Wazuh Manager (Let say CentOS 7) and the containers for the Wazuh Agents. With this, we can validate if the Agents can be installed properly and also see if they register them self correctly on the Manager. (This is what I did with my Ossec Agent role, so would say this works with Wazuh as well. 😄 ) A 3rd scenario can be created that verifies the installation of the "(b)ELK" related roles. Doing this, each scenario would spinup 5 or 6 containers to do the installation/validation of the roles, which looks more resource friendly when there is one scenario that has 10 containers running (Wazuh Manager and a Wazuh Agent). Also a bit easier to manager when you want to support other operating systems that should be tested/validated with Molecule. (My 2 cents) |
I added a few tests, it verifies the following:
I can add some more files where needed, but didn't want to add everything yet as this would increase the duration a lot. I'm not sure if you have ideas about duration of tests. But we can always add more tests. Due to a bug in the status command, the Testinfra test can not verify yet if the services are running as the command provided an exit code != 0. When that is fixed, then we can remove the commented lines. |
@manuasir Thanks! Will create some new PR's for the test of the roles. Should these also be merged into |
Correct, @dj-wasabi . In principle we're going to merge new features/test to the upcoming Thank you. |
This PR contains the following change(s):
I was able to run a
molecule test
(almost) without any issues. (Occasionally this taskwazuh/ansible-wazuh-manager : CDB Lists
fails, so have to take a look at it.)Some things are still todo and thus this this PR is still Work In Progress:
molecule test
, have to take a look for that;molecule.yml
andplaybook.yml
should be changed as well (As in removal of the group, use the previous names for the containers.)As I made some changes, please take a look. Will remove the😄[WIP]
prefix when I think I'm ready, but don't hesitate to make any comment(s) on this PR.