Now with (more efficient, more flexible) two-way syncing
Join Garden co-founders Eythor Magnusson and Thor Sigurdsson for a webinar on Thursday, May 6th (6pm CEST / 9am PDT) to learn all about Kubernetes live reload and the inner-loop dev experience. You can register for the webinar here.
- Garden 0.12.21 includes significant improvements to Kubernetes hot reloading in the form of the new Dev Mode
- Garden now uses Mutagen under the hood and supports 2-way syncing
- Code synchronization is now also more efficient, offers finer-grained control over which files to sync, and gives Windows users a better experience
Today, we’re thrilled to announce the release of Garden 0.12.21 (release notes here).
The release ships with major improvements to Garden’s Kubernetes code synchronization functionality. Let’s talk through what’s changed and why it’s important.
Kubernetes Code Synchronization: What and Why?
Live reloading is an essential tool in any Kubernetes developer’s inner-loop toolkit. It makes it possible to reload running services whenever source code changes, without rebuilding and redeploying the running application. That rebuilding and redeploying is a major flow-killer, even with a system like Garden that offers smart, fast rebuilds.
With live reloading, a developer can simply make a change, see it reflected in their running application right away, and (if they’re using Garden) run integration and end-to-end tests against it directly from their dev environment.
All without a rebuild and redeploy.
This is the kind of fast feedback loop we’re used to when developing a single service locally. But since this is Garden, we also get all the benefits of working against a full-powered instance of our service.
You can easily sync to several services at a time, run integration tests, and seamlessly develop and debug logic and data flows that span multiple services, databases, message queues—you name it. It’s simple to use and configure, and does it all without making your development machine break a sweat.
So code synchronization has been an integral part of Garden since the early days of the project. In order for Garden to act as the beating heart of the software development lifecycle—to orchestrate every step of the end-to-end development process with a common configuration and common workflows—it has to provide a best-in-class inner-loop development experience.
To meet that “best-in-class” standard, and to be sure it reflects our users’ evolving needs and day-to-day workflows, Garden’s hot reload is due for an update. That’s exactly what we’re introducing today.
Two-way syncing, powered by Mutagen
The most significant improvement to Garden’s code synchronization is support for two-way syncing.
What is two-way syncing, and what does it enable?
Garden’s hot reloading has always supported syncing code from a developer’s machine to a remote development cluster. But there are key use cases where developers need to sync code from the development cluster to their local machines, too.
For example, code generation. Generating docs, SQL schemas, or database migrations typically happens in the remote environment at runtime. This generated code needs to be synced back to a dev’s local machine so it can be checked into GitHub or GitLab as part of a dev’s standard workflow.
We’re excited to be using Mutagen under the hood to power two-way syncing, and we’d like to say thank you to the project’s maintainer Jacob Howard for helping us out. Mutagen is awesome, and we encourage you to check it out :)
Faster sync that works seamlessly on OSX, Windows, and Linux
Because our new sync implementation uses Mutagen, it has a much lighter resource footprint for larger projects. It also makes good use of the filesystem primitives of the underlying platform (be it OSX, Windows, or Linux) to make things as smooth as possible. This is very useful for teams with developers working on different operating systems, who can share a dev setup that’s productive and easy to use across the board.
Little UX Improvements with a Big Long-term Impact
We also took this opportunity to make improvements to code sync that we’d been wanting to make for a long time, based on user feedback and wisdom we’ve acquired over the years.
For example, it used to be difficult to sync built files from a developer’s local machine to remote. Garden’s previous hot reload mode made the assumption that any code that needed to be compiled would be synced over to the remote and compiled there.
But sometimes, the remote is just not as efficient as a Macbook Pro. In those cases, users want to compile code locally and then send it over to the remote. Garden now makes that much easier than it used to.
All Kubernetes code synchronization features are part of the free and open source Garden Core. To get started with Garden Core, head on over to our docs.
If you have questions as you’re getting started with Garden, the best place to find help is our community forum. Our team (and other members of the community) are here to point you in the right direction.
And if you’re looking for the fastest and easiest way to get started with Garden—complete with hands-on support from the Garden team and out-of-the-box security and governance features—get in touch with us about Garden Enterprise.
Even if you’re not sure if Garden’s the right fit, feel free to get in touch with us. We’re always happy to schedule a call and learn more about what you’re up to.
Thanks for reading, and we look forward to your questions and feedback.