diff --git a/cli/config/compose/services/elastic-agent/docker-compose.yml b/cli/config/compose/services/elastic-agent/docker-compose.yml index 471df73b48..6ffb88e44a 100644 --- a/cli/config/compose/services/elastic-agent/docker-compose.yml +++ b/cli/config/compose/services/elastic-agent/docker-compose.yml @@ -10,14 +10,6 @@ services: condition: service_healthy environment: - "KIBANA_HOST=http://${kibanaHost:-kibana}:${kibanaPort:-5601}" - - "FLEET_SERVER_ENABLE=${fleetServerMode:-0}" - - "FLEET_SERVER_INSECURE_HTTP=${fleetServerMode:-0}" - - "KIBANA_FLEET_SETUP=${fleetServerMode:-0}" - - "FLEET_SERVER_HOST=0.0.0.0" - - "KIBANA_USERNAME=elastic" - - "KIBANA_PASSWORD=changeme" platform: ${elasticAgentPlatform:-linux/amd64} - ports: - - "127.0.0.1:8220:8220" volumes: - "${elasticAgentConfigFile}:/usr/share/elastic-agent/elastic-agent.yml" diff --git a/e2e/_suites/fleet/features/stand_alone_agent.feature b/e2e/_suites/fleet/features/stand_alone_agent.feature index 78af314844..5842cd57cb 100644 --- a/e2e/_suites/fleet/features/stand_alone_agent.feature +++ b/e2e/_suites/fleet/features/stand_alone_agent.feature @@ -50,13 +50,3 @@ Examples: default Examples: Ubi8 | image | | ubi8 | - -@run_fleet_server -Scenario Outline: Deploying a stand-alone agent with fleet server mode - When a "" stand-alone agent is deployed with fleet server mode - Then the stand-alone agent is listed in Fleet as "online" - -@default -Examples: default - | image | - | default | diff --git a/e2e/_suites/fleet/fleet.go b/e2e/_suites/fleet/fleet.go index 7e00ea1b8d..bd70717ae7 100644 --- a/e2e/_suites/fleet/fleet.go +++ b/e2e/_suites/fleet/fleet.go @@ -406,10 +406,6 @@ func (fts *FleetTestSuite) setup() error { } func (fts *FleetTestSuite) theAgentIsListedInFleetWithStatus(desiredStatus string) error { - return theAgentIsListedInFleetWithStatus(desiredStatus, fts.Hostname) -} - -func theAgentIsListedInFleetWithStatus(desiredStatus, hostname string) error { log.Tracef("Checking if agent is listed in Fleet as %s", desiredStatus) maxTimeout := time.Duration(timeoutFactor) * time.Minute * 2 @@ -418,7 +414,7 @@ func theAgentIsListedInFleetWithStatus(desiredStatus, hostname string) error { exp := e2e.GetExponentialBackOff(maxTimeout) agentOnlineFn := func() error { - agentID, err := getAgentID(hostname) + agentID, err := getAgentID(fts.Hostname) if err != nil { retryCount++ return err @@ -429,7 +425,7 @@ func theAgentIsListedInFleetWithStatus(desiredStatus, hostname string) error { if desiredStatus == "offline" || desiredStatus == "inactive" { log.WithFields(log.Fields{ "elapsedTime": exp.GetElapsedTime(), - "hostname": hostname, + "hostname": fts.Hostname, "retries": retryCount, "status": desiredStatus, }).Info("The Agent is not present in Fleet, as expected") @@ -450,7 +446,7 @@ func theAgentIsListedInFleetWithStatus(desiredStatus, hostname string) error { "agentID": agentID, "isAgentInStatus": isAgentInStatus, "elapsedTime": exp.GetElapsedTime(), - "hostname": hostname, + "hostname": fts.Hostname, "retry": retryCount, "status": desiredStatus, }).Warn(err.Error()) @@ -463,7 +459,7 @@ func theAgentIsListedInFleetWithStatus(desiredStatus, hostname string) error { log.WithFields(log.Fields{ "isAgentInStatus": isAgentInStatus, "elapsedTime": exp.GetElapsedTime(), - "hostname": hostname, + "hostname": fts.Hostname, "retries": retryCount, "status": desiredStatus, }).Info("The Agent is in the desired status") diff --git a/e2e/_suites/fleet/stand-alone.go b/e2e/_suites/fleet/stand-alone.go index 4f6ea68f89..0915df4c2d 100644 --- a/e2e/_suites/fleet/stand-alone.go +++ b/e2e/_suites/fleet/stand-alone.go @@ -64,27 +64,12 @@ func (sats *StandAloneTestSuite) afterScenario() { func (sats *StandAloneTestSuite) contributeSteps(s *godog.ScenarioContext) { s.Step(`^a "([^"]*)" stand-alone agent is deployed$`, sats.aStandaloneAgentIsDeployed) - s.Step(`^a "([^"]*)" stand-alone agent is deployed with fleet server mode$`, sats.aStandaloneAgentIsDeployedWithFleetServerMode) s.Step(`^there is new data in the index from agent$`, sats.thereIsNewDataInTheIndexFromAgent) s.Step(`^the "([^"]*)" docker container is stopped$`, sats.theDockerContainerIsStopped) s.Step(`^there is no new data in the index after agent shuts down$`, sats.thereIsNoNewDataInTheIndexAfterAgentShutsDown) - s.Step(`^the stand-alone agent is listed in Fleet as "([^"]*)"$`, sats.theAgentIsListedInFleetWithStatus) -} - -func (sats *StandAloneTestSuite) theAgentIsListedInFleetWithStatus(desiredStatus string) error { - return theAgentIsListedInFleetWithStatus(desiredStatus, sats.Hostname) -} - -func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployedWithFleetServerMode(image string) error { - return sats.startAgent(image, map[string]string{"fleetServerMode": "1"}) } func (sats *StandAloneTestSuite) aStandaloneAgentIsDeployed(image string) error { - return sats.startAgent(image, nil) -} - -func (sats *StandAloneTestSuite) startAgent(image string, env map[string]string) error { - log.Trace("Deploying an agent to Fleet") dockerImageTag := agentVersion @@ -125,10 +110,6 @@ func (sats *StandAloneTestSuite) startAgent(image string, env map[string]string) profileEnv["elasticAgentPlatform"] = "linux/amd64" profileEnv["elasticAgentTag"] = dockerImageTag - for k, v := range env { - profileEnv[k] = v - } - err = serviceManager.AddServicesToCompose(context.Background(), FleetProfileName, []string{ElasticAgentServiceName}, profileEnv) if err != nil { log.Error("Could not deploy the elastic-agent")