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

Create different agent per each test execution #1724

Merged
merged 120 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 118 commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
a4fe7b1
Moved k8s elastic agent template to _static folder
mrodm Mar 8, 2024
c505e52
Fix lint warnings
mrodm Mar 8, 2024
4e69a8a
Remove unused parameter
mrodm Mar 8, 2024
33c4619
WIP
mrodm Mar 12, 2024
5e88e06
Add agent per test - PoC
mrodm Mar 12, 2024
bb0f72e
Filter agents by status too
mrodm Mar 12, 2024
8ccfdcd
Use different folder for logs in each agent
mrodm Mar 12, 2024
1cec83f
Remove unused elasticsearch API
mrodm Mar 12, 2024
107d102
Set different hostnames for agents
mrodm Mar 12, 2024
0d04fe6
Add interface checks
mrodm Mar 12, 2024
35d3869
Remove unused function and add interface checks
mrodm Mar 12, 2024
d7fd5dd
Add kubernetes agent deployer
mrodm Mar 13, 2024
11630da
Do not install kubernetes agent in servicedeployer
mrodm Mar 13, 2024
432ca62
Wait for agent hosts set in agentInfo
mrodm Mar 13, 2024
49d296f
Add checks to get the specific agent
mrodm Mar 13, 2024
2a96e93
Set default agent deployer when docker folder is defined
mrodm Mar 13, 2024
0719a32
Add note about possible error if tests are parallelized
mrodm Mar 13, 2024
61fbc4e
Consider terraform scenario as default one too (for agents)
mrodm Mar 13, 2024
c49a10f
Add variants
mrodm Mar 13, 2024
6888784
Add note for running with stages
mrodm Mar 13, 2024
a7043d5
Keep managing previous custom-agent using servicedeployer
mrodm Mar 13, 2024
fa5cca0
Skip temporarily some packages
mrodm Mar 13, 2024
7623c61
Update hostname in custom-agent (service deployer)
mrodm Mar 13, 2024
fb6f13e
Remove unused functions from servicedeployer
mrodm Mar 13, 2024
50ad13d
Check datastream values for agent name
mrodm Mar 13, 2024
81b5023
Add debug message
mrodm Mar 14, 2024
e35c1b5
Use docker custom names for elastic-agent in tests/configuration
mrodm Mar 14, 2024
e4d893e
Example using environment variables
mrodm Mar 14, 2024
92340d9
Use custom shutdown time for service compose teardown
mrodm Mar 14, 2024
95c4b6f
Update hostnames for elastic-agent in tests
mrodm Mar 14, 2024
1bac588
Set dinamcally the agent hostname var in services
mrodm Mar 14, 2024
21dbd60
Fix environment variable for agent hostname
mrodm Mar 14, 2024
d25da3d
Set agent hostname if agentDeployed is defined
mrodm Mar 14, 2024
f959ea0
Merge remote upstream/main into add_agent_deployer
mrodm Mar 20, 2024
e834d9c
Check tags to filter agents
mrodm Mar 20, 2024
50c331a
Set tags in agent container docker-compose
mrodm Mar 20, 2024
b9acfc2
Remove octal change
mrodm Mar 20, 2024
ead9762
Add flag to enable or disable independent agents
mrodm Mar 20, 2024
2b1140c
Rename variable
mrodm Mar 20, 2024
db9a76c
Merge upstream/main into add_agent_deployer
mrodm Mar 21, 2024
16b3cd9
Remove outCtxt var and rename context by info methods
mrodm Mar 21, 2024
3638f76
Update import for context
mrodm Mar 21, 2024
afbfafe
Support independent agents running system tests by stages
mrodm Mar 21, 2024
947ba06
Add steps in CI to test with independent agents
mrodm Mar 21, 2024
bc582d4
Do not use independent agents now in service or benchrunner
mrodm Mar 21, 2024
a577063
Skip independent agent in parallel packages temporarily
mrodm Mar 21, 2024
d22f0a4
Add tags in kubernetes agentdeployer
mrodm Mar 21, 2024
51316d5
Assign tags for custom agent (servicedeployer)
mrodm Mar 21, 2024
35f6ff4
Fix double quotes in label
mrodm Mar 21, 2024
5bf00e7
Fix name for environment array
mrodm Mar 21, 2024
ec85276
Fix empty RunID value
mrodm Mar 21, 2024
3980446
Set variant in agent Options
mrodm Mar 21, 2024
52dd175
Use exit codes instead true/false
mrodm Mar 21, 2024
0f1f280
Rename vars
mrodm Mar 21, 2024
bea6a2a
Use the right tags for custom agent (servicedeployer)
mrodm Mar 21, 2024
2b050b6
Test system flags with independent agent
mrodm Mar 21, 2024
6dc4fce
Shorten label titles
mrodm Mar 21, 2024
3349ac7
Add reference to agent in label title
mrodm Mar 21, 2024
9584449
Check logs from agents - just docker-compose
mrodm Mar 22, 2024
d8be159
Check the right tags in no-provision or tear-down stages
mrodm Mar 22, 2024
8cfd1b4
Fail step if test command fails (system flags)
mrodm Mar 22, 2024
dce59dc
Support Elastic stack 7,*
mrodm Mar 22, 2024
4267d7b
Add note
mrodm Mar 22, 2024
536cfb5
Add helper
mrodm Mar 22, 2024
702bf93
Fill package and datastream names in service factoryOptions
mrodm Mar 22, 2024
606491a
Remove usages of tags for backwards compatibility
mrodm Mar 22, 2024
125554e
Recovered tags for kubernetes
mrodm Mar 22, 2024
8176349
Remove unused agent deployer
mrodm Mar 22, 2024
995cfc7
Refactor setup agent and service into their own functions
mrodm Mar 22, 2024
f1989bf
Restored usage of variant - to be reviewed
mrodm Mar 22, 2024
b4df467
Use environment vars instead of flag
mrodm Mar 25, 2024
d3a317d
Remove leftover
mrodm Mar 25, 2024
6c21c1f
Re-order agent hostname usages
mrodm Mar 25, 2024
90cd790
Test with gcp stack agent
mrodm Mar 25, 2024
9e08d9a
Fix conditions for terraform packages in hook
mrodm Mar 25, 2024
785da95
Fix env. name to enable independent agent
mrodm Mar 25, 2024
f782e58
Test with independent agent test packages parallel
mrodm Mar 25, 2024
26e3b65
Skip ti_anomali package with independent agent
mrodm Mar 25, 2024
ceeb7a7
Set different folder for independent agent
mrodm Mar 25, 2024
c20bd7c
Connect services to the agent network
mrodm Mar 26, 2024
6a05fb5
Merge remote-tracking branch 'upstream/main' into add_agent_deployer
mrodm Mar 26, 2024
2e57c29
Test ti_anomali package
mrodm Mar 26, 2024
beddc7c
Re-add test package aws
mrodm Mar 26, 2024
43cab2d
Merge remote-tracking branch 'upstream/main' into add_agent_deployer
mrodm Mar 26, 2024
f2dd19c
Re-add test package awslogs
mrodm Mar 26, 2024
94bcd1b
Removed return error from SetInfo
mrodm Apr 3, 2024
36ac22e
Remove Signal from DeployedAgent interface
mrodm Apr 3, 2024
447482c
Use agent name from object in ExitCode
mrodm Apr 3, 2024
03f1e62
Merge remote-tracking branch 'upstream/main' into add_agent_deployer
mrodm Apr 3, 2024
33a8eb9
Document NetworkName attribute
mrodm Apr 3, 2024
c920bce
Add new filter agents method for independent agents
mrodm Apr 3, 2024
4e363a2
Use test agent policy to enroll agents
mrodm Apr 4, 2024
53ce815
Support to set agent policy in custom agents (servicedeployer)
mrodm Apr 4, 2024
89fe149
Remove unused params
mrodm Apr 4, 2024
e6283fb
Remove tags from agents
mrodm Apr 4, 2024
2039ad8
Restore filterAgents function as previously
mrodm Apr 4, 2024
9f0f305
Skip reasigning original policy if run agents independenlty
mrodm Apr 4, 2024
e95d536
Remove test debug messages
mrodm Apr 4, 2024
e9856a8
Fix env. name to enable independent agent
mrodm Apr 4, 2024
ca6e041
Reverse if condition to connect network
mrodm Apr 4, 2024
f94566c
Set just one hostname for customagent (servicedeployer)
mrodm Apr 4, 2024
eb06c8f
Use policy name also for 7.* stack (agentdeployer)
mrodm Apr 4, 2024
13af157
Remove unnecessary check in filterIndependentAgents
mrodm Apr 4, 2024
6b3e976
Remove unused fields in Agent response
mrodm Apr 4, 2024
0424d80
Rename policy fields in AgentInfo struct
mrodm Apr 4, 2024
6ce4ed2
Move code to setupAgent and setupService
mrodm Apr 4, 2024
e697f34
Remove AGENT_HOSTNAME from servicedeployer
mrodm Apr 4, 2024
595eccd
Remove unused field
mrodm Apr 4, 2024
e35732e
Ensure output dir is just created once - services
mrodm Apr 4, 2024
fbb8f4c
Remove unnecessary field in agentInfo
mrodm Apr 4, 2024
f4b6568
Remove unused field
mrodm Apr 4, 2024
7bf8e90
Avoid creating a temporal variable for svcInfo
mrodm Apr 4, 2024
b63b425
Use reference to add terraform outputs
mrodm Apr 4, 2024
148668a
Remove map initialization in test
mrodm Apr 4, 2024
f15b233
Merge remote-tracking branch 'upstream/main' into add_agent_deployer
mrodm Apr 5, 2024
8d5fce3
Replace some switch statements by ifs
mrodm Apr 5, 2024
93fb976
Rephrased comment
mrodm Apr 5, 2024
229b23f
Return default Agent policy if it is empty
mrodm Apr 5, 2024
bda3a2c
Rename function to remove agent
mrodm Apr 9, 2024
ead4d7c
Add technical preview message
mrodm Apr 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,33 @@ export CREATED_DATE
# Secrets must be redacted
# https://buildkite.com/docs/pipelines/managing-log-output#redacted-environment-variables

