Depot Remote Builder Support in Flyctl Is Now In Beta!

Hey everyone,
As of v0.2.102 of flyctl, you can now use Depot to build images for your apps! You can get started by running fly deploy --depot!

Why Use Depot?

Using Depot gives a few advantages over standard remote builders:

  • Depot’s build server software is optimized to build as fast as possible
  • Depot saves your build cache up to a certain size, then starts evicting the least used bits of that cache. That means builds will stay cached for much longer
  • Depot provides instant caching across builds, meaning that every build for your org will share cache layers when it can

In the future, Depot will have even more features supported:

  • Depot will support tiered caching, where parts of the cache are stored on the build machine’s SSD, and other parts are in Tigris object storage
  • Build machines will always launch in the region closest to the requesting user, so that transferring the build context stays fast

Do I need a Depot account?

Nope, you can get started right now! We create a Depot project and build for you, and then flyctl handles the rest!

12 Likes
Waiting for depot builder...
Error: failed to fetch an image or build from source: error building: input:3: ensureDepotRemoteBuilder {"code"=>"invalid_argument", "message"=>"Invalid region fly-gru"}
1 Like

To clarify, is this running depot software on fly.io machines or is this using Depot’s infrastructure (similar to signing up for their cloud offering)?

Can you clarify what kind of data gets sent to Depot?

4 Likes

If you region is not supported you can use this command

FLY_REMOTE_BUILDER_REGION=iad fly deploy --depot
1 Like

Can’t get it to work with this command.

Thanks for asking!

This is all running on Fly infrastructure. No customer-identifying data is sent to Depot.

Your Docker build context is sent through their proxy running on Fly, to builders in their Fly organization. Also, Depot instruments your builds, so Fly support can see details about your Dockerfile build steps, cache hits, etc.

3 Likes

Hey! We’re actively working on the “invalid region” issue now. Thanks for bringing it up :slight_smile:

2 Likes

This specific issue should be fixed now, since we just added support for every region! Thanks again for notifying us!

2 Likes

Cool!

Is there any limit when using depot to build? And will there be any charge for this?

In the current beta, there’s no limit, except that you’re limited to a single builder VM per Fly organization. Later on, we’ll charge for build minutes, but haven’t worked out the details there.

Given that builds are free today, it’s possible we’d introduce a build allowance. We’ll post more details here when we have them :smiley:

3 Likes

Rather than a lot of waiting for the build to start, looks fast when it goes:

Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...
Waiting for depot builder...

I got this forever:

Waiting for depot builder...
 🌎

After running with LOG_LEVEL=debug, I got this log

My flyctl version: fly v0.2.103 darwin/arm64 Commit: f4ae6f03c144e4d5ccbe454172c4d3bea6b1d85b BuildDate: 2024-07-31T17:06:22Z

@Mrka @singee It looks like the issue is your connection to the depot builder, in this case. Do deploys work on retry?

Still a lot of retries until it finally goes

Would you be able to give me an org or app name? I could try taking a deeper look

@billy The error still exists.

I modified the flyctl and tried to dig what’s wrong here. I can confirm the flyctl/internal/build/imgsrc/depot.go at v2024.8.14-pr3840.2 · superfly/flyctl · GitHub won’t return (until timeout) in my case.

The API request to api.depot.dev succeed and return the builder machine info. But the grpc connection to the builder fails.

Since I don’t know how to MitM the grpc tls connection here, I can’t dig more.

In my case also the regular build take some retries before goes.

Hey! Just letting you know that we’re looking into this, and have some theories about what the issue may be.

When Depot works, it’s pretty magical! Wow!

Looking forward to when this is usable in all regions!

Hey! Have you found any regions where Depot isn’t working? It should be in all regions as far as I’m aware, so that would be good to fix :slight_smile: