增加ssh
增加deploy下细分的tcp、tls、ssh
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
30
deploy/client/docker-compose.ssh.yml
Normal file
30
deploy/client/docker-compose.ssh.yml
Normal 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
|
||||
13
deploy/client/docker-compose.tcp.yml
Normal file
13
deploy/client/docker-compose.tcp.yml
Normal 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
|
||||
32
deploy/client/docker-compose.tls.yml
Normal file
32
deploy/client/docker-compose.tls.yml
Normal 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
|
||||
@@ -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
|
||||
|
||||
10
deploy/client/entrypoint.sh
Normal file
10
deploy/client/entrypoint.sh
Normal 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"
|
||||
Reference in New Issue
Block a user