diff --git a/deploy/arm64-compose/.env.example b/deploy/docker-compose/.env.example similarity index 94% rename from deploy/arm64-compose/.env.example rename to deploy/docker-compose/.env.example index fa8436f..af728f1 100644 --- a/deploy/arm64-compose/.env.example +++ b/deploy/docker-compose/.env.example @@ -1,11 +1,11 @@ -# ours RP ARM64 Docker Compose 示例配置 +# ours RP Docker Compose 示例配置(remote233 ARM64/QEMU 示例) # 复制为 .env 后再启动: # cp .env.example .env # 业务镜像名称;需要先通过 docker load 导入远端 Docker。 RPKI_IMAGE=ours-rp-runtime-arm64:dev -# 核心 RP 镜像强制以 ARM64 运行;远端233为 x86_64,需要 binfmt/qemu 支持。 +# remote233 示例强制以 ARM64 运行;目标机器为 x86_64,需要 binfmt/qemu 支持。 RPKI_PLATFORM=linux/arm64 # metrics sidecar 独立镜像。 diff --git a/deploy/arm64-compose/docker-compose.yml b/deploy/docker-compose/docker-compose.yml similarity index 76% rename from deploy/arm64-compose/docker-compose.yml rename to deploy/docker-compose/docker-compose.yml index c1da79d..8ecf04c 100644 --- a/deploy/arm64-compose/docker-compose.yml +++ b/deploy/docker-compose/docker-compose.yml @@ -1,8 +1,8 @@ services: ours-rp-soak: - image: ${RPKI_IMAGE:-ours-rp-runtime-arm64:dev} - platform: ${RPKI_PLATFORM:-linux/arm64} - container_name: ours-rp-arm64-soak + image: ${RPKI_IMAGE:?RPKI_IMAGE is required} + platform: ${RPKI_PLATFORM:?RPKI_PLATFORM is required} + container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-compose}-soak env_file: - ./.env environment: @@ -22,9 +22,9 @@ services: - core artifact-metrics: - image: ${METRICS_IMAGE:-ours-rp-metrics-arm64:dev} - platform: ${METRICS_PLATFORM:-linux/arm64} - container_name: ours-rp-arm64-artifact-metrics + image: ${METRICS_IMAGE:?METRICS_IMAGE is required} + platform: ${METRICS_PLATFORM:?METRICS_PLATFORM is required} + container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-compose}-artifact-metrics env_file: - ./.env command: @@ -36,7 +36,7 @@ services: - --poll-secs - ${METRICS_POLL_SECS:-10} - --instance - - ${METRICS_INSTANCE:-remote233-arm64-qemu} + - ${METRICS_INSTANCE:-docker-compose} ports: - "${METRICS_PORT:-9556}:9556" volumes: @@ -49,8 +49,8 @@ services: prometheus: image: ${PROMETHEUS_IMAGE:-prom/prometheus:v2.55.1} - platform: ${MONITOR_PLATFORM:-linux/arm64} - container_name: ours-rp-arm64-prometheus + platform: ${MONITOR_PLATFORM:?MONITOR_PLATFORM is required} + container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-compose}-prometheus command: - --config.file=/etc/prometheus/prometheus.yml - --storage.tsdb.path=/prometheus @@ -69,8 +69,8 @@ services: grafana: image: ${GRAFANA_IMAGE:-grafana/grafana:11.3.1} - platform: ${MONITOR_PLATFORM:-linux/arm64} - container_name: ours-rp-arm64-grafana + platform: ${MONITOR_PLATFORM:?MONITOR_PLATFORM is required} + container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-compose}-grafana depends_on: - prometheus ports: diff --git a/deploy/arm64-compose/grafana/dashboards/ours-rp-repo-sync.json b/deploy/docker-compose/grafana/dashboards/ours-rp-repo-sync.json similarity index 100% rename from deploy/arm64-compose/grafana/dashboards/ours-rp-repo-sync.json rename to deploy/docker-compose/grafana/dashboards/ours-rp-repo-sync.json diff --git a/deploy/arm64-compose/grafana/dashboards/ours-rp-soak-overview.json b/deploy/docker-compose/grafana/dashboards/ours-rp-soak-overview.json similarity index 100% rename from deploy/arm64-compose/grafana/dashboards/ours-rp-soak-overview.json rename to deploy/docker-compose/grafana/dashboards/ours-rp-soak-overview.json diff --git a/deploy/arm64-compose/grafana/provisioning/dashboards/dashboard.yml b/deploy/docker-compose/grafana/provisioning/dashboards/dashboard.yml similarity index 73% rename from deploy/arm64-compose/grafana/provisioning/dashboards/dashboard.yml rename to deploy/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 8cba889..5079abf 100644 --- a/deploy/arm64-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/deploy/docker-compose/grafana/provisioning/dashboards/dashboard.yml @@ -1,9 +1,9 @@ apiVersion: 1 providers: - - name: ours-rp-arm64 + - name: ours-rp-docker-compose orgId: 1 - folder: Ours RP ARM64 + folder: Ours RP Docker Compose type: file disableDeletion: false updateIntervalSeconds: 10 diff --git a/deploy/arm64-compose/grafana/provisioning/datasources/prometheus.yml b/deploy/docker-compose/grafana/provisioning/datasources/prometheus.yml similarity index 100% rename from deploy/arm64-compose/grafana/provisioning/datasources/prometheus.yml rename to deploy/docker-compose/grafana/provisioning/datasources/prometheus.yml diff --git a/deploy/arm64-compose/prometheus.yml b/deploy/docker-compose/prometheus.yml similarity index 83% rename from deploy/arm64-compose/prometheus.yml rename to deploy/docker-compose/prometheus.yml index 658f425..1e658fd 100644 --- a/deploy/arm64-compose/prometheus.yml +++ b/deploy/docker-compose/prometheus.yml @@ -10,4 +10,4 @@ scrape_configs: - artifact-metrics:9556 labels: rp: ours-rp - source: arm64-compose-artifact-sidecar + source: docker-compose-artifact-sidecar diff --git a/deploy/arm64-installer/.env.example b/deploy/docker-installer/.env.example similarity index 87% rename from deploy/arm64-installer/.env.example rename to deploy/docker-installer/.env.example index a19cbc1..c3d1e57 100644 --- a/deploy/arm64-installer/.env.example +++ b/deploy/docker-installer/.env.example @@ -1,29 +1,30 @@ # ours RP Docker installer configuration -# `build_docker_installer_package.sh` rewrites package-specific defaults below. +# `build_docker_installer_package.sh` rewrites package-specific placeholders +# when producing amd64/arm64 release packages. # 中文说明见 docs/README.zh-CN.md。English guide: docs/README.en.md # Package metadata and architecture guardrails. -PACKAGE_ARCH=arm64 -PACKAGE_PLATFORM=linux/arm64 +PACKAGE_ARCH=__PACKAGE_ARCH__ +PACKAGE_PLATFORM=__PACKAGE_PLATFORM__ ALLOW_CROSS_ARCH=0 # Compose project name. -COMPOSE_PROJECT_NAME=ours-rp-arm64-installer +COMPOSE_PROJECT_NAME=ours-rp-__PACKAGE_ARCH__-installer # Runtime image loaded from images/*.tar.gz by install.sh. -RPKI_IMAGE=ours-rp-runtime-arm64:dev -RPKI_PLATFORM=linux/arm64 +RPKI_IMAGE=ours-rp-runtime-__PACKAGE_ARCH__:dev +RPKI_PLATFORM=__PACKAGE_PLATFORM__ # Metrics image loaded from images/*.tar.gz by install.sh. -METRICS_IMAGE=ours-rp-metrics-arm64:dev -METRICS_PLATFORM=linux/arm64 +METRICS_IMAGE=ours-rp-metrics-__PACKAGE_ARCH__:dev +METRICS_PLATFORM=__PACKAGE_PLATFORM__ # Restart policy for the soak container. Production default keeps the daemon alive. # For finite acceptance tests such as MAX_RUNS=3, set SOAK_RESTART_POLICY=no to avoid an extra restarted run. SOAK_RESTART_POLICY=unless-stopped # Host-side persistent data directory. All state/runs/logs/monitoring data are bind-mounted here. -HOST_DATA_DIR=/var/lib/ours-rp-arm64-installer +HOST_DATA_DIR=__HOST_DATA_DIR__ # RIR list. Options: afrinic,apnic,arin,lacnic,ripe RIRS=afrinic,apnic,arin,lacnic,ripe @@ -82,19 +83,19 @@ RPKI_PROGRESS_PP_CACHE_SLOW_MS=100 RPKI_PROGRESS_CONTROL_LOOP_SLOW_MS=2000 # Metrics sidecar. -METRICS_INSTANCE=arm64-installer +METRICS_INSTANCE=__PACKAGE_ARCH__-installer METRICS_PORT=9556 METRICS_POLL_SECS=10 # Optional external RTR report directory produced by a separately deployed RTR service. # Default points to an installer-managed empty fallback directory. To enable real RTR # metrics, set this to the host-side report directory, for example: # RTR_REPORT_DIR=/root/rpki/report -RTR_REPORT_DIR=/var/lib/ours-rp-arm64-installer/empty-rtr-report +RTR_REPORT_DIR=__HOST_DATA_DIR__/empty-rtr-report RTR_REPORT_CONTAINER_DIR=/var/lib/ours-rp/rtr-report # Prometheus / Grafana. # Monitor images are packaged as docker-save archives and loaded by install.sh. -MONITOR_PLATFORM=linux/arm64 +MONITOR_PLATFORM=__PACKAGE_PLATFORM__ PROMETHEUS_IMAGE=prom/prometheus:v2.55.1 GRAFANA_IMAGE=grafana/grafana:11.3.1 PROMETHEUS_PORT=9090 diff --git a/deploy/arm64-installer/cleanup.sh b/deploy/docker-installer/cleanup.sh similarity index 100% rename from deploy/arm64-installer/cleanup.sh rename to deploy/docker-installer/cleanup.sh diff --git a/deploy/arm64-installer/compose/docker-compose.yml b/deploy/docker-installer/compose/docker-compose.yml similarity index 90% rename from deploy/arm64-installer/compose/docker-compose.yml rename to deploy/docker-installer/compose/docker-compose.yml index ffc5938..85e660d 100644 --- a/deploy/arm64-installer/compose/docker-compose.yml +++ b/deploy/docker-installer/compose/docker-compose.yml @@ -1,7 +1,7 @@ services: ours-rp-soak: - image: ${RPKI_IMAGE:-ours-rp-runtime-arm64:dev} - platform: ${RPKI_PLATFORM:-linux/arm64} + image: ${RPKI_IMAGE:?RPKI_IMAGE is required} + platform: ${RPKI_PLATFORM:?RPKI_PLATFORM is required} container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-package-installer}-soak env_file: - ../.env @@ -22,8 +22,8 @@ services: - core artifact-metrics: - image: ${METRICS_IMAGE:-ours-rp-metrics-arm64:dev} - platform: ${METRICS_PLATFORM:-linux/arm64} + image: ${METRICS_IMAGE:?METRICS_IMAGE is required} + platform: ${METRICS_PLATFORM:?METRICS_PLATFORM is required} container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-package-installer}-artifact-metrics env_file: - ../.env @@ -52,7 +52,7 @@ services: prometheus: image: ${PROMETHEUS_IMAGE:-prom/prometheus:v2.55.1} - platform: ${MONITOR_PLATFORM:-linux/arm64} + platform: ${MONITOR_PLATFORM:?MONITOR_PLATFORM is required} container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-package-installer}-prometheus command: - --config.file=/etc/prometheus/prometheus.yml @@ -73,7 +73,7 @@ services: grafana: image: ${GRAFANA_IMAGE:-grafana/grafana:11.3.1} - platform: ${MONITOR_PLATFORM:-linux/arm64} + platform: ${MONITOR_PLATFORM:?MONITOR_PLATFORM is required} container_name: ${COMPOSE_PROJECT_NAME:-ours-rp-package-installer}-grafana depends_on: - prometheus diff --git a/deploy/arm64-installer/compose/grafana/dashboards/ours-rp-repo-sync.json b/deploy/docker-installer/compose/grafana/dashboards/ours-rp-repo-sync.json similarity index 100% rename from deploy/arm64-installer/compose/grafana/dashboards/ours-rp-repo-sync.json rename to deploy/docker-installer/compose/grafana/dashboards/ours-rp-repo-sync.json diff --git a/deploy/arm64-installer/compose/grafana/dashboards/ours-rp-rtr-overview.json b/deploy/docker-installer/compose/grafana/dashboards/ours-rp-rtr-overview.json similarity index 100% rename from deploy/arm64-installer/compose/grafana/dashboards/ours-rp-rtr-overview.json rename to deploy/docker-installer/compose/grafana/dashboards/ours-rp-rtr-overview.json diff --git a/deploy/arm64-installer/compose/grafana/dashboards/ours-rp-soak-overview.json b/deploy/docker-installer/compose/grafana/dashboards/ours-rp-soak-overview.json similarity index 100% rename from deploy/arm64-installer/compose/grafana/dashboards/ours-rp-soak-overview.json rename to deploy/docker-installer/compose/grafana/dashboards/ours-rp-soak-overview.json diff --git a/deploy/arm64-installer/compose/grafana/provisioning/dashboards/dashboard.yml b/deploy/docker-installer/compose/grafana/provisioning/dashboards/dashboard.yml similarity index 100% rename from deploy/arm64-installer/compose/grafana/provisioning/dashboards/dashboard.yml rename to deploy/docker-installer/compose/grafana/provisioning/dashboards/dashboard.yml diff --git a/deploy/arm64-installer/compose/grafana/provisioning/datasources/prometheus.yml b/deploy/docker-installer/compose/grafana/provisioning/datasources/prometheus.yml similarity index 100% rename from deploy/arm64-installer/compose/grafana/provisioning/datasources/prometheus.yml rename to deploy/docker-installer/compose/grafana/provisioning/datasources/prometheus.yml diff --git a/deploy/arm64-installer/compose/prometheus.yml b/deploy/docker-installer/compose/prometheus.yml similarity index 100% rename from deploy/arm64-installer/compose/prometheus.yml rename to deploy/docker-installer/compose/prometheus.yml diff --git a/deploy/arm64-installer/docs/README.en.md b/deploy/docker-installer/docs/README.en.md similarity index 100% rename from deploy/arm64-installer/docs/README.en.md rename to deploy/docker-installer/docs/README.en.md diff --git a/deploy/arm64-installer/docs/README.zh-CN.md b/deploy/docker-installer/docs/README.zh-CN.md similarity index 100% rename from deploy/arm64-installer/docs/README.zh-CN.md rename to deploy/docker-installer/docs/README.zh-CN.md diff --git a/deploy/arm64-installer/docs/operations.en.md b/deploy/docker-installer/docs/operations.en.md similarity index 100% rename from deploy/arm64-installer/docs/operations.en.md rename to deploy/docker-installer/docs/operations.en.md diff --git a/deploy/arm64-installer/docs/operations.zh-CN.md b/deploy/docker-installer/docs/operations.zh-CN.md similarity index 100% rename from deploy/arm64-installer/docs/operations.zh-CN.md rename to deploy/docker-installer/docs/operations.zh-CN.md diff --git a/deploy/arm64-installer/docs/troubleshooting.en.md b/deploy/docker-installer/docs/troubleshooting.en.md similarity index 100% rename from deploy/arm64-installer/docs/troubleshooting.en.md rename to deploy/docker-installer/docs/troubleshooting.en.md diff --git a/deploy/arm64-installer/docs/troubleshooting.zh-CN.md b/deploy/docker-installer/docs/troubleshooting.zh-CN.md similarity index 100% rename from deploy/arm64-installer/docs/troubleshooting.zh-CN.md rename to deploy/docker-installer/docs/troubleshooting.zh-CN.md diff --git a/deploy/arm64-installer/install.sh b/deploy/docker-installer/install.sh similarity index 100% rename from deploy/arm64-installer/install.sh rename to deploy/docker-installer/install.sh diff --git a/deploy/arm64-installer/logs.sh b/deploy/docker-installer/logs.sh similarity index 100% rename from deploy/arm64-installer/logs.sh rename to deploy/docker-installer/logs.sh diff --git a/deploy/arm64-installer/restart.sh b/deploy/docker-installer/restart.sh similarity index 100% rename from deploy/arm64-installer/restart.sh rename to deploy/docker-installer/restart.sh diff --git a/deploy/arm64-installer/scripts/common.sh b/deploy/docker-installer/scripts/common.sh similarity index 100% rename from deploy/arm64-installer/scripts/common.sh rename to deploy/docker-installer/scripts/common.sh diff --git a/deploy/arm64-installer/self-check.sh b/deploy/docker-installer/self-check.sh similarity index 100% rename from deploy/arm64-installer/self-check.sh rename to deploy/docker-installer/self-check.sh diff --git a/deploy/arm64-installer/start.sh b/deploy/docker-installer/start.sh similarity index 100% rename from deploy/arm64-installer/start.sh rename to deploy/docker-installer/start.sh diff --git a/deploy/arm64-installer/status.sh b/deploy/docker-installer/status.sh similarity index 100% rename from deploy/arm64-installer/status.sh rename to deploy/docker-installer/status.sh diff --git a/deploy/arm64-installer/stop.sh b/deploy/docker-installer/stop.sh similarity index 100% rename from deploy/arm64-installer/stop.sh rename to deploy/docker-installer/stop.sh diff --git a/deploy/arm64-installer/uninstall.sh b/deploy/docker-installer/uninstall.sh similarity index 100% rename from deploy/arm64-installer/uninstall.sh rename to deploy/docker-installer/uninstall.sh diff --git a/deploy/arm64-installer/upgrade.sh b/deploy/docker-installer/upgrade.sh similarity index 100% rename from deploy/arm64-installer/upgrade.sh rename to deploy/docker-installer/upgrade.sh diff --git a/scripts/docker/build_docker_installer_package.sh b/scripts/docker/build_docker_installer_package.sh index 5f7ea91..ff7048d 100755 --- a/scripts/docker/build_docker_installer_package.sh +++ b/scripts/docker/build_docker_installer_package.sh @@ -15,7 +15,7 @@ GRAFANA_IMAGE="${GRAFANA_IMAGE:-grafana/grafana:11.3.1}" GRAFANA_IMAGE_TAR="${GRAFANA_IMAGE_TAR:-}" OUT_DIR="${OUT_DIR:-}" PACKAGE_PREFIX="${PACKAGE_PREFIX:-}" -TEMPLATE_DIR="${TEMPLATE_DIR:-$REPO_ROOT/deploy/arm64-installer}" +TEMPLATE_DIR="${TEMPLATE_DIR:-$REPO_ROOT/deploy/docker-installer}" usage() { cat <<'USAGE' diff --git a/scripts/docker/deploy_remote233_arm64_compose.sh b/scripts/docker/deploy_remote233_arm64_compose.sh index 56d0db4..cf1a5fe 100755 --- a/scripts/docker/deploy_remote233_arm64_compose.sh +++ b/scripts/docker/deploy_remote233_arm64_compose.sh @@ -135,7 +135,7 @@ require_command rsync exit 2 } -compose_src="$REPO_ROOT/deploy/arm64-compose/" +compose_src="$REPO_ROOT/deploy/docker-compose/" [[ -f "$compose_src/docker-compose.yml" ]] || { echo "missing compose source: $compose_src" >&2 exit 2