Skip to content

Commit

Permalink
feat(agent_install): only install required packages [SMAGENT-6558] (#465
Browse files Browse the repository at this point in the history
)

rework the role so to only install the packages required by the
selected driver (and therefore, the respective dependencies).
Also, remove packages which are no longer required by the
selected driver type.

Notice we need to craft a list augmented with the selected
version, if one is present.

Most of the selection logic (namely, based on the version)
resides in the 'agent' filter which is probably far from
ideal but gets the job done.

Side changes to make CI pass on this PR:
* DO NOT delete environment file in case of kmod (otherwise agent 13.1.0 will fail)
* DO NOT RUN tests on Ubuntu 18.04 (due older systemd not accepting non-absolute path for kill --  otherwise agent 13.1.0 will fail)
* execute local forwarder test on EC2 instead of container (due to systemd unit)
  • Loading branch information
iurly authored Apr 19, 2024
1 parent d581653 commit 6a582c2
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 387 deletions.
22 changes: 0 additions & 22 deletions molecule/agent-local-forwarder/Dockerfile.j2

This file was deleted.

1 change: 1 addition & 0 deletions molecule/agent-local-forwarder/converge.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Converge
hosts: all
strategy: free
become: true
roles:
- role: sysdig.agent.agent_install
vars:
Expand Down
202 changes: 0 additions & 202 deletions molecule/agent-local-forwarder/create.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
dependency:
name: galaxy
driver:
name: docker
name: ec2
platforms:
- name: centos-stream8
image: quay.io/centos/centos:stream8
pre_build_image: true
privileged: true
- name: amazon-2023-x86_64
image: ami-05f216df7591e93b1
instance_type: ${INSTANCE_TYPE_X86}
region: ${REGION}
vpc_subnet_id: ${VPC_SUBNET_ID}
provisioner:
name: ansible
playbooks:
create: ../resources/playbooks/create.yml
destroy: ../resources/playbooks/destroy.yml
prepare: ../resources/playbooks/prepare.yml
scenario:
create_sequence:
- create
Expand Down
35 changes: 0 additions & 35 deletions molecule/agent-local-forwarder/tasks/create_network.yml

This file was deleted.

13 changes: 0 additions & 13 deletions molecule/agent-local-forwarder/tasks/delete_network.yml

This file was deleted.

5 changes: 3 additions & 2 deletions molecule/agent-local-forwarder/tests/test_local_forwarder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
def test_forwarder_emitter(host):
f = host.file("/opt/draios/logs/draios.log")
assert f.contains("local forwarder enabled: true")
with host.sudo():
f = host.file("/opt/draios/logs/draios.log")
assert f.contains("local forwarder enabled: true")
68 changes: 0 additions & 68 deletions molecule/agent-local-forwarder/validate-dockerfile.yml

This file was deleted.

Loading

0 comments on commit 6a582c2

Please sign in to comment.