Skip to content

Document how to upgrade a bundle using digest#2352

Merged
VinozzZ merged 3 commits intogetporter:release/v1from
VinozzZ:update-doc
Sep 15, 2022
Merged

Document how to upgrade a bundle using digest#2352
VinozzZ merged 3 commits intogetporter:release/v1from
VinozzZ:update-doc

Conversation

@VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Sep 9, 2022

What does this change

Add documentation for how to upgrade a bundle using digest.
I also added a section in the release guide to document how to handle failed release tags

What issue does it fix

Closes #1626

Notes for the reviewer

Put any questions or notes for the reviewer here.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
@carolynvs carolynvs self-assigned this Sep 12, 2022
### Upgrade using digest

When working in production environment, we highly recommend you to reference the bundle using its digest instead of tag. We used tags in our docs for simplicity, but tags can be overwritten which results in unexpected outcomes from upgrading an bundle.
To get deterministic and repeatable deployments, use digests instead of tags. it allows to ensure that you deploy the exact expected bundle.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To get deterministic and repeatable deployments, use digests instead of tags. it allows to ensure that you deploy the exact expected bundle.
For deterministic and repeatable deployments, use digests instead of tags to ensure that you deploy the exactly what you intended.

## Upgrade the Installation

To upgrade the resources managed by the bundle, use `porter upgrade`.
### Upgrade using a version tag
Copy link
Member

@carolynvs carolynvs Sep 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that we aren't taking advantage of Porter's --version flag for upgrade.

A more simple way to upgrade using a tag is porter upgrade myinst --version 1.2.3 and then you don't need to re-specify the full bundle reference

Do you want to update the example here? Or I can open a follow-up PR after yours is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice, I can update the example here

Comment on lines 147 to 152
If you ran into below error message:
```console
$ unable to pull bundle: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest
```
Make sure that you are referencing the digest for bundles and not the digest for invocation images.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's explicitly call this out as a troubleshooting section, so that we can include other potential errors or mistakes in the future.

Suggested change
If you ran into below error message:
```console
$ unable to pull bundle: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest
```
Make sure that you are referencing the digest for bundles and not the digest for invocation images.
## Troubleshooting
If you receive an `invalid media type` error like below, check that you are referencing the digest for the bundle and not the installer image.
```plain
unable to pull bundle: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest

Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 👍

@VinozzZ VinozzZ merged commit 7a5b364 into getporter:release/v1 Sep 15, 2022
@VinozzZ VinozzZ deleted the update-doc branch September 15, 2022 14:38
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.

Docs: How to specify installing a bundle by digest

2 participants