elastic / elastic/elastic-package

Add variables for FLEET_URL and reuse variables when running system test

Open
#3,228 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

Hi,

We are currently setting the below variables for elastic-package in our environment to a shared remote test cluster, which works well for the pipeline tests.
ELASTIC_PACKAGE_KIBANA_HOST
ELASTIC_PACKAGE_ELASTICSEARCH_USERNAME
ELASTIC_PACKAGE_ELASTICSEARCH_PASSWORD
ELASTIC_PACKAGE_ELASTICSEARCH_HOST
ELASTIC_PACKAGE_ELASTICSEARCH_API_KEY
ELASTIC_PACKAGE_CA_CERT

For the system test, the installation of the policies works, but I noticed 2 issues with this:
- There seems to be a hard requirement for a docker network to be there (which I can overcome by just creating that)
- The elastic-agent container seems to define it's variables in the profile, while in most cases, you'd want the same variables to be reused + also the FLEET variables to be set.

I would propose to:
- remove the hard requirement for a docker network (similar issue as https://github.com/elastic/elastic-package/issues/2359)
- add the FLEET_URL as a variables and reuse all these variables when running the system test for clarity, which should still be in line with creating custom profiles that override the variables if needed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the system-test profile and Docker network setup, then compare how the existing ELASTIC_PACKAGE variables are passed to pipeline tests and the elastic-agent container. The work is done when system tests no longer require a pre-existing Docker network and reuse those variables while also accepting FLEET_URL, without preventing custom profiles from overriding them.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.