Skip to content

Commit

Permalink
Bumps Harbor version and syncs checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
crdant committed Oct 31, 2023
1 parent 94cd8a8 commit b2f062f
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: preparing-to-use-the-sdk
id: nlsiefddbiay
id: mneddevjccio
type: challenge
title: Preparing to Use the SDK
teaser: Getting ready to use the Replicated SDK
Expand Down Expand Up @@ -54,7 +54,7 @@ Helm chart. Let's pull down the chart so that we can get
started.

```bash
helm pull --version 16.6.8 oci://registry-1.docker.io/bitnamicharts/harbor --untar
helm pull --version 19.1.0 oci://registry-1.docker.io/bitnamicharts/harbor --untar
```

Let's also set up our shell for interacting with the Replicated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ fi

tmux send-keys -t shell export SPACE 'REPLICATED_API_TOKEN=' "$(agent variable get REPLICATED_API_TOKEN)" ENTER
tmux send-keys -t shell export SPACE 'REPLICATED_APP=' "$(agent variable get REPLICATED_APP)" ENTER
tmux send-keys -t shell 'helm pull --version 16.6.8 oci://registry-1.docker.io/bitnamicharts/harbor --untar' ENTER
tmux send-keys -t shell 'helm pull --version 19.1.0 oci://registry-1.docker.io/bitnamicharts/harbor --untar' ENTER
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: enabling-the-sdk
id: zulqmrtftnst
id: pzlc29lz2h9y
type: challenge
title: Enabling the Replicated SDK
teaser: Incorporate the SDK into your application
Expand Down Expand Up @@ -63,7 +63,7 @@ a fairly large change. It's not a breaking change, though, so
let's just bump the minor version number.

```
version: 16.7.0
version: 19.2.0
```

![Bumping the Chart Version](../assets/bumping-the-version.png)
Expand Down Expand Up @@ -101,5 +101,5 @@ ls release
which shows

```
harbor-16.7.0.tgz
harbor-19.2.0.tgz
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euxo pipefail

result=0
# check for an updated version number
if [[ "$(yq .version mastodon/Chart.yaml)" == "16.7.0" ]] ; then
if [[ "$(yq .version mastodon/Chart.yaml)" == "19.2.0" ]] ; then
fail-message 'Please be sure to update the version of the Mastodon Helm chart to reflect your changes'
let "result = result + 1"
fi
Expand All @@ -23,7 +23,7 @@ if [[ "$(yq '.dependencies[] | select ( .name == "replicated" ) | .name')" == "
fi

# check for the repackaged Helm chart
if [[ ! -f /home/replicant/release/harbor-16.7.0.tgz ]] ; then
if [[ ! -f /home/replicant/release/harbor-19.2.0.tgz ]] ; then
fail-message 'Please be sure to update and repackage the Harbor Helm chart'
let "result = result + 1"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if ! tmux has-session -t shell ; then
fi

# updat the chart version
tmux send-keys -t shell $'yq -i \'.version = "16.7.0"\' harbor/Chart.yaml' ENTER
tmux send-keys -t shell $'yq -i \'.version = "19.2.0"\' harbor/Chart.yaml' ENTER

# add the SDK dependency
tmux send-keys -t shell "yq -i '.dependencies += { \"name\": \"replicated\", \"repository\": \"oci://registry.replicated.com/library\", \"version\": \"$(agent variable get REPLICATED_SDK_VERSION)\"}' harbor/Chart.yaml" ENTER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: creating-a-release
id: xfimjuqgm1r5
id: qwjuyn8lmauy
type: challenge
title: Releasing an Application
teaser: Creating a release on the Replicated Platform
Expand Down Expand Up @@ -85,11 +85,11 @@ To create a release, run the following command. We're using the
`Unstable` channel since we're releasing our most recent change.

```
replicated release create --promote Unstable --yaml-dir ./release --version 16.7.0 \
replicated release create --promote Unstable --yaml-dir ./release --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK"
```

This creates a release for version `16.7.0` of your Harbor Helm
This creates a release for version `19.2.0` of your Harbor Helm
chart, and promotes it to the `Unstable` channel. The `create`
command output a sequence number that you'll need for `promote`
(it will be `1` if you haven't explored releasing a bit more).
Expand Down Expand Up @@ -127,14 +127,14 @@ promoting to `Beta`, and ultimately releasing on `Stable`.
For the purposes of the lab, let's just promote the release straight through.

```
replicated release promote 1 Beta --version 16.7.0 \
replicated release promote 1 Beta --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK"
```

and then

```
replicated release promote 1 Stable --version 16.7.0 \
replicated release promote 1 Stable --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ fi

# check for release to Unstable
unstable_version=$(curl --header "Accept: application/json" --header "Authorization: ${api_token}" https://api.replicated.com/vendor/v3/apps | jq -r '.apps[0].channels[] | select( .name == "Unstable" ) | .currentVersion')
if [[ ! "${unstable_version}" == "16.7.0" ]] ; then
fail-message $'Please be sure to release the applicaton to the \`Unstable\` channel with version \`16.7.0\`'
if [[ ! "${unstable_version}" == "19.2.0" ]] ; then
fail-message $'Please be sure to release the applicaton to the \`Unstable\` channel with version \`19.2.0\`'
let "result = result + 1"
fi

# check for promotion to Beta
beta_version=$(curl --header "Accept: application/json" --header "Authorization: ${api_token}" https://api.replicated.com/vendor/v3/apps | jq -r '.apps[0].channels[] | select( .name == "Beta" ) | .currentVersion')
if [[ ! "${beta_version}" == "16.7.0" ]] ; then
fail-message $'Please be sure to promote the applicaton to the \`Beta\` channel with version \`16.7.0\`'
if [[ ! "${beta_version}" == "19.2.0" ]] ; then
fail-message $'Please be sure to promote the applicaton to the \`Beta\` channel with version \`19.2.0\`'
let "result = result + 1"
fi

# check for promotion to Stable
stable_version=$(curl --header "Accept: application/json" --header "Authorization: ${api_token}" https://api.replicated.com/vendor/v3/apps | jq -r '.apps[0].channels[] | select( .name == "Stable" ) | .currentVersion')
if [[ ! "${stable_version}" == "16.7.0" ]] ; then
fail-message $'Please be sure to promote the applicaton to the \`Stable\` channel with version \`16.7.0\`'
if [[ ! "${stable_version}" == "19.2.0" ]] ; then
fail-message $'Please be sure to promote the applicaton to the \`Stable\` channel with version \`19.2.0\`'
let "result = result + 1"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ replicated channel create --name LTS --description "Releases with long-term supp
--app ${app_slug} --token ${api_token}

# release to the `Unstable` channel
replicated release create --promote Unstable --yaml-dir /home/replicant/release --version 16.7.0 \
replicated release create --promote Unstable --yaml-dir /home/replicant/release --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK" \
--app ${app_slug} --token ${api_token}

# get the sequence number for the release to promote
release_sequence=$(curl --header "Accept: application/json" --header "Authorization: ${api_token}" https://api.replicated.com/vendor/v3/apps | jq -r '.apps[0].channels[] | select( .name == "Unstable" ) | .releaseSequence')

# promote to the `Beta` channel
replicated release promote ${release_sequence} Beta --version 16.7.0 \
replicated release promote ${release_sequence} Beta --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK" \
--app ${app_slug} --token ${api_token}

# promote to the `Stable` channel
replicated release promote ${release_sequence} Stable --version 16.7.0 \
replicated release promote ${release_sequence} Stable --version 19.2.0 \
--release-notes "Prepares for distribution with Replicated by incorporating the Replicated SDK" \
--app ${app_slug} --token ${api_token}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: installing-the-application
id: cqhjo8z5iier
id: 0jr3scssmdfw
type: challenge
title: Installing the Application
teaser: Let's install the application as your customer
Expand Down Expand Up @@ -42,7 +42,7 @@ Password: `[[ Instruqt-Var key="PASSWORD" hostname="shell" ]]`

You'll land on the "Channels" page for your app, which will show
the release channels we discussed in the previous step. Notice that
each channel shows the current version `16.7.0` while the channel LTS, which we haven't released to, reflects
each channel shows the current version `19.2.0` while the channel LTS, which we haven't released to, reflects
that.

![Vendor Portal Release Channels](../assets/vendor-portal-landing.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ result=0

# check for release to Unstable
installed_chart=$(helm list -o yaml --kubeconfig /home/replicant/.kube/config | yq '.[0].chart')
if [[ ! "${installed_chart}" == "harbor-16.7.0" ]] ; then
if [[ ! "${installed_chart}" == "harbor-19.2.0" ]] ; then
fail-message 'Please be sure to install the Harbor Helm chart'
let "result = result + 1"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: validating-the-install
id: wsuxuhp33vfz
id: vtvk2dkrwklo
type: challenge
title: Observing the Customer Instance
teaser: Observing your customer install
Expand Down
3 changes: 2 additions & 1 deletion instruqt/distributing-with-replicated/track.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ lab_config:
overlay: false
width: 33
position: right
checksum: "4697812039007069627"
enableLoadingMessages: true
checksum: "9421035943818506418"

0 comments on commit b2f062f

Please sign in to comment.