20260713 unify installer scripts and RTR registration
This commit is contained in:
49
deploy/docker-installer/scripts/install.sh
Executable file
49
deploy/docker-installer/scripts/install.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# shellcheck source=common.sh
|
||||
source "$SCRIPT_DIR/common.sh"
|
||||
|
||||
usage() {
|
||||
cat <<'USAGE'
|
||||
Usage: ./scripts/install.sh [--skip-dep-install]
|
||||
|
||||
Install or update the ours RP Docker installer package idempotently.
|
||||
USAGE
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--skip-dep-install)
|
||||
export SKIP_DEP_INSTALL=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
die "unknown option: $1"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
load_env
|
||||
assert_arch_compatibility
|
||||
install_docker_if_missing
|
||||
require_cmd curl
|
||||
require_cmd jq
|
||||
require_cmd rsync
|
||||
require_cmd gzip
|
||||
require_cmd tar
|
||||
create_data_dirs
|
||||
load_installer_images
|
||||
ensure_binfmt_if_needed
|
||||
verify_runtime_image
|
||||
verify_metrics_image
|
||||
verify_monitor_images
|
||||
compose_config_path="$(mktemp "${TMPDIR:-/tmp}/ours-rp-compose-config.XXXXXX.yml")"
|
||||
compose_cmd --profile core --profile sidecar --profile monitor config >"$compose_config_path"
|
||||
"$SCRIPT_DIR/self-check.sh" --quick
|
||||
rm -f "$compose_config_path"
|
||||
log "install complete"
|
||||
Reference in New Issue
Block a user