File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,6 +147,43 @@ sudo cp "$GC_PATH/etc/exordos_core/logging.yaml" $GC_CFG_DIR/
147147sudo mkdir -p $GC_CFG_DIR /exordos_core.d
148148sudo cp " $GC_PATH /exordos/images/bootstrap.sh" $BOOTSTRAP_PATH /0100-ec-bootstrap.sh
149149
150+ # Install the latest released IAM cache through its standalone installer.
151+ IAM_CACHE_REPO=https://github.com/exordos/iam-cache.git
152+ IAM_CACHE_DIR=$( mktemp -d)
153+ cleanup_iam_cache () {
154+ rm -rf -- " $IAM_CACHE_DIR "
155+ }
156+ trap cleanup_iam_cache EXIT
157+
158+ git clone --depth 1 " $IAM_CACHE_REPO " " $IAM_CACHE_DIR "
159+ case " $( dpkg --print-architecture) " in
160+ amd64|arm64)
161+ IAM_CACHE_ARCH=$( dpkg --print-architecture)
162+ ;;
163+ * )
164+ echo " Unsupported architecture for the IAM cache: $( dpkg --print-architecture) " >&2
165+ exit 1
166+ ;;
167+ esac
168+
169+ IAM_CACHE_DOWNLOAD_URL=$( curl -fsSL https://api.github.com/repos/exordos/iam-cache/releases/latest \
170+ | grep -oE ' "browser_download_url"[[:space:]]*:[[:space:]]*"[^"]+"' \
171+ | cut -d ' "' -f 4 \
172+ | grep -E " .*linux[-_]${IAM_CACHE_ARCH} $" \
173+ | head -n 1)
174+ if [[ -z " $IAM_CACHE_DOWNLOAD_URL " ]]; then
175+ echo " No Linux ${IAM_CACHE_ARCH} IAM cache binary found in the latest release." >&2
176+ exit 1
177+ fi
178+
179+ IAM_CACHE_BINARY=" $IAM_CACHE_DIR /exordos-iam-cache"
180+ curl -fsSLo " $IAM_CACHE_BINARY " " $IAM_CACHE_DOWNLOAD_URL "
181+ chmod 0755 " $IAM_CACHE_BINARY "
182+ sudo " $IAM_CACHE_DIR /scripts/install.sh" " $IAM_CACHE_BINARY "
183+
184+ cleanup_iam_cache
185+ trap - EXIT
186+
150187cd " $GC_PATH "
151188uv sync
152189source " $GC_PATH " /.venv/bin/activate
You can’t perform that action at this time.
0 commit comments