if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-package" && ("$BUILDKITE_STEP_KEY" =~ ^integration-parallel || "$BUILDKITE_STEP_KEY" =~ ^integration-false_positives) ]]; then
is_step_required_to_upload_safe_logs() {
if [[ "$BUILDKITE_PIPELINE_SLUG" != "elastic-package" ]]; then
return 1
fi
if [[ "$BUILDKITE_STEP_KEY" =~ ^integration-parallel || "$BUILDKITE_STEP_KEY" =~ ^integration-false_positives ]]; then
return 0
fi
return 1
}

if is_step_required_to_upload_safe_logs; then
PRIVATE_CI_GCS_CREDENTIALS_SECRET=$(retry 5 vault kv get -field plaintext -format=json ${PRIVATE_CI_GCS_CREDENTIALS_PATH} | jq -c)
export PRIVATE_CI_GCS_CREDENTIALS_SECRET
export JOB_GCS_BUCKET_INTERNAL="ingest-buildkite-ci"
fi

if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-package" && "$BUILDKITE_STEP_KEY" == "integration-parallel-gcp" ]]; then
is_step_testing_gcp () {
if [[ "$BUILDKITE_PIPELINE_SLUG" != "elastic-package" ]]; then
return 1
fi
if [[ "$BUILDKITE_STEP_KEY" == "integration-parallel-gcp-agent-false" || "$BUILDKITE_STEP_KEY" == "integration-parallel-gcp-agent-true" ]]; then
return 0
fi
return 1
}

if is_step_testing_gcp; then
ELASTIC_PACKAGE_GCP_PROJECT_SECRET=$(retry 5 vault read -field projectId ${GCP_SERVICE_ACCOUNT_SECRET_PATH})
export ELASTIC_PACKAGE_GCP_PROJECT_SECRET
ELASTIC_PACKAGE_GCP_CREDENTIALS_SECRET=$(retry 5 vault read -field credentials ${GCP_SERVICE_ACCOUNT_SECRET_PATH} | jq -c)
Expand All @@ -63,7 +83,20 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-package" && "$BUILDKITE_STEP_KEY" =
export GCP_PROJECT_ID=${ELASTIC_PACKAGE_GCP_PROJECT_SECRET}
fi

if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-package" && ("$BUILDKITE_STEP_KEY" == "integration-parallel-aws" || "$BUILDKITE_STEP_KEY" == "integration-parallel-aws_logs") ]]; then
is_step_testing_aws () {
if [[ "$BUILDKITE_PIPELINE_SLUG" != "elastic-package" ]]; then
return 1
fi
if [[ "$BUILDKITE_STEP_KEY" == "integration-parallel-aws-agent-false" || "$BUILDKITE_STEP_KEY" == "integration-parallel-aws-agent-true" ]]; then
return 0
fi
if [[ "$BUILDKITE_STEP_KEY" == "integration-parallel-aws_logs-agent-false" || "$BUILDKITE_STEP_KEY" == "integration-parallel-aws_logs-agent-true" ]]; then
return 0
fi
return 1
}

