增加ssh

增加deploy下细分的tcp、tls、ssh
This commit is contained in:
xiuting.xu
2026-04-22 16:02:42 +08:00
parent 99250f8aa9
commit b60d579a38
37 changed files with 2951 additions and 636 deletions

View File

@@ -20,5 +20,8 @@ RUN apt-get update \
WORKDIR /app
COPY --from=builder /build/target/release/rtr_debug_client /usr/local/bin/rtr_debug_client
COPY deploy/client/entrypoint.sh /usr/local/bin/rtr-debug-client-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/rtr_debug_client"]
RUN chmod +x /usr/local/bin/rtr-debug-client-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/rtr-debug-client-entrypoint.sh"]

View File

@@ -5,28 +5,38 @@ services:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped
rtr-client-2:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped
rtr-client-3:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped
rtr-client-4:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped
rtr-client-5:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped

View File

@@ -0,0 +1,30 @@
version: "3.9"
services:
rtr-debug-client:
build:
context: ../..
dockerfile: deploy/client/Dockerfile
image: rpki-rtr-debug-client:latest
network_mode: host
command:
[
"127.0.0.1:${RPKI_RTR_SSH_PORT:-22}",
"2",
"reset",
"--ssh",
"--ssh-user",
"rpki-rtr",
"--ssh-key",
"/app/certs/rtr-client.key",
"--ssh-server-key",
"/app/certs/ssh_host_rsa_key.pub",
"--keep-after-error",
"--summary-only"
]
volumes:
- ../../certs:/app/certs:ro
- ../../logs/client:/app/logs
restart: unless-stopped
stdin_open: true
tty: true

View File

@@ -0,0 +1,13 @@
services:
rtr-debug-client:
build:
context: ../..
dockerfile: deploy/client/Dockerfile
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: no
stdin_open: true
tty: true

View File

@@ -0,0 +1,32 @@
version: "3.9"
services:
rtr-debug-client:
build:
context: ../..
dockerfile: deploy/client/Dockerfile
image: rpki-rtr-debug-client:latest
network_mode: host
command:
[
"127.0.0.1:324",
"2",
"reset",
"--tls",
"--ca-cert",
"/app/certs/client-ca.crt",
"--server-name",
"localhost",
"--client-cert",
"/app/certs/client-good.crt",
"--client-key",
"/app/certs/client-good.key",
"--keep-after-error",
"--summary-only"
]
volumes:
- ../../tests/fixtures/tls:/app/certs:ro
- ../../logs/client:/app/logs
restart: unless-stopped
stdin_open: true
tty: true

View File

@@ -6,6 +6,8 @@ services:
image: rpki-rtr-debug-client:latest
network_mode: host
command: ["127.0.0.1:323", "2", "reset", "--keep-after-error", "--summary-only"]
volumes:
- ../../logs/client:/app/logs
restart: unless-stopped
stdin_open: true
tty: true

View File

@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
mkdir -p /app/logs
log_name="${HOSTNAME:-rtr-debug-client}"
stdout_log="/app/logs/${log_name}.stdout.log"
stderr_log="/app/logs/${log_name}.stderr.log"
exec /usr/local/bin/rtr_debug_client "$@" >>"$stdout_log" 2>>"$stderr_log"