Make Apps V2 the default for new apps in your org

You can now default your org(s) into using Apps V2 by default with: fly orgs apps-v2 default-on <org-slug>.

With the default enabled new apps created in the org will use the Apps V2 platform instead of Apps V1. Apps V2 is our new platform version, which uses Fly Machines under the hood for orchestration instead of Nomad. Read more about why we made Apps V2 in this blog post.

This setting does not change the platform version for any existing apps. It only applies to new apps created after changing the setting.

A small number of new users will start having Apps V2 be the default for their orgs. As we see success, we’ll continue to expand the number of new users that have Apps V2 as the default. Existing Fly users will not be affected and will continue to have Apps V1 be the default. New users that are added to orgs where Apps V1 is the default will get new orgs that have Apps V1 as the default.

All users, new or current, can enable/disable Apps V2 as the default with fly orgs apps-v2 default-off <org-slug>. Use fly orgs apps-v2 show <org-slug> to check whether Apps V2 is the default for new apps in a given organization.

fly launch and fly deploy continue to support --force-machines and --force-nomad flags, which enable you to control the platform version for an individual app. --force-machines will use Apps V2 for the app regardless of the default setting for the org. --force-nomad will use Apps V1.

Let us know what you think and if you find any issues using Apps V2!

11 Likes

What is your suggestion on migrating v1 apps and Postgres dbs to v2? Hold tight for now?

5 Likes

We don’t have a migration tool for migrating v1 apps, yet. We’re working on it and will post an update once it’s ready!

4 Likes

@tvdfly Will the migration tool allow to keep the app name, ip addresses, secrets, attached pg, etc?

1 Like

So until that migration tool from v1 to v2 is ready… are there any docs on how to do it manually without having to create a new app?

@pier I think the only way right now is to create a new app, reattach the db, set all secrets, reconfigure dns to send traffic from your domain to the new app (since it’ll get a new ip), etc. More hustle if you use volumes. I think it’s currently impossible to transfer app name or ip

3 Likes

Right now, you have to create a new app, there’s no other option.

When we do have a migration tool, it’ll all happen in place. This could be disruptive, so we’re trying not to rush it (despite ongoing Nomad issues).

2 Likes

Btw, deployed Apps v2 and it’s not showing any activity. Even after new deployment version number is still 0. Please look into this once main issue is over.

We’re going to need more details to help troubleshoot. Where are you seeing no activity?

Something that would help (until the migration tool is finished) is to be able to redirect the traffic from the old app to the new v2 one at the Fly router level.

I’ve created a new v2 app but now I have to keep both apps running until I’m 100% certain the DNS have propagated. I guess 48 hours will be enough.

Here you go. For V1 app there are version numbers and shows timeline when it was deployed.

For V2 apps, there is nothing. Empty activity.

fwiw it looks like the activity panel in the browser ui just hasn’t caught up with V2 apps. Here’s fly status for one of my apps that shows “Empty activity” in the dashboard.

$ fly status
...
Machines
ID            	PROCESS	VERSION	REGION	STATE  	HEALTH CHECKS     	LAST UPDATED
<machine-id>	app    	3      	yyz   	started	1 total, 1 passing	2023-03-14T16:55:30Z

@pier I’m using Cloudflare, and I didn’t expect that Cloudflare’s dns change would propagate instantly. Maybe it’s because I run my app behind their proxy. But literally after I hit save on ip change on their dashboard the next request went straight to the new app, and old app received zero requests since then (i decided to keep it for a day just in case).

And yeah, i wish i could just redirect traffic to another app within fly. Changing dns for a live app in prod is always nerve-racking

1 Like

When you do eventually switch v1 apps over to v2, will there be any known caveats to look out for?

I know there were some limitations with machines vs v1 apps when they were launched, just trying to prepare ahead of time.

Yes I also can see it via fly status. We will use it for now. Hope UI will catch-up soon.

Yeah I’m using Cloudflare for the DNS. In my machine the change was almost instant.

But I imagine not all DNS servers will get the change as fast and this is a production app.

“it works on my machine” is not something I can say to a customer :sweat_smile:

1 Like

When I run

fly orgs apps-v2 default-on <org-slug>
or
fly orgs apps-v2 show <org-slug>

it just displays the usage help

Update: Turns out I was using an old version of flyctl (0.0.437). After upgrading to 0.0.500, I can run those commands now

1 Like