This repository was archived by the owner on Sep 17, 2024. It is now read-only.
feat: use Docker copy to transfer binaries to containers#1136
Merged
mdelapenya merged 4 commits intoelastic:masterfrom May 5, 2021
Merged
feat: use Docker copy to transfer binaries to containers#1136mdelapenya merged 4 commits intoelastic:masterfrom
mdelapenya merged 4 commits intoelastic:masterfrom
Conversation
adam-stokes
reviewed
May 5, 2021
adam-stokes
approved these changes
May 5, 2021
cachedout
approved these changes
May 5, 2021
Contributor
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
mergify bot
pushed a commit
that referenced
this pull request
May 5, 2021
* feat: do not mount volumes for agent installer, copying it into the running container * chore: skip TAR files from pre-commit * fix: use different temp dirs per download * fix: add TAR header for non-TAR installers (RPM, DEB) (cherry picked from commit f39aba5) # Conflicts: # internal/docker/docker.go
mergify bot
pushed a commit
that referenced
this pull request
May 5, 2021
* feat: do not mount volumes for agent installer, copying it into the running container * chore: skip TAR files from pre-commit * fix: use different temp dirs per download * fix: add TAR header for non-TAR installers (RPM, DEB) (cherry picked from commit f39aba5) # Conflicts: # cli/config/compose/services/fleet-server-centos/docker-compose.yml # cli/config/compose/services/fleet-server-debian/docker-compose.yml # internal/docker/docker.go
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
May 6, 2021
* master: chore: update mergify's titles (elastic#1142) chore: remove unused pipelines (elastic#1143) feat: use Docker copy to transfer binaries to containers (elastic#1136) chore: abstract image pulling (elastic#1137) Support multiple deployment backends (elastic#1130) chore: remove unused code (elastic#1119) Unify fleet and stand-alone suites (elastic#1112) Pull fresh docker images before suite (elastic#1123) chore: initialise timeout factor next to the declaration (elastic#1118) chore: match Go version with Beats (elastic#1120) feat: support running k8s autodiscover suite for Beats PRs and local repositories (elastic#1115) Auto bootstrap fleet during initialize scenario (elastic#1116) Kubernetes Deployment (elastic#1110)
mdelapenya
added a commit
that referenced
this pull request
May 6, 2021
* feat: do not mount volumes for agent installer, copying it into the running container * chore: skip TAR files from pre-commit * fix: use different temp dirs per download * fix: add TAR header for non-TAR installers (RPM, DEB) (cherry picked from commit f39aba5) # Conflicts: # internal/docker/docker.go Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
mdelapenya
added a commit
that referenced
this pull request
May 6, 2021
* feat: do not mount volumes for agent installer, copying it into the running container * chore: skip TAR files from pre-commit * fix: use different temp dirs per download * fix: add TAR header for non-TAR installers (RPM, DEB) (cherry picked from commit f39aba5) # Conflicts: # cli/config/compose/services/fleet-server-centos/docker-compose.yml # cli/config/compose/services/fleet-server-debian/docker-compose.yml # internal/docker/docker.go Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
8 tasks
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Instead of mounting volumes for the binaries, which made it more complex to setup a single agent, we are copying the downloaded file into the container.
How docker CLI works for copying TAR files is that it automatically extracts the TAR file, and for that reason we are removing the PreInstall step we had to perform exactly that operation.
To verify the new implementation, we have added unit tests that runs a busybox container, copying regular and tar files into the container.
Finally, we added a few exceptions in precommit to avoid the hooks to modify the test TAR file with EOFs
Why is it important?
This abstraction will help with the deployment refactors we are taking into the framework
Checklist
make noticein the proper directory)How to test this PR locally
Related issues
Follow-ups
Once we are happy with this implementation, we should replace the existing volumes we have for configuration files that apply only on test time, making it possible to use the CLI part to run services without any coupling to the previous mounted files.