Live Bundle Record
run_live_bundle_record.sh 是当前 ours 的单命令 live bundle 录制入口。
它做三件事:
- 联网执行 live base recorder
- 基于刚录制的 base bundle 执行 live delta recorder
- 产出一个统一的最终目录,包含:
base-payload-archive/payload-delta-archive/base-locks.jsonlocks-delta.jsontal.talta.cerbase.ccrdelta.ccrbase-vrps.csvbase-vaps.csvrecord-delta.csvrecord-delta-vaps.csvbundle.jsonverification.jsontimings/
用法
cd rpki
./scripts/replay_bundle/run_live_bundle_record.sh \
--rir apnic \
--tal-path tests/fixtures/tal/apnic-rfc7730-https.tal \
--ta-path tests/fixtures/ta/apnic-ta.cer
默认输出目录:
target/replay/<rir>_live_bundle_<timestamp>
如果要一次录制多个 RIR,使用:
cd rpki
./scripts/replay_bundle/run_live_bundle_record_multi_rir.sh \
--rir afrinic,apnic,arin,lacnic,ripe
默认输出目录:
target/replay/live_bundle_matrix_<timestamp>
每个 RIR 会落到:
target/replay/live_bundle_matrix_<timestamp>/<rir>_live_bundle_<timestamp>
可选参数
--out-dir <path>--base-validation-time <rfc3339>--delta-validation-time <rfc3339>--http-timeout-secs <n>--rsync-timeout-secs <n>--rsync-mirror-root <path>--max-depth <n>--max-instances <n>--trust-anchor <name>--bin-dir <path>--no-build
run_live_bundle_record_multi_rir.sh 会自动按 RIR 选择当前仓库内置的:
tests/fixtures/tal/*.taltests/fixtures/ta/*.cer
并将 --trust-anchor 设置为对应 RIR 名称。
说明
- 该脚本会先构建:
replay_bundle_capturereplay_bundle_capture_delta
- 如果提供
--no-build,则直接复用:--bin-dir <path>下的现有二进制
- 中间 staging 目录:
<out>.stage-base<out>.stage-delta在成功完成后会清理,只保留最终输出目录。
- 最终输出目录是 delta 阶段产物,其中已经包含 base 阶段结果。