Skip to content

Commit

Permalink
Add config server changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Jul 16, 2024
1 parent d5a67cb commit 7ba0fd1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/actions/build_eks_docker_image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ runs:
id: copy_docker_files
run: |
mkdir -p ${{ inputs.artifacts_output_dir }}
cp -r ./scripts/aws/config-server/* ${{ inputs.artifacts_output_dir }}
cp -r ./scripts/aws/eks/pod/* ${{ inputs.artifacts_output_dir }}
ls -l ${{ inputs.artifacts_output_dir }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-aws-eks-nitro-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
steps:
- name: Build Docker Image for EKS Pod
id: build_docker_image
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@tjm-UID2-3706-eks-eif-build
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@kcc-UID2-3702-config-server
with:
identity_scope: uid2
artifacts_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2
Expand All @@ -159,7 +159,7 @@ jobs:
steps:
- name: Build Docker Image for EKS Pod
id: build_docker_image
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@tjm-UID2-3706-eks-eif-build
uses: IABTechLab/uid2-operator/.github/actions/build_eks_docker_image@kcc-UID2-3702-config-server
with:
identity_scope: euid
artifacts_output_dir: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid
Expand Down
Binary file added config-server/__pycache__/app.cpython-310.pyc
Binary file not shown.
8 changes: 8 additions & 0 deletions scripts/aws/eks/pod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM amazonlinux:2023

EXPOSE 27015

RUN yum install aws-nitro-enclaves-cli-devel jq -y
RUN dnf install aws-nitro-enclaves-cli -y
# RUN yum install -y libxcrypt-compat
Expand All @@ -16,4 +19,9 @@ COPY ./proxies.host.yaml /home/proxies.host.yaml
RUN chmod +x /home/vsockpx && chmod +x /home/entrypoint.sh
# RUN yum install net-tools -y

COPY ./app.py /home/config-server/
COPY ./requirements.txt /home/config-server/
RUN python3 -m venv config-server
RUN config-server/bin/pip3 install -r requirements.txt

CMD ["/home/entrypoint.sh"]
5 changes: 5 additions & 0 deletions scripts/aws/eks/pod/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function setup_dante() {
/home/sockd -D
}

function run_config_server() {
config-server/bin/flask run --host 127.0.0.1 --port 27015
}

function run_enclave() {
echo "starting enclave..."
nitro-cli run-enclave --cpu-count $CPU_COUNT --memory $MEMORY_MB --eif-path $EIF_PATH --enclave-cid $CID --enclave-name simple-eif --debug-mode --attach-console
Expand All @@ -32,4 +36,5 @@ function run_enclave() {
terminate_old_enclave
setup_vsockproxy
setup_dante
run_config_server
run_enclave

0 comments on commit 7ba0fd1

Please sign in to comment.