if is_step_testing_aws; then
ELASTIC_PACKAGE_AWS_SECRET_KEY=$(retry 5 vault kv get -field secret_key ${AWS_SERVICE_ACCOUNT_SECRET_PATH})
export ELASTIC_PACKAGE_AWS_SECRET_KEY
ELASTIC_PACKAGE_AWS_ACCESS_KEY=$(retry 5 vault kv get -field access_key ${AWS_SERVICE_ACCOUNT_SECRET_PATH})
Expand Down
34 changes: 22 additions & 12 deletions .buildkite/pipeline.trigger.integration.tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# exit immediately on failure, or if an undefined variable is used
set -eu


# begin the pipeline.yml file
echo "steps:"
echo " - group: \":terminal: Integration test suite\""
Expand All @@ -21,7 +20,7 @@ STACK_COMMAND_TESTS=(
)

for test in "${STACK_COMMAND_TESTS[@]}"; do
echo " - label: \":go: Running integration test: ${test}\""
echo " - label: \":go: Integration test: ${test}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t ${test}"
echo " agents:"
echo " provider: \"gcp\""
Expand All @@ -38,11 +37,14 @@ CHECK_PACKAGES_TESTS=(
test-check-packages-benchmarks
test-check-packages-with-logstash
)
for independent_agent in false true ; do
for test in "${CHECK_PACKAGES_TESTS[@]}"; do
echo " - label: \":go: Running integration test: ${test}\""
echo " - label: \":go: Integration test: ${test} - independent_agent ${independent_agent}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t ${test}"
echo " agents:"
echo " provider: \"gcp\""
echo " env:"
echo " ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT: ${independent_agent}"
echo " artifact_paths:"
echo " - build/test-results/*.xml"
echo " - build/elastic-stack-dump/check-*/logs/*.log"
Expand All @@ -52,11 +54,12 @@ for test in "${CHECK_PACKAGES_TESTS[@]}"; do
echo " - build/kubectl-dump.txt"
fi
done
done

pushd test/packages/false_positives > /dev/null
for package in $(find . -maxdepth 1 -mindepth 1 -type d) ; do
package_name=$(basename "${package}")
echo " - label: \":go: Running integration test (false positive): ${package_name}\""
echo " - label: \":go: Integration test (false positive): ${package_name}\""
echo " key: \"integration-false_positives-${package_name}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-check-packages-false-positives -p ${package_name}"
echo " env:"
Expand All @@ -71,50 +74,57 @@ done
popd > /dev/null

pushd test/packages/parallel > /dev/null
for independent_agent in false true; do
for package in $(find . -maxdepth 1 -mindepth 1 -type d) ; do
package_name=$(basename "${package}")
echo " - label: \":go: Running integration test: ${package_name}\""
echo " key: \"integration-parallel-${package_name}\""
echo " - label: \":go: Integration test: ${package_name} - independent_agent ${independent_agent}\""
echo " key: \"integration-parallel-${package_name}-agent-${independent_agent}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-check-packages-parallel -p ${package_name}"
echo " env:"
echo " UPLOAD_SAFE_LOGS: 1"
echo " ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT: ${independent_agent}"
echo " agents:"
echo " provider: \"gcp\""
echo " artifact_paths:"
echo " - build/test-results/*.xml"
echo " - build/test-coverage/coverage-*.xml" # these files should not be used to compute the final coverage of elastic-package
done
done

popd > /dev/null

echo " - label: \":go: Running integration test: test-build-zip\""
echo " - label: \":go: Integration test: test-build-zip\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-build-zip"
echo " agents:"
echo " provider: \"gcp\""
echo " artifact_paths:"
echo " - build/elastic-stack-dump/build-zip/logs/*.log"
echo " - build/packages/*.sig"

echo " - label: \":go: Running integration test: test-install-zip\""
echo " - label: \":go: Integration test: test-install-zip\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-install-zip"
echo " agents:"
echo " provider: \"gcp\""
echo " artifact_paths:"
echo " - build/elastic-stack-dump/install-zip/logs/*.log"

echo " - label: \":go: Running integration test: test-install-zip-shellinit\""
echo " - label: \":go: Integration test: test-install-zip-shellinit\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-install-zip-shellinit"
echo " agents:"
echo " provider: \"gcp\""
echo " artifact_paths:"
echo " - build/elastic-stack-dump/install-zip-shellinit/logs/*.log"

echo " - label: \":go: Running integration test: test-system-test-flags\""
for independent_agent in false true; do
echo " - label: \":go: Integration test: test-system-test-flags - independent_agent ${independent_agent}\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-system-test-flags"
echo " agents:"
echo " provider: \"gcp\""
echo " env:"
echo " ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT: ${independent_agent}"
done

echo " - label: \":go: Running integration test: test-profiles-command\""
echo " - label: \":go: Integration test: test-profiles-command\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-profiles-command"
echo " env:"
echo " DOCKER_COMPOSE_VERSION: \"false\""
Expand All @@ -124,7 +134,7 @@ echo " image: \"${LINUX_AGENT_IMAGE}\""
echo " cpu: \"8\""
echo " memory: \"4G\""

echo " - label: \":go: Running integration test: test-check-update-version\""
echo " - label: \":go: Integration test: test-check-update-version\""
echo " command: ./.buildkite/scripts/integration_tests.sh -t test-check-update-version"
echo " env:"
echo " DEFAULT_VERSION_TAG: v0.80.0"
Expand Down
11 changes: 8 additions & 3 deletions .buildkite/scripts/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ KIND_TARGET="test-check-packages-with-kind"
SYSTEM_TEST_FLAGS_TARGET="test-system-test-flags"
TMP_FOLDER_TEMPLATE="${TMP_FOLDER_TEMPLATE_BASE}.XXXXXXXXX"
GOOGLE_CREDENTIALS_FILENAME="google-cloud-credentials.json"
ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT=${ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT:-"false"}

REPO_NAME=$(repo_name "${BUILDKITE_REPO}")
REPO_BUILD_TAG="${REPO_NAME}/$(buildkite_pr_branch_build_id)"
Expand Down Expand Up @@ -132,21 +133,25 @@ if [[ "${TARGET}" == "${PARALLEL_TARGET}" ]] || [[ "${TARGET}" == "${FALSE_POSIT
set -e

if [[ "${UPLOAD_SAFE_LOGS}" -eq 1 ]] ; then
package_folder="${PACKAGE}"
if [[ "${ELASTIC_PACKAGE_TEST_ENABLE_INDEPENDENT_AGENT}" != "false" ]]; then
package_folder="${package_folder}-independent_agent"
fi
upload_safe_logs \
"${JOB_GCS_BUCKET_INTERNAL}" \
"build/elastic-stack-dump/check-${PACKAGE}/logs/elastic-agent-internal/*.*" \
"insecure-logs/${PACKAGE}/elastic-agent-logs/"
"insecure-logs/${package_folder}/elastic-agent-logs/"

# required for <8.6.0
upload_safe_logs \
"${JOB_GCS_BUCKET_INTERNAL}" \
"build/elastic-stack-dump/check-${PACKAGE}/logs/elastic-agent-internal/default/*" \
"insecure-logs/${PACKAGE}/elastic-agent-logs/default/"
"insecure-logs/${package_folder}/elastic-agent-logs/default/"

upload_safe_logs \
"${JOB_GCS_BUCKET_INTERNAL}" \
"build/container-logs/*.log" \
"insecure-logs/${PACKAGE}/container-logs/"
"insecure-logs/${package_folder}/container-logs/"
fi

if [ $testReturnCode != 0 ]; then
Expand Down
38 changes: 24 additions & 14 deletions cmd/testrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/elastic/elastic-package/internal/cobraext"
"github.com/elastic/elastic-package/internal/common"
"github.com/elastic/elastic-package/internal/elasticsearch"
"github.com/elastic/elastic-package/internal/environment"
"github.com/elastic/elastic-package/internal/install"
"github.com/elastic/elastic-package/internal/kibana"
"github.com/elastic/elastic-package/internal/logger"
Expand Down Expand Up @@ -52,6 +53,8 @@ These tests allow you to test a package's ability to ingest data end-to-end.

For details on how to configure amd run system tests, review the [HOWTO guide](https://github.com/elastic/elastic-package/blob/main/docs/howto/system_testing.md).`

var enableIndependentAgents = environment.WithElasticPackagePrefix("TEST_ENABLE_INDEPENDENT_AGENT")

func setupTestCommand() *cobraext.Command {
var testTypeCmdActions []cobraext.CommandAction

Expand Down Expand Up @@ -186,6 +189,12 @@ func testTypeCommandActionFactory(runner testrunner.TestRunner) cobraext.Command
return fmt.Errorf("cannot determine if package has data streams: %w", err)
}

runIndependentElasticAgent := false
v, ok := os.LookupEnv(enableIndependentAgents)
if ok && strings.ToLower(v) != "false" {
runIndependentElasticAgent = true
}

configFileFlag := ""
runSetup := false
runTearDown := false
Expand Down Expand Up @@ -340,20 +349,21 @@ func testTypeCommandActionFactory(runner testrunner.TestRunner) cobraext.Command
var results []testrunner.TestResult
for _, folder := range testFolders {
r, err := testrunner.Run(ctx, testType, testrunner.TestOptions{
Profile: profile,
TestFolder: folder,
PackageRootPath: packageRootPath,
GenerateTestResult: generateTestResult,
API: esAPI,
KibanaClient: kibanaClient,
DeferCleanup: deferCleanup,
ServiceVariant: variantFlag,
WithCoverage: testCoverage,
CoverageType: testCoverageFormat,
ConfigFilePath: configFileFlag,
RunSetup: runSetup,
RunTearDown: runTearDown,
RunTestsOnly: runTestsOnly,
Profile: profile,
TestFolder: folder,
PackageRootPath: packageRootPath,
GenerateTestResult: generateTestResult,
API: esAPI,
KibanaClient: kibanaClient,
DeferCleanup: deferCleanup,
ServiceVariant: variantFlag,
WithCoverage: testCoverage,
CoverageType: testCoverageFormat,
ConfigFilePath: configFileFlag,
RunSetup: runSetup,
RunTearDown: runTearDown,
RunTestsOnly: runTestsOnly,
RunIndependentElasticAgent: runIndependentElasticAgent,
})

results = append(results, r...)
Expand Down
18 changes: 18 additions & 0 deletions internal/agentdeployer/_static/docker-agent-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "2.3"
services:
elastic-agent:
hostname: ${AGENT_HOSTNAME}
image: "${ELASTIC_AGENT_IMAGE_REF}"
healthcheck:
test: "elastic-agent status"
retries: 180
interval: 1s
environment:
- FLEET_ENROLL=1
- FLEET_URL=https://fleet-server:8220
- KIBANA_HOST=https://kibana:5601
- FLEET_TOKEN_POLICY_NAME=${FLEET_TOKEN_POLICY_NAME}
volumes:
- ${SERVICE_LOGS_DIR}:/tmp/service_logs/
- ${LOCAL_CA_CERT}:/etc/ssl/certs/elastic-package.pem

Loading