Skip to content

Commit

Permalink
Merge branch 'main' into feature/crt_passphrase_check
Browse files Browse the repository at this point in the history
  • Loading branch information
danopt authored Dec 4, 2023
2 parents 69ac901 + 4077a85 commit 3b538d2
Show file tree
Hide file tree
Showing 36 changed files with 234 additions and 94 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_full_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 2
matrix:
distro:
- rockylinux8
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1

steps:
- name: Check out code
Expand Down Expand Up @@ -111,7 +110,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1
matrix:
python_version: [ 3.5.10, 3.6.15, 3.7.13, 3.8.16, 3.10.10 ]

Expand Down Expand Up @@ -151,7 +149,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1
matrix:
ansible_core_version: [ 2.11.12, 2.12.10, 2.13.8, 2.14.4 ]

Expand Down Expand Up @@ -191,7 +188,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1
matrix:
python_cryptography_version: [ 2.5, 3.0, 3.1, 3.2, 3.3, 3.4, 35.0.0, 36.0.0, 38.0.0, 40.0.1]

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_role_beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 4
matrix:
distro: [ubuntu2204]
scenario: [beats_default, beats_peculiar]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_role_elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 4
matrix:
distro: [ubuntu2204]
scenario:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_role_kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 4
matrix:
distro: [ubuntu2204]
scenario: [kibana_default]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_role_logstash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 4
matrix:
distro: [ubuntu2204]
scenario:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_role_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 4
matrix:

distro: [centos7, debian10, debian11, rockylinux8, rockylinux9, ubuntu2004, ubuntu2204]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_roles_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

strategy:
fail-fast: false
max-parallel: 2
matrix:
distro:
- rockylinux8
Expand Down
4 changes: 2 additions & 2 deletions molecule/beats_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependency:
driver:
name: docker
platforms:
- name: beats_default_${MOLECULE_DISTRO:-centos7}
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
- name: beats_default_${MOLECULE_DISTRO:-debian11}
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
4 changes: 2 additions & 2 deletions molecule/beats_peculiar/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependency:
driver:
name: docker
platforms:
- name: beats_peculiar_${MOLECULE_DISTRO:-centos7}
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
- name: beats_peculiar_${MOLECULE_DISTRO:-debian11}
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
4 changes: 2 additions & 2 deletions molecule/elasticsearch_cluster-oss/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platforms:
- name: elasticsearch-cluster1
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -19,7 +19,7 @@ platforms:
- name: elasticsearch-cluster2
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
1 change: 1 addition & 0 deletions molecule/elasticsearch_default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
elasticsearch_disable_systemcallfilterchecks: true
elasticstack_release: "{{ lookup('env', 'ELASTIC_RELEASE') | int}}"
elasticsearch_heap: "1"
elasticstack_no_log: false
tasks:
- name: Include Elastics repos role
ansible.builtin.include_role:
Expand Down
4 changes: 2 additions & 2 deletions molecule/elasticsearch_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platforms:
- name: elasticsearch_default1
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -19,7 +19,7 @@ platforms:
- name: elasticsearch_default2
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
4 changes: 2 additions & 2 deletions molecule/elasticsearch_no-security/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platforms:
- name: elasticsearch-nosecurity1
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -19,7 +19,7 @@ platforms:
- name: elasticsearch-nosecurity2
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
6 changes: 3 additions & 3 deletions molecule/elasticsearch_roles_calculation/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platforms:
- name: elasticsearch-cluster1
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -19,7 +19,7 @@ platforms:
- name: elasticsearch-cluster2
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -29,7 +29,7 @@ platforms:
- name: elasticsearch-cluster3
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
3 changes: 2 additions & 1 deletion molecule/elasticstack_default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
vars:
elasticsearch_jna_workaround: true
elasticsearch_disable_systemcallfilterchecks: true
elasticsearch_monitoring_enabled: false
elasticstack_release: "{{ lookup('env', 'ELASTIC_RELEASE') | int}}"
elasticsearch_heap: "1"
elasticsearch_heap: "2"
elasticstack_full_stack: true
elasticstack_no_log: false
logstash_pipeline_unsafe_shutdown: true
Expand Down
6 changes: 2 additions & 4 deletions molecule/elasticstack_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ platforms:
groups:
- beats
- logstash
- kibana
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand All @@ -22,10 +21,9 @@ platforms:
- name: "elasticstack${ELASTIC_RELEASE}-cluster2-${MOLECULE_DISTRO}"
groups:
- beats
- logstash
- kibana
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
78 changes: 41 additions & 37 deletions molecule/elasticstack_default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,46 @@
msg: "Elasticsearch received {{ logstash_count.stdout }} events so far"
when: "'elasticsearch' in group_names"

- name: fetch kibana.yml
ansible.builtin.command: cat /etc/kibana/kibana.yml
register: kibanayml

- name: Show kibana.yml
ansible.builtin.debug:
var: kibanayml.stdout_lines

- name: Check for Kibana port
ansible.builtin.wait_for:
port: 5601
timeout: 120

- name: Connect to Kibana
ansible.builtin.command:
curl
-s
-u elastic:{{ elastic_pass.stdout }}
http://{{ ansible_hostname }}:5601/api/status
register: curl_out
failed_when:
- "'green' not in curl_out.stdout"
- "'Elasticsearch is available' not in curl_out.stdout"

# The following might be nicer but doesn't work
#- name: Connect to Kibana
# ansible.builtin.uri:
# url: http://ansible-role-kibana_full_stack:5601/api/status
# user: elastic
# password: "{{ elastic_password.stdout }}"
# return_content: yes
# register: kibana_status
# #failed_when: "'"title": "Green"' not in kibana_status.content"
# failed_when: "'Green' not in kibana_status.content"

- name: Health check
- name: Run Kibana checks
when: "'kibana' in group_names"
block:

- name: Fetch kibana.yml
ansible.builtin.command: cat /etc/kibana/kibana.yml
register: kibanayml

- name: Show kibana.yml
ansible.builtin.debug:
var: kibanayml.stdout_lines

- name: Check for Kibana port
ansible.builtin.wait_for:
port: 5601
timeout: 120

- name: Connect to Kibana
ansible.builtin.command:
curl
-s
-u elastic:{{ elastic_pass.stdout }}
http://{{ ansible_hostname }}:5601/api/status
register: curl_out
failed_when:
- "'green' not in curl_out.stdout"
- "'Elasticsearch is available' not in curl_out.stdout"

# The following might be nicer but doesn't work
#- name: Connect to Kibana
# ansible.builtin.uri:
# url: http://ansible-role-kibana_full_stack:5601/api/status
# user: elastic
# password: "{{ elastic_password.stdout }}"
# return_content: yes
# register: kibana_status
# #failed_when: "'"title": "Green"' not in kibana_status.content"
# failed_when: "'Green' not in kibana_status.content"

- name: Elasticsearch health check
ansible.builtin.uri:
url: https://localhost:{{ elasticstack_elasticsearch_http_port }}/_cluster/health
method: GET
Expand All @@ -110,7 +114,7 @@
delay: 10
when: groups['elasticsearch'] | length > 1

- name: Node check
- name: Elasticsearch Node check
ansible.builtin.uri:
url: https://localhost:{{ elasticstack_elasticsearch_http_port }}/_cat/nodes
method: GET
Expand Down
2 changes: 1 addition & 1 deletion molecule/kibana_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ driver:
name: docker
platforms:
- name: kibana_default
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/logstash_full_stack-oss/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
- elasticsearch
- logstash
- filebeat
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/logstash_pipelines/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ driver:
name: docker
platforms:
- name: ansible-role-logstash_pipelines
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/logstash_specific_version/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ driver:
name: docker
platforms:
- name: elasticstack_version
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/repos_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ driver:
name: docker
platforms:
- name: elastic-repos-default
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
2 changes: 1 addition & 1 deletion molecule/repos_oss/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ driver:
name: docker
platforms:
- name: elastic-repos-default-oss
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
Loading

0 comments on commit 3b538d2

Please sign in to comment.