From 9d2ad2e11191c906158b96b90631a99d2614836a Mon Sep 17 00:00:00 2001 From: Thomas Manson Date: Tue, 24 Sep 2024 12:02:08 +1000 Subject: [PATCH] Set sockd to executable --- scripts/aws/eks-pod/Dockerfile | 2 +- scripts/aws/eks-pod/entrypoint.sh | 27 +++++++++++++-------------- scripts/aws/eks-pod/sockd_eks.conf | 6 +++--- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/scripts/aws/eks-pod/Dockerfile b/scripts/aws/eks-pod/Dockerfile index f386c80d8..de1a30af5 100644 --- a/scripts/aws/eks-pod/Dockerfile +++ b/scripts/aws/eks-pod/Dockerfile @@ -31,7 +31,7 @@ COPY ./entrypoint.sh /home/ COPY ./uid2operator.eif /home/ COPY ./proxies.host.yaml /home/proxies.host.yaml -RUN chmod +x /home/vsockpx && chmod +x /home/entrypoint.sh +RUN chmod +x /home/vsockpx && chmod +x /home/entrypoint.sh && chmod +x /home/sockd COPY ./app.py /home/config-server/ COPY ./requirements.txt /home/config-server/ diff --git a/scripts/aws/eks-pod/entrypoint.sh b/scripts/aws/eks-pod/entrypoint.sh index 349113f0f..43eea7a11 100644 --- a/scripts/aws/eks-pod/entrypoint.sh +++ b/scripts/aws/eks-pod/entrypoint.sh @@ -36,8 +36,7 @@ function setup_vsockproxy() { function setup_dante() { echo "setup_dante" ulimit -n 1024 - /home/sockd -D -d - sleep infinity + /home/sockd -D } function start_syslog() { @@ -107,15 +106,15 @@ echo "started syslog-ng" debug setup_vsockproxy setup_dante -#run_config_server -#wait_for_config -#update_config -#run_enclave - -#sleep 60s -#ENCLAVE_ID=$(nitro-cli describe-enclaves | jq -r ".[0].EnclaveID") -#while [ "$ENCLAVE_ID" != "null" ]; -#do -# ENCLAVE_ID=$(nitro-cli describe-enclaves | jq -r ".[0].EnclaveID") -# sleep 10s -#done; +run_config_server +wait_for_config +update_config +run_enclave + +sleep 60s +ENCLAVE_ID=$(nitro-cli describe-enclaves | jq -r ".[0].EnclaveID") +while [ "$ENCLAVE_ID" != "null" ]; +do + ENCLAVE_ID=$(nitro-cli describe-enclaves | jq -r ".[0].EnclaveID") + sleep 10s +done; diff --git a/scripts/aws/eks-pod/sockd_eks.conf b/scripts/aws/eks-pod/sockd_eks.conf index 7afbd2a39..0e588fb7c 100644 --- a/scripts/aws/eks-pod/sockd_eks.conf +++ b/scripts/aws/eks-pod/sockd_eks.conf @@ -1,11 +1,11 @@ +#logoutput: stdout +errorlog: stdout +#debug: 2 internal: 127.0.0.1 port = 3306 external: eth0 user.notprivileged: ec2-user clientmethod: none socksmethod: none -logoutput: stdout -errorlog: stdout -debug: 2 client pass { from: 127.0.0.1/32 to: 127.0.0.1/32