20260710 安装包重建提交标识镜像
This commit is contained in:
@@ -11,12 +11,12 @@ ALLOW_CROSS_ARCH=0
|
||||
# Compose project name.
|
||||
COMPOSE_PROJECT_NAME=ours-rp-__PACKAGE_ARCH__-installer
|
||||
|
||||
# Runtime image loaded from images/*.tar.gz by install.sh.
|
||||
RPKI_IMAGE=ours-rp-runtime-__PACKAGE_ARCH__:dev
|
||||
# Runtime image rebuilt from the current source commit while packaging.
|
||||
RPKI_IMAGE=__RUNTIME_IMAGE__
|
||||
RPKI_PLATFORM=__PACKAGE_PLATFORM__
|
||||
|
||||
# Metrics image loaded from images/*.tar.gz by install.sh.
|
||||
METRICS_IMAGE=ours-rp-metrics-__PACKAGE_ARCH__:dev
|
||||
# Metrics image rebuilt from the current source commit while packaging.
|
||||
METRICS_IMAGE=__METRICS_IMAGE__
|
||||
METRICS_PLATFORM=__PACKAGE_PLATFORM__
|
||||
|
||||
# Restart policy for the soak container. Production default keeps the daemon alive.
|
||||
|
||||
@@ -6,6 +6,8 @@ This package deploys ours RP on Linux servers whose host architecture matches th
|
||||
|
||||
The package includes four architecture-matched images: ours RP runtime, artifact metrics, Prometheus, and Grafana. Deployment does not need to pull application images on the target host. Runtime state, run artifacts, logs, Prometheus data and Grafana data are persisted through host bind mounts.
|
||||
|
||||
Every installer build rebuilds the ours RP runtime and artifact metrics images. The deliverable name is `ours-rp-installer-{arch}-{git8}-{YYYYMMDDTHHMMSSZ}.tar.gz`, and both ours RP image tags use the current source commit. `PACKAGE-MANIFEST.env` records the full commit, UTC build time, dirty state, and image archive hashes; `./status.sh --brief` displays that provenance after installation.
|
||||
|
||||
By default the host architecture must match `PACKAGE_ARCH` from `PACKAGE-MANIFEST.env`. If you intentionally want to run this package on a different host architecture through QEMU/binfmt, set:
|
||||
|
||||
```bash
|
||||
@@ -21,8 +23,8 @@ The legacy direct Compose deployment entry point has been removed. For either am
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
tar -xzf ours-rp-docker-installer-__PACKAGE_ARCH__-*.tar.gz
|
||||
cd ours-rp-docker-installer-__PACKAGE_ARCH__-*
|
||||
tar -xzf ours-rp-installer-__PACKAGE_ARCH__-*.tar.gz
|
||||
cd ours-rp-installer-__PACKAGE_ARCH__-*
|
||||
|
||||
./install.sh
|
||||
cp .env.example .env # install.sh creates .env automatically if missing
|
||||
@@ -45,8 +47,8 @@ Defaults:
|
||||
- `PERIODIC_SNAPSHOT_MAX_DELTAS=100`
|
||||
- `HOST_DATA_DIR=__HOST_DATA_DIR__`
|
||||
- `SOAK_RESTART_POLICY=unless-stopped`
|
||||
- `RPKI_IMAGE=ours-rp-runtime-__PACKAGE_ARCH__:dev`
|
||||
- `METRICS_IMAGE=ours-rp-metrics-__PACKAGE_ARCH__:dev`
|
||||
- `RPKI_IMAGE=__RUNTIME_IMAGE__`
|
||||
- `METRICS_IMAGE=__METRICS_IMAGE__`
|
||||
- `METRICS_PLATFORM=__PACKAGE_PLATFORM__`
|
||||
- `MONITOR_PLATFORM=__PACKAGE_PLATFORM__`
|
||||
- `ALLOW_CROSS_ARCH=0`
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
安装包内置与包架构一致的四类镜像:ours RP runtime、artifact metrics、Prometheus、Grafana。部署时不需要现场拉取应用镜像。运行产物、状态数据库、日志、Prometheus 和 Grafana 数据均通过宿主机目录挂载保存。
|
||||
|
||||
每次构建安装包都会重新构建 ours RP runtime 与 artifact metrics 镜像。交付包命名为 `ours-rp-installer-{arch}-{git8}-{YYYYMMDDTHHMMSSZ}.tar.gz`,两类 ours RP 镜像分别使用当前源码 commit 的 tag。完整 commit、UTC 构建时间、dirty 状态和镜像归档 hash 保存在 `PACKAGE-MANIFEST.env`,可通过 `./status.sh --brief` 查看。
|
||||
|
||||
默认情况下,宿主架构必须与 `PACKAGE-MANIFEST.env` 中的 `PACKAGE_ARCH` 匹配;若确需在异构主机上通过 QEMU/binfmt 运行,必须显式设置:
|
||||
|
||||
```bash
|
||||
@@ -21,8 +23,8 @@ ALLOW_CROSS_ARCH=1
|
||||
## 快速开始
|
||||
|
||||
```bash
|
||||
tar -xzf ours-rp-docker-installer-__PACKAGE_ARCH__-*.tar.gz
|
||||
cd ours-rp-docker-installer-__PACKAGE_ARCH__-*
|
||||
tar -xzf ours-rp-installer-__PACKAGE_ARCH__-*.tar.gz
|
||||
cd ours-rp-installer-__PACKAGE_ARCH__-*
|
||||
|
||||
./install.sh
|
||||
cp .env.example .env # 如 install.sh 已自动创建,可直接编辑现有 .env
|
||||
@@ -45,8 +47,8 @@ vim .env
|
||||
- `PERIODIC_SNAPSHOT_MAX_DELTAS=100`
|
||||
- `HOST_DATA_DIR=__HOST_DATA_DIR__`
|
||||
- `SOAK_RESTART_POLICY=unless-stopped`
|
||||
- `RPKI_IMAGE=ours-rp-runtime-__PACKAGE_ARCH__:dev`
|
||||
- `METRICS_IMAGE=ours-rp-metrics-__PACKAGE_ARCH__:dev`
|
||||
- `RPKI_IMAGE=__RUNTIME_IMAGE__`
|
||||
- `METRICS_IMAGE=__METRICS_IMAGE__`
|
||||
- `METRICS_PLATFORM=__PACKAGE_PLATFORM__`
|
||||
- `MONITOR_PLATFORM=__PACKAGE_PLATFORM__`
|
||||
- `ALLOW_CROSS_ARCH=0`
|
||||
|
||||
@@ -192,9 +192,9 @@ load_env() {
|
||||
|
||||
HOST_DATA_DIR="${HOST_DATA_DIR:-/var/lib/ours-rp-${PACKAGE_ARCH}-installer}"
|
||||
COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME:-ours-rp-${PACKAGE_ARCH}-installer}"
|
||||
RPKI_IMAGE="${RPKI_IMAGE:-ours-rp-runtime-${PACKAGE_ARCH}:dev}"
|
||||
RPKI_IMAGE="${RPKI_IMAGE:-ours-rp-runtime-${PACKAGE_ARCH}:${source_commit_short:-unknown}}"
|
||||
RPKI_PLATFORM="${RPKI_PLATFORM:-$PACKAGE_PLATFORM}"
|
||||
METRICS_IMAGE="${METRICS_IMAGE:-ours-rp-metrics-${PACKAGE_ARCH}:dev}"
|
||||
METRICS_IMAGE="${METRICS_IMAGE:-ours-rp-metrics-${PACKAGE_ARCH}:${source_commit_short:-unknown}}"
|
||||
METRICS_PLATFORM="${METRICS_PLATFORM:-$PACKAGE_PLATFORM}"
|
||||
RTR_REPORT_DIR="${RTR_REPORT_DIR:-$HOST_DATA_DIR/empty-rtr-report}"
|
||||
RTR_REPORT_CONTAINER_DIR="${RTR_REPORT_CONTAINER_DIR:-/var/lib/ours-rp/rtr-report}"
|
||||
|
||||
@@ -26,6 +26,11 @@ host_arch="$(detect_host_arch)"
|
||||
mode="$(arch_mode)"
|
||||
echo "installer_root=$INSTALLER_ROOT"
|
||||
echo "manifest_file=$MANIFEST_FILE"
|
||||
echo "package_name=${package_name:-}"
|
||||
echo "source_commit=${source_commit:-${git_commit:-}}"
|
||||
echo "source_commit_short=${source_commit_short:-}"
|
||||
echo "source_dirty=${source_dirty:-}"
|
||||
echo "build_timestamp_utc=${build_timestamp_utc:-${created_at_utc:-}}"
|
||||
echo "host_data_dir=$HOST_DATA_DIR"
|
||||
echo "host_arch=$host_arch"
|
||||
echo "package_arch=$PACKAGE_ARCH"
|
||||
@@ -34,8 +39,12 @@ echo "allow_cross_arch=$ALLOW_CROSS_ARCH"
|
||||
echo "arch_mode=$mode"
|
||||
echo "runtime_image=$RPKI_IMAGE"
|
||||
echo "runtime_platform=$RPKI_PLATFORM"
|
||||
echo "runtime_image_revision=${runtime_image_revision:-}"
|
||||
echo "runtime_image_dirty=${runtime_image_dirty:-}"
|
||||
echo "metrics_image=$METRICS_IMAGE"
|
||||
echo "metrics_platform=$METRICS_PLATFORM"
|
||||
echo "metrics_image_revision=${metrics_image_revision:-}"
|
||||
echo "metrics_image_dirty=${metrics_image_dirty:-}"
|
||||
echo "rtr_report_dir=$RTR_REPORT_DIR"
|
||||
echo "rtr_report_container_dir=$RTR_REPORT_CONTAINER_DIR"
|
||||
echo "monitor_platform=$MONITOR_PLATFORM"
|
||||
|
||||
Reference in New Issue
Block a user