Skip to content

Complete variant for the elastic agent is not generating the right binaries #27608

@mdelapenya

Description

@mdelapenya

When running mage package, the binaries generated by the elastic-agent are incorrect:

  • there are three variants: "default", ubi8 and complete.
  • the docker image for the ubi8 variant is properly generated under build/distributions
  • the docker image for the complete variant is generated under build/distributions, BUT overriding the default image.

I suspect that this has been caused by #27350 and #27052

Steps to reproduce

  1. Run cd x-pack/elastic-agent
  2. Run PLATFORMS="linux/amd64" mage package (Narrowing down the process to build only one platform)
  3. Wait for the process to finish... (10 min?)

Expected behaviour

Three docker image binaries are generated, one per variant (default, ubi8 and complete), being the complete one the heaviest in weight (contains node runtime plus libs).

$ ls -l x-pack/elastic-agent/build/distributions | grep docker
-rw-r--r--  1 mdelapenya  staff  244359238 26 Aug 13:51 elastic-agent-8.0.0-linux-amd64.docker.tar.gz
-rw-r--r--  1 mdelapenya  staff        175 26 Aug 13:51 elastic-agent-8.0.0-linux-amd64.docker.tar.gz.sha512
-rw-r--r--  1 mdelapenya  staff  614539725 26 Aug 13:55 elastic-agent-complete-8.0.0-linux-amd64.docker.tar.gz
-rw-r--r--  1 mdelapenya  staff        184 26 Aug 13:56 elastic-agent-complete-8.0.0-linux-amd64.docker.tar.gz.sha512
-rw-r--r--  1 mdelapenya  staff  163226167 26 Aug 13:50 elastic-agent-ubi8-8.0.0-linux-amd64.docker.tar.gz
-rw-r--r--  1 mdelapenya  staff        180 26 Aug 13:50 elastic-agent-ubi8-8.0.0-linux-amd64.docker.tar.gz.sha512

When you docker load the default image, the default image is loaded into the Docker engine:

$ docker load -i x-pack/elastic-agent/build/distributions/elastic-agent-8.0.0-linux-amd64.docker.tar.gz 
Loaded image: docker.elastic.co/beats/elastic-agent:8.0.0

Current behaviour

Two docker image binaries are generated, one per variant (default and ubi8, only).

$ ls -l x-pack/elastic-agent/build/distributions | grep docker
-rw-r--r--   1 mdelapenya  staff  608875722 26 Aug 12:57 elastic-agent-8.0.0-linux-amd64.docker.tar.gz
-rw-r--r--   1 mdelapenya  staff        175 26 Aug 12:58 elastic-agent-8.0.0-linux-amd64.docker.tar.gz.sha512
-rw-r--r--   1 mdelapenya  staff  163226167 26 Aug 12:56 elastic-agent-ubi8-8.0.0-linux-amd64.docker.tar.gz
-rw-r--r--   1 mdelapenya  staff        180 26 Aug 12:56 elastic-agent-ubi8-8.0.0-linux-amd64.docker.tar.gz.sha512

When you docker load the default image, the complete image is loaded into the Docker engine:

$ docker load -i x-pack/elastic-agent/build/distributions/elastic-agent-8.0.0-linux-amd64.docker.tar.gz 
Loaded image: docker.elastic.co/beats/elastic-agent-complete:8.0.0

Metadata

Metadata

Assignees

Labels

Team:AutomationLabel for the Observability productivity teamTeam:Elastic-AgentLabel for the Agent teamTeam:obs-ds-hosted-servicesLabel for the Observability Hosted Services teambugbuild-systemIssue or change affecting Mage, Make, or build scripts.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions