Skip to content

Commit

Permalink
Add EKS docs to automated version updating
Browse files Browse the repository at this point in the history
Signed-off-by: David Son <[email protected]>
  • Loading branch information
sondavidb committed Nov 4, 2024
1 parent f8309af commit 24df461
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/update-getting-started-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: |
docs/eks.md
docs/getting-started.md
scripts/update-getting-started-guide-version.sh
Expand All @@ -49,6 +50,7 @@ jobs:
with:
ref: main
sparse-checkout: |
docs/eks.md
docs/getting-started.md
scripts/update-getting-started-guide-version.sh
Expand Down
10 changes: 5 additions & 5 deletions docs/eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ cat <<'EOF_SCRIPT' >install_soci.sh
#!/bin/bash
# Set environment variables
ARCH=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
VERSION=0.7.0
ARCHIVE=soci-snapshotter-$VERSION-linux-$ARCH.tar.gz
version="0.7.0"
ARCHIVE=soci-snapshotter-$version-linux-$ARCH.tar.gz
pushd /tmp
# Download, verify, and install the soci-snapshotter
curl --silent --location --fail --output $ARCHIVE https://github.com/awslabs/soci-snapshotter/releases/download/v$VERSION/$ARCHIVE
curl --silent --location --fail --output $ARCHIVE.sha256sum https://github.com/awslabs/soci-snapshotter/releases/download/v$VERSION/$ARCHIVE.sha256sum
curl --silent --location --fail --output $ARCHIVE https://github.com/awslabs/soci-snapshotter/releases/download/v$version/$ARCHIVE
curl --silent --location --fail --output $ARCHIVE.sha256sum https://github.com/awslabs/soci-snapshotter/releases/download/v$version/$ARCHIVE.sha256sum
sha256sum ./$ARCHIVE.sha256sum
tar xzvf ./$ARCHIVE -C /usr/local/bin soci-snapshotter-grpc
rm ./$ARCHIVE
Expand All @@ -156,7 +156,7 @@ image_service_path = "/run/containerd/containerd.sock"
EOF
# Start the soci-snapshotter
curl --silent --location --fail --output /etc/systemd/system/soci-snapshotter.service https://raw.githubusercontent.com/awslabs/soci-snapshotter/v$VERSION/soci-snapshotter.service
curl --silent --location --fail --output /etc/systemd/system/soci-snapshotter.service https://raw.githubusercontent.com/awslabs/soci-snapshotter/v$version/soci-snapshotter.service
systemctl daemon-reload
systemctl enable --now soci-snapshotter
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-getting-started-guide-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ assert_diff() {
}
}

sed -i -E "s/version=\"([0-9]+\.){2}[0-9]+\"/version=\"${VERSION}\"/" docs/getting-started.md
sed -i -E "s/version=\"([0-9]+\.){2}[0-9]+\"/version=\"${VERSION}\"/" docs/getting-started.md docs/eks.md

if [ $VERBOSE = true ]; then
git --no-pager diff
Expand Down

0 comments on commit 24df461

Please sign in to comment.