Comments (8)
Thanks for the issue, and you're right, it's pretty basic at the moment. Have you seen the docker-compose plugin?
from docker-buildkite-plugin.
Yeah, I've seen it, but after using various CI, I find docker's buildkite integration is much more complicated than it should be. I don't think requiring a docker-compose file for a simple build is great.
When we tried concourse, it took a few minutes to set it up to build simple docker images. Same with GitlabCI.
With buildkite, we had to fork and build our own plugin =\ It actually took us a few day to make it work. I can imagine others coming from other CI and feeling the same, and we would gladly like to help you with that, cause we think Buildkite is super dope and powerful.
Our use case: we wanted to run the agent inside of kubernetes, so we can take advantage of autoscale. With the existing plugin, it's just not possible.
Here's our version: https://github.com/playerme/smart-ci-buildkite-plugin/blob/master/hooks/command
There's a lot of useless stuff (cause it's just for us), but I figured the option to mount docker socket and extra volumes would be very useful.
from docker-buildkite-plugin.
Thanks for the background + context! I understand. I want to hear more about how you hooked up the autoscale too.
In general, I think supporting a bunch more of the docker-run
arguments makes total sense. We'd gladly accept PRs for them, ala #6
It's probably worth breaking them up into separate PRs for each option that's added if possible, only because they're easier to merge and discuss bit-by-bit.
from docker-buildkite-plugin.
It's probably worth breaking them up into separate PRs for each option that's added if possible, only because they're easier to merge and discuss bit-by-bit.
Yes, I'll break them up in small pieces and add the correct documentation at the same time.
I want to hear more about how you hooked up the autoscale too.
I guess I could contribute to documentation about that, but we've been running into some problems as of late, and I'm not sure if it's because of Buildkite, our plugin, or our git repository. We made the autoscale works but for anything more than 12 concurrent agents, and our "random error rates" goes thru the roof.
Example types of errors:
- Errors out on git clone
- Randomly freezes because it's an unverified SSH host and requires someone to input "yes" (even though known_hosts is passed).
- Randomly errors out and fails.
We're still investigating to find the source of the problems. My gut feeling tells me it's because we're trying to cram too many agents in 1 node, but it still happens whether I have 12 nodes or 1 =.
For a quick rundown of how we autoscale:
- Each agent has a CPU and Memory request
- We add the Horizontal Pod Autoscaler (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
For now, it's totally based on CPU/RAM but it's not really accurate - some jobs require less CPU and RAM than others jobs. In the future, we plan to add custom metrics and autoscale based on running pipelines.
Anyways, I'll start the PR and tests this week. :-)
Cheers
from docker-buildkite-plugin.
Awesome, much appreciated.
Thanks for all those details! I was wondering if it was custom metrics or CPU… I've heard others using the horizontal pod autoscaler with CPU — I discussed it with @rimusz a while back. Would be awesome to have it use something based off metrics generated by https://github.com/buildkite/buildkite-metrics
from docker-buildkite-plugin.
Oh wow, had no idea that existed. That would also help for our prometheus exporter we want to build too.
from docker-buildkite-plugin.
Nice! We should add a prometheus backend to it.
from docker-buildkite-plugin.
Added #8, #9, #10. None of the patches are breaking, every existing config should work.
I omitted other patches because #6 covers them, though mine were named differently (instead of naming it shell, I named it entrypoint
which is the correct name in the docker world)
In my version of #6, the default entrypoint
is bash -c
to keep backward compatibility. If you prefer that, let me know, I'll make a PR for it.
Once these are merged, I can start the patch for hooks
. Basically, buildkite hooks don't really run inside of docker, which makes it problematic when you need to fetch secrets and stuff. pre-command
and post-command
both runs outside of docker, instead of inside.
from docker-buildkite-plugin.
Related Issues (20)
- input from block steps not passed in env HOT 1
- Can't interpolate ENV vars in mount path HOT 3
- Docker on Docker support HOT 1
- Exit codes > 1 are not correctly propagated HOT 2
- Dependency Dashboard
- GPU parameters not passing in Docker Run {--gpus 1} HOT 3
- Allow setting config globally, instead of per step HOT 1
- Limitation with an array of commands at the step level
- Handling of parameters when shell is false HOT 4
- Changing the Docker Version from 20.10.9 to 20.10.22 HOT 1
- `.ssh/known_hosts` mounted in wrong location when both `mount-ssh-agent` and `user` are used HOT 3
- Documentation: expand-volume-vars expansion time HOT 2
- error pulling amazonlinux:latest HOT 6
- How to pass environment variable to command? HOT 2
- Support for other docker commands than docker run HOT 2
- Windows: docker: Error response from daemon: invalid volume specification HOT 1
- add `expand-workdir-vars` option HOT 2
- Next major version should support the 99% case HOT 1
- `mount-buildkite-agent` should mount `BUILDKITE_AGENT_JOB_API_SOCKET`
- Plugin doesn't correctly bubble up Docker Hub Rate Limiting Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-buildkite-plugin.