Skip to content

Commit 7a5b364

Browse files
authored
Document how to upgrade a bundle using digest (getporter#2352)
1 parent 487f4fc commit 7a5b364

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

REVIEWING.md

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ of Porter. When you are asked to cut a new release, here is the process:
108108
git tag VERSION -a -m ""
109109
git push --tags
110110
```
111+
If the CI build failed to build for the release, fix the problem first. Then increment the PATCH version, e.g. v0.7.0->v0.7.1, and go through the above steps again to publish the binaries. It's often a good pratice to finish the release first before updating any of our docs that references the latest release.
111112
112113
1. Generate some release notes and put them into the release on GitHub.
113114
- Go to Porter Github repository and find the newly created release tag. You should see a

docs/content/quickstart/_index.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,42 @@ History:
116116
## Upgrade the Installation
117117

118118
To upgrade the resources managed by the bundle, use `porter upgrade`.
119+
### Upgrade using a version tag
119120
Most bundles are written such that a specific version of the bundle corresponds to a specific version of an application.
120121
So to upgrade the application to a new version you need to specify a newer version of the bundle.
121122

122123
```console
123-
$ porter upgrade porter-hello --reference ghcr.io/getporter/examples/porter-hello:v0.2.0
124+
$ porter upgrade porter-hello --version 0.2.0
124125
upgrading porter-hello...
125126
executing upgrade action from porter-hello (installation: porter-hello)
126127
Upgrade Hello World
127128
Upgraded to World 2.0
128129
execution completed successfully!
129130
```
130131

132+
### Upgrade using digest
133+
134+
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.
135+
For deterministic and repeatable deployments, use digests instead of tags to ensure that you deploy exactly what you intended.
136+
137+
```console
138+
$ porter upgrade porter-hello --reference ghcr.io/getporter/examples/porter-hello@sha256:276b44be3f478b4c8d1f99c1925386d45a878a853f22436ece5589f32e9df384
139+
_
140+
upgrading porter-hello...
141+
executing upgrade action from porter-hello (installation: porter-hello)
142+
Upgrade Hello World
143+
Upgraded to World 2.0
144+
execution completed successfully!
145+
```
146+
147+
## Troubleshooting
148+
149+
If you received an `invalid media type` error like below, check that you are referencing the digest for the bundle and not the installer image.
150+
151+
```plain
152+
unable to pull bundle: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest
153+
```
154+
131155
## Cleanup
132156

133157
To clean up the resources installed from the bundle, use the `porter uninstall` command.

0 commit comments

Comments
 (0)