Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 193337a

Browse files
feat: bootstrap fleet-server for the deployment of regular elastic-agents (#1078)
* chore: provide a fleet-server base image based on centos/debian with systemd * WIP * fix: remove duplicated fields after merge conflicts * fix: update method call after merge conflicts * chore: extract service name calculation to a method * chore: extract container name calculation to a method * chore: refactor get container name method * chore: refactor method even more * chore: use installer state to retrieve container name * chore: use installer when calculating service name * fix: adapt service names for fleet server * chore: enrich log when creating an installer * fix: use fleet server host when creating fleet config * fix: use https when connecting to fleet-server It's creating its own self-signed certs * feat: bootstrap a fleet server before a regular agent is deployed to fleet It will define the server host to be used when enrolling agents * fix: use fleet policy for agents, not the server one * fix: get different installers for fleet-server and agents * fix: use the old step for deploying regular agents * chore: rename variable with consistent name * chore: rename fleet-server scenario * fix: use proper container name for standalone mode * chore: save two variables * chore: rename standalone scenario for bootstrapping fleet-server * chore: rename bootstrap methods * chore: encapsulate bootstrap fleet-server logic * Update fleet.go * chore: remove Fleet Server CI parallel execution * chore: remove feature file for fleet-server * chore: boostrap fleet server only once We want to have it bootstrapped for the entire test suite, not for each scenario * fix: an agent was needed when adding integrations Co-authored-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
1 parent 6873757 commit 193337a

14 files changed

Lines changed: 179 additions & 113 deletions

File tree

.ci/.e2e-tests.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ SUITES:
1717
- name: "Fleet"
1818
pullRequestFilter: " && ~debian"
1919
tags: "fleet_mode_agent"
20-
- name: "Fleet Server"
21-
pullRequestFilter: " && ~debian"
22-
tags: "fleet_server"
2320
- name: "Endpoint Integration"
2421
pullRequestFilter: " && ~debian"
2522
tags: "agent_endpoint_integration"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2.4'
2+
services:
3+
fleet-server-centos:
4+
image: centos/systemd:${fleet_server_centosTag:-latest}
5+
container_name: ${fleet_server_centosContainerName}
6+
entrypoint: "/usr/sbin/init"
7+
privileged: true
8+
volumes:
9+
- ${fleet_server_centosAgentBinarySrcPath:-.}:${fleet_server_centosAgentBinaryTargetPath:-/tmp}
10+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2.4'
2+
services:
3+
fleet-server-debian:
4+
image: alehaa/debian-systemd:${fleet_server_debianTag:-stretch}
5+
container_name: ${fleet_server_debianContainerName}
6+
entrypoint: "/sbin/init"
7+
privileged: true
8+
volumes:
9+
- ${fleet_server_debianAgentBinarySrcPath:-.}:${fleet_server_debianAgentBinaryTargetPath:-/tmp}
10+
- /sys/fs/cgroup:/sys/fs/cgroup:ro

e2e/_suites/fleet/features/fleet_server.feature

Lines changed: 0 additions & 19 deletions
This file was deleted.

e2e/_suites/fleet/features/stand_alone_agent.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Examples: Ubi8
5151
| image |
5252
| ubi8 |
5353

54-
@run_fleet_server
55-
Scenario Outline: Deploying a <image> stand-alone agent with fleet server mode
54+
@bootstrap-fleet-server
55+
Scenario Outline: Bootstrapping Fleet Server from a <image> stand-alone Elastic Agent
5656
When a "<image>" stand-alone agent is deployed with fleet server mode
5757
Then the stand-alone agent is listed in Fleet as "online"
5858

0 commit comments

Comments
 (0)