diff --git a/snap/local/runtime-helpers/bin/kong-daemon.sh b/snap/local/runtime-helpers/bin/kong-daemon.sh index 09afc1fc18..f5e5532e2a 100755 --- a/snap/local/runtime-helpers/bin/kong-daemon.sh +++ b/snap/local/runtime-helpers/bin/kong-daemon.sh @@ -2,8 +2,8 @@ KONG=/usr/local/bin/kong -# run kong migrations up to bootstrap the cassandra database -# note that sometimes cassandra can be in a "starting up" state, etc. +# bootstrap the database +# note that sometimes the database can be in a "starting up" state, etc. # and in this case we should just loop and keep trying # we don't implement a timeout here because systemd will kill us if we # don't succeed in 15 minutes (or whatever the configured stop-timeout is) @@ -11,6 +11,9 @@ until "$KONG" migrations bootstrap --conf "$KONG_CONF"; do sleep 5 done +# perform migration for upgrades +"$KONG" migrations up --conf "$KONG_CONF" + # set up Kong's admin API plugins via kong.yml: "$KONG" config db_import "$KONGADMIN_CONFIGFILEPATH" || true diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9bf4ddfc09..a17ab7c131 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -696,23 +696,23 @@ parts: - perl - zlib1g-dev override-build: | - VERSION=2.8.0 + VERSION=2.8.2 # use dpkg architecture to figure out our target arch case "$(dpkg --print-architecture)" in amd64) FILE_NAME=kong_${VERSION}_amd64.deb - FILE_HASH=5715ec10547a2de9e7534d0af402fc8dbdad7145d4b43bbccc7bb960152b0314 + FILE_HASH=d600227d07cb862b2dd2de3925eca5841b2292ef838af21ddf5f412c9ab0f3ee ;; arm64) FILE_NAME=kong_${VERSION}_arm64.deb - FILE_HASH=d980f5c106a36142dd86c04bee4adc0deec3470970f8b0f6d3024c17e13d83d6 + FILE_HASH=c23b22bf34df1f3a8428c998875e868025557d5f9599fd9bed10b12c9fb8ed57 ;; esac # download the archive and verify the checksum curl --silent --show-error --location --output $FILE_NAME \ - https://download.konghq.com/gateway-2.x-ubuntu-xenial/pool/all/k/kong/$FILE_NAME + https://download.konghq.com/gateway-2.x-ubuntu-focal/pool/all/k/kong/$FILE_NAME echo "$FILE_HASH $FILE_NAME" > sha256 sha256sum -c sha256 | grep OK