Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding flyctl image show/update command #554

Merged
merged 7 commits into from
Oct 8, 2021
Merged

Conversation

davissp14
Copy link
Contributor

@davissp14 davissp14 commented Sep 30, 2021

Provides app image details:

$ flyctl image show --app <app-name>

Image details
  Registry   = registry.fly.io
  Repository = spring-star-1995
  Tag        = deployment-1631759185
  Version    = N/A
  Digest     = sha256:fb465a3f01184606d11bbee3376b1d0de48fc890408ea9119b477c9d7f5fa221

If version tracking is enabled ( currently only available for PG ), we will see version information and will also be notified when a new image version has become available.

$ flyctl image show --app <app-name>
Update available flyio/postgres:13 v0.0.0 -> flyio/postgres:13.4 v0.0.4
Run `fly image update` to migrate to the latest image version.

Image details
  Registry   = registry-1.docker.io
  Repository = flyio/postgres
  Tag        = 13
  Version    = v0.0.0
  Digest     = sha256:fb465a3f01184606d11bbee3376b1d0de48fc890408ea9119b477c9d7f5fa221

Latest image details
  Registry   = registry-1.docker.io
  Repository = flyio/postgres
  Tag        = 13.4
  Version    = v0.0.4
  Digest     = sha256:d90b1a8456d2c587ef04905269f39b89ffe3c20400095b0098757b26ad676aa5

Running flyctl image update --<app-name> will ask you to confirm the migration path. If accepted, it will issue a new deploy targeting the newest image version.

**Note: **

$ flyctl image update --app <app-name>
? Update `<app-name>` from flyio/postgres:13 v0.0.0 to flyio/postgres:13.4 v0.0.4? Yes
Release v60 created

You can detach the terminal anytime without stopping the update
Monitoring Deployment

8 desired, 8 placed, 8 healthy, 0 unhealthy [health checks: 24 total, 24 passing]
--> v60 deployed successfully

@davissp14 davissp14 changed the title Adding flyctl image command Adding flyctl image show command Sep 30, 2021
@jsierles
Copy link
Member

jsierles commented Oct 1, 2021

Nice! How about some upgrade instructions? And perhaps a note about downtime or lack thereof? Is there a plan for something like fly postgres upgrade?

@davissp14
Copy link
Contributor Author

davissp14 commented Oct 1, 2021

@jsierles

Nice! How about some upgrade instructions? And perhaps a note about downtime or lack thereof? Is there a plan for something like fly postgres upgrade?

Yep! I'm going to be wiring up the upgrade logic this morning. I keep going back and forth on whether to add fly image upgrade or fly postgres upgrade or both. Have any opinions?

@michaeldwan
Copy link
Member

@davissp14 if it's only for postgres right now you can nest it under postgres and not waste time making it generic until we need it for another db.

@davissp14
Copy link
Contributor Author

@michaeldwan It's roughly the same amount of work either way. Either we run with flyctl postgres update, or flyctl image update and noop if image version tracking isn't enabled.

@michaeldwan
Copy link
Member

Not sure this comment was before or after talking about it in slack 😄 shipit

@jsierles
Copy link
Member

jsierles commented Oct 4, 2021

Is this PR ready? Would like to cut a release today :)

@davissp14
Copy link
Contributor Author

davissp14 commented Oct 4, 2021

@jsierles I'm hoping to wrap it up today, but I'll keep you posted as I have a few other things on my plate.

@davissp14 davissp14 merged commit 87de487 into master Oct 8, 2021
@davissp14 davissp14 deleted the app-image-details branch October 8, 2021 00:14
@davissp14 davissp14 changed the title Adding flyctl image show command Adding flyctl image show/update command Oct 8, 2021
@kernel-io
Copy link

how would this function if you have forked the postgres-ha script (to add postgis for instance)?

@davissp14
Copy link
Contributor Author

The update feature is currently only available to apps running our official postgres-ha image. In your case, it would just noop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants