Skip to content
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

initial minimal working molecule testing suite with circleci #151

Merged
merged 5 commits into from
Apr 15, 2019

Conversation

JJediny
Copy link
Contributor

@JJediny JJediny commented Feb 10, 2019

#138 for discussion

@JJediny
Copy link
Contributor Author

JJediny commented Feb 11, 2019

This is only running the filebeats and wazuh manager and agent playbooks, elasticsearch was excluded due to hardware memory constraints and kibana/logstash due to their check for elasticsearch being reachable.

Current failures of roles based on distro:

Ubuntu 14

   TASK [wazuh/ansible-wazuh-manager : Debian/Ubuntu | Installing Wazuh repository key] ***
    skipping: [centos7]
    skipping: [centos6]
    fatal: [trusty]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for packages.wazuh.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine  (the python executable used (/usr/bin/python) is version: 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4]) or you can install the `urllib3`, `pyOpenSSL`, `ndg-httpsclient`, and `pyasn1` python modules to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure."}
    changed: [xenial]
    changed: [bionic]

Centos 7

    TASK [wazuh/ansible-wazuh-manager : Generate SSL files for authd] **************
    ok: [bionic]
    ok: [centos6]
    ok: [xenial]
    fatal: [centos7]: FAILED! => {"changed": false, "cmd": "openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:1825 -keyout sslmanager.key -out sslmanager.cert -subj /CN=wazuh-server/", "msg": "[Errno 2] No such file or directory", "rc": 2}

Centos 6

    TASK [wazuh/ansible-wazuh-manager : Ensure Wazuh Manager, wazuh API service is started and enabled] ***
    changed: [xenial] => (item=wazuh-manager)
    changed: [centos6] => (item=wazuh-manager)
    changed: [bionic] => (item=wazuh-manager)
    failed: [centos6] (item=wazuh-api) => {"changed": false, "item": "wazuh-api", "msg": "Could not find the requested service wazuh-api: "}
    changed: [xenial] => (item=wazuh-api)
    changed: [bionic] => (item=wazuh-api)

Ubuntu 16/18

    TASK [wazuh/ansible-filebeat : Reload systemd] *********************************
    fatal: [bionic]: FAILED! => {"changed": false, "msg": "Failed to find required executable systemctl in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
    ...ignoring
    fatal: [xenial]: FAILED! => {"changed": false, "msg": "failure 1 during daemon-reload: Failed to connect to bus: No such file or directory\n"}
    ...ignoring

Recap

    PLAY RECAP *********************************************************************
    bionic                     : ok=45   changed=30   unreachable=0    failed=0
    centos6                    : ok=26   changed=14   unreachable=0    failed=1   
    centos7                    : ok=6    changed=4    unreachable=0    failed=1   
    trusty                     : ok=2    changed=1    unreachable=0    failed=1   
    xenial                     : ok=45   changed=30   unreachable=0    failed=0

@JJediny
Copy link
Contributor Author

JJediny commented Feb 12, 2019

I've forked the project and corrected both yamlint and ansible-lint errors: https://github.com/GSA/wazuh-ansible/pulls?q=is%3Apr+is%3Aclosed

@JJediny JJediny changed the title WIP: initial minimal working molecule testing suite with circleci initial minimal working molecule testing suite with circleci Feb 12, 2019
@manuasir manuasir added this to To Review in Wazuh 3.9.x Mar 12, 2019
@manuasir manuasir self-requested a review April 15, 2019 08:59
@manuasir
Copy link
Contributor

Hi @JJediny ,

Thanks for this amazing work, we're currently trying these tests and seem to work great. I have some doubts, I'll open a new revision if that's alright.

Cheers

Copy link
Contributor

@manuasir manuasir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Pipfile.lock and test_default.pyc files are not needed here, right?
Edit: According to this pypa/pipenv#598 (comment), let's keep the Pipfile.lock. I'm manually deleting the *.pyc since it's not convenient to have them in git.
Thanks!

@manuasir manuasir changed the base branch from master to 3.9 April 15, 2019 09:04
@manuasir manuasir mentioned this pull request Apr 15, 2019
@manuasir manuasir merged commit fccc41d into wazuh:3.9 Apr 15, 2019
Wazuh 3.9.x automation moved this from To Review to Done Apr 15, 2019
Wazuh 3.9.x automation moved this from Done to To Review May 21, 2019
Wazuh 3.9.x automation moved this from To Review to Done May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Wazuh 3.9.x
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants