4 ms·
I guess I don't really get dagger... It reminds me of the early days gulp.js sort of? The article also confused me for a hot minute, it enthusiastically goes in
by creesch 3y ago
I guess I don't really get dagger... It reminds me of the early days gulp.js sort of? The article also confused me for a hot minute, it enthusiastically goes into a demonstration that really does make it seem like things are more complex than they should be?
Looking at the dagger docs (https://docs.dagger.io https://docs.dagger.io) I still don't really get the feeling there is a solid use case. The who is it for section does a poor job of winning me over.
> A developer wishing your CI pipelines were code instead of YAML.
Are there developers who wish this? Specifically developers who will not use it as an excuse to make an overly complex difficult to maintain solution instead? Not to mention that YAML pipelines can be maintained by a wider array of people some of who don't necesairly have the code skills to do the the same in code.
Furthermore, the "you can't use code in pipelines" also isn't true. If you really can't do the things you want to do with standardized YAML pipeline blocks all of them support the option to actually run any type of code as part of the pipeline. This has the benefit of still offering the readability of clearly defined steps and stages.
> Your team's "designated devops person", hoping to replace a pile of artisanal scripts with something more powerful.
By replacing it by a pile of different artisanal scripts?
> A platform engineer writing custom tooling, with the goal of unifying continuous delivery across organizational silos.
That's something most pipeline solutions can already do if you want? Pipeline templates are a thing and can be enforced across an organization.
> A cloud-native developer advocate or solutions engineer, looking to demonstrate a complex integration on short notice.
Again, something you can already do with any modern pipeline.
And maybe there are good dagger use cases, but my initial impressions based on this article and the documentation don't present them to me. Instead, I can't help but shake the feeling that this is one of those technologies that is looking for a problem to solve rather than something build to solve a problem.
- shepherdjerred 3y agoThe benefit of Dagger is that your builders are fully containerized, you can run CI locally, and you get to do all of that using your favorite language. You could achieve those goals independently using things like Make + Docker + keeping CI dumb, but that is a lot of plumbing and still has edge cases. For example, Makefiles often use utilities like sed, curl, etc., which behave differently on macOS versus Linux. It also requires a lot of discipline to keep CI from growing, and you need to learn the Make syntax, which, while useful, can be a bit of an investment, especially as you get to the more advanced features/syntax. This shines when you can write your pipelines in the same language as your app. Often, teams might have only 1-2 people who _really_ understand Bash/Make, but the rest of the team understands the language they use daily (Go, TypeScript, etc.) Dagger lets you leverage your knowledge of more common languages to write your CI pipeline, and additionally, these builds are containerized and can all be run locally. I have used Dagger a couple of times and liked it. One competitor in the space is Earthly [0], which has a Makefile/Dockerfile syntax. I've had good experiences with Earthly, but Dagger is a better pick for medium/large projects. [0]: https://earthly.dev/ https://earthly.dev/
- creesch 3y agoBeing able to run your pipelines locally is a pretty neat use case. That's something that often is difficult or basically impossible. Except for maybe GitHub actions through Act (https://github.com/nektos/act https://github.com/nektos/act). I'd still lean to something in the yaml sphere if it eventually would be used in deployment pipelines and such. For example a solution incorporating ansible. It also seems to me that the argument you make is mostly focused on the building step? Earthly certainly seems focused on that aspect.
- SOLAR_FIELDS 3y agoAct is also quite imperfect around its emulation and has a lot of edge cases. Not by any virtue of being a bad project or lack of effort, it’s just that the way GHA works is slightly insane
- shepherdjerred 3y agoAct works pretty well in my experience, but it's tied to GHA. Once nice thing about Earthly + Dagger is that your build + pipeline code are bundled together, and you can run them on any compute. As for YAML, it is ubiquitous and more accessible to those who are less comfortable writing code. One thing that I don't like about YAML si that for larger GHA workflows become hard to understand quite quickly. It's nice to work in "real" languages like Go/TypeScript where you can create and compose functions, especially if the language you're writing your pipeline in is the same language as your app -- I think that's a very powerful use case where all devs can feel comfortable/empowered to tweak CI/build steps. > It also seems to me that the argument you make is mostly focused on the building step? Earthly certainly seems focused on that aspect. Earthly and Dagger solve both builds and CI pipelines. They're essentially identical aside from the syntax that you use. Earthly and Dagger fit into CI in the same way, too. You'll have a GHA that installs Earthly/Dagger, and then calls your pipeline/build step. For Dagger, this is invoking your pipeline code. For Earthly, you'd want to define a `ci` target, and invoke it, e.g. `earthly +ci` (this means that locally you can run the entire pipeline with the same command). In both cases, you'd want your GHA (or whatever runner you're using) to be as dumb as possible, e.g. it should literally clone the repo, install the CLI, and run one shell command. Maybe it can also upload test reports/annotate PRs/etc, but the more you add to your GHA/test runner code outside of these tools, the less these tools can help you. Here's an example using Earthly for CI: https://github.com/shepherdjerred/glitter-boys/blob/main/.github/workflows/deploy.yml https://github.com/shepherdjerred/glitter-boys/blob/main/.gi... A similar example using Dagger: https://github.com/shepherdjerred/shepherdjerred.com/blob/main/.github/workflows/dagger.yml https://github.com/shepherdjerred/shepherdjerred.com/blob/ma...
- baq 3y agoYAML is the worst of both worlds. It pretends to be just simple configuration, but it by necessity cannot be that, because it gets interpreted by the CI system. The result is an unholy language selling itself as simple JSON with comments and less quote escaping. (At least nobody got the bright idea to put jinja in there.) The CDK people saw this and went the much saner strongly typed typescript JSON synthesis. It’s still shit but at least you get your config statically analyzed before pushing it 17 times until it finally works (because why would you want to test locally, nobody does that).
- pid-1 3y ago> Are there developers who wish this? Specifically developers who will not use it as an excuse to make an overly complex difficult to maintain solution instead? Not to mention that YAML pipelines can be maintained by a wider array of people some of who don't necesairly have the code skills to do the the same in code. As someone who has been building automatic deployment systems for 5+ years, I do. I'd like to create libraries and workflows that expose infrastructure and deployment best practices to developers so they can spend their time solving business issues. Dockerfiles + Docker Compose + YAML template files are good enough for simple cases, but they will quickly break once you need to support different, possible configurable use cases. I've been using AWS CDK in Python to expose infrastructure libraries for developers and the difference is night and day vs using plain YAML. People just build stuff and deploy apps without talking to our infra team at all, object / functions serve as neat, statically checked, documented interfaces for our devs. I'm not sure Dagger is THE solution I'm looking for CI/CD, but having something that exposes rich declarative interfaces for automatic deployments is most definitely not a baseless idea.
- kjuulh 3y agoDisclaimer: I build and maintain'ish the rust sdk of dagger. If you've ever worked with a sufficiently large pipeline, or set of pipelines, you face the fact that stuff breaks and you have to spam commits to try to get the weird yaml dsl to do the thing you want. Not that dagger is that much different in that context. But you can actually test your pipeline locally, shortening the feedback loop from 10 minutes to 10 seconds. We've even gone as far as integrating it into our developer tools, with caching we still have nice to use clis and apps. We just don't have to think too much about deployment as we're heavily invested in docker already. From a platform engineering perspective. We'd like actual guarantees about our pipelines when we roll them out to thousands of repositories. With dagger, we can do traditional unit tests on parts of our pipeline, and full integration test (or whatever you'd like to call them) on whole example pipelines. This is something that would suck to do, with github actions, bash and docker by itself. And as such isn't done often, and when done brittle. Been there done that. Another example is doing programmatic builds in a more comfortable language than Docker or bash. Lets say I'd like to solve rusts build/caching issues. With dagger, or other programmatic build tools. I can now mix docker commands, with computation to solve my problem. I can for example rely on golangs hashing libraries etc. rather than installing a bunch of packages, I don't want to end up in my final images anyway. Dagger shouldn't be used by developers directly. IMO the same as traditional pipelines, if the developers have to touch these files, then something is wrong. Instead it should be built and maintained by a platform team, with contributions by developers whom need specific features (which dagger allows, because you can just use a regular package manager). This may sound a little fanboyish, but we've just felt the need for less friction in traditional CI systems on actually having modern software engineering tools and methodologies available. Something which Dagger enables for us.
- eysi 3y agoTo add to what's already been said: If you think about it, CI pipelines are typically a complete description of how your system is built, tested, and deployed. Which is pretty fantastic except for how walled off they are. You can't really re-use these descriptions for e.g. development, they're not vendor agnostic, and they only way to run them is by pushing your code. Maybe it's a silly analogy but it's almost like being a web dev that doesn't have a browser and needs to send their code to a friend who can tell them if that font size looks good. I think we're way over due for freeing these "blueprints" of our system from the confines of CI and making them portable and flexible. And containers are the technology that's enabling that. Full disclaimer (as always): I work at Garden[0] where we're also solving that problem but taking a slightly different approach to Dagger (it's still a DAG). Garden config is declarative and the jobs (we call them actions) have a semantic meaning. You can e.g. have a Build action of type container or a Deploy action of type Helm and Garden will figure out what to do with it. We've also put a lot of emphasis on the inner loop development story with hot reloading functionality, log streaming and more. [0] https://github.com/garden-io/garden https://github.com/garden-io/garden
- shepherdjerred 3y agoIs garden suitable for smaller projects? I've stumbled upon it before, but it just looks so intimidating.
- eysi 3y agoYes for sure! We did indeed have a reputation for being a bit more complicated then some of the other tools out there (and in turn more flexible). But we've put enormous effort into simplifying Garden itself and also improving documentation. If you already have your stack containerised you should be good to go but experience with Kubernetes is definitely a plus. Most of our users use K8s in production and use Garden for developing and testing in production-like environments in "inner loop" dev and CI. You can check out our quickstart guide, it can get you up and running in a few minutes: https://docs.garden.io/getting-started/quickstart https://docs.garden.io/getting-started/quickstart We're also always happy to help on Discord if you have questions: https://discord.gg/FrmhuUjFs6 https://discord.gg/FrmhuUjFs6
- ransom1538 3y agoDagger looks far more confusing and weird than the docker compose example.