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

CI/CD: Wait for Docker port to be open #1932

Open
krancour opened this issue Apr 18, 2022 · 6 comments
Open

CI/CD: Wait for Docker port to be open #1932

krancour opened this issue Apr 18, 2022 · 6 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@krancour
Copy link
Contributor

krancour commented Apr 18, 2022

Our CI/CD processes (see .brigade/brigade.ts) build multi-arch Docker images using "Docker in Docker." The primary container for each job runs the Docker client while the Docker server runs in a sidecar.

Currently, the image build processes use a sleep before proceeding with a docker buildx ... This allows the sidecar a grace period to start before the build proceeds. Often this delays builds longer than necessary. Sometimes it leads to failures because resource demand in the cluster meant the Docker server in the sidecar was slow to start.

This issue suggests modifying the process to wait only as long as needed (up to some limit -- 90 seconds maybe) for port 2375 to actually start accepting requests.

Some very small amount of research will be required on how best to achieve, this, but it is easily accomplished with nc or even pure bash.

Note: Several other repos in the @brigadecore org would benefit from a similar change.

@krancour krancour added the good first issue Good for newcomers label Apr 18, 2022
@krancour krancour added this to the v2.4.1 milestone Apr 18, 2022
@krancour krancour modified the milestones: v2.5.0, v2.6.0 May 11, 2022
@karnatisrinivas
Copy link

Hello @krancour , I would like to give it a try.

@krancour
Copy link
Contributor Author

All yours.

@krancour krancour modified the milestones: v2.6.0, v2.7.0 May 25, 2022
@karnatisrinivas karnatisrinivas removed their assignment May 31, 2022
@CypherpunkSamurai
Copy link

Hello Sir @krancour, Can I takeover this issue? I have bash scripting experience and I feel confident in putting together a working script.

@CypherpunkSamurai
Copy link

I've made a new draft commit on this issue, please review changes.
https://github.com/CypherpunkSamurai/brigade/commit/345c8425aad1a15f493582a800f8df6e1f6289e7

@krancour
Copy link
Contributor Author

krancour commented Sep 1, 2022

I'm no longer a maintainer for this project, but also, as an fyi, this project is currently being considered for archival.

cncf/toc#915

@CypherpunkSamurai
Copy link

Ok Sir, No problem. I'm happy to have attempted to contribute :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants