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
- Run
cd x-pack/elastic-agent
- Run
PLATFORMS="linux/amd64" mage package (Narrowing down the process to build only one platform)
- 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
When running
mage package, the binaries generated by the elastic-agent are incorrect:I suspect that this has been caused by #27350 and #27052
Steps to reproduce
cd x-pack/elastic-agentPLATFORMS="linux/amd64" mage package(Narrowing down the process to build only one platform)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.sha512When you docker load the default image, the default image is loaded into the Docker engine:
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.sha512When you docker load the default image, the complete image is loaded into the Docker engine: