Skip to content

Commit 9077b89

Browse files
ImTeikvinwang
andauthored
Make KMS configurable (#259)
* Make KMS image verification feature configurable * Uncomment default configs Co-authored-by: Kevin Wang <[email protected]> --------- Co-authored-by: Kevin Wang <[email protected]>
1 parent 7c8d79b commit 9077b89

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

kms/dstack-app/compose-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
WORKDIR /app
88
99
RUN apk add --no-cache git
10-
RUN git clone https://github.com/Dstack-TEE/dstack.git && \
10+
RUN git clone ${GIT_REPOSITORY} && \
1111
cd dstack && \
1212
git checkout ${GIT_REV}
1313
WORKDIR /app/dstack/kms/auth-eth

kms/dstack-app/deploy-to-vmm.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,15 @@ else
3232
# The URL of the dstack app image download URL
3333
# IMAGE_DOWNLOAD_URL=https://files.kvin.wang/images/mr_{OS_IMAGE_HASH}.tar.gz
3434
35+
# Image hash verification feature flag
36+
VERIFY_IMAGE=true
37+
3538
# The URL of the Ethereum RPC service
3639
ETH_RPC_URL=https://rpc.phala.network
3740
41+
# The Git repository to deploy
42+
GIT_REPOSITORY=https://github.com/Dstack-TEE/dstack.git
43+
3844
# The Git revision to deploy
3945
GIT_REV=HEAD
4046
@@ -56,6 +62,8 @@ required_env_vars=(
5662
"KMS_CONTRACT_ADDR"
5763
"ETH_RPC_URL"
5864
"IMAGE_DOWNLOAD_URL"
65+
"VERIFY_IMAGE"
66+
"GIT_REPOSITORY"
5967
)
6068

6169
for var in "${required_env_vars[@]}"; do
@@ -85,6 +93,8 @@ subvar KMS_CONTRACT_ADDR
8593
subvar GIT_REV
8694
subvar IMAGE_DOWNLOAD_URL
8795
subvar ADMIN_TOKEN_HASH
96+
subvar VERIFY_IMAGE
97+
subvar GIT_REPOSITORY
8898

8999
echo "Docker compose file:"
90100
cat "$COMPOSE_TMP"

kms/dstack-app/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cat <<EOF > ./kms.toml
66
admin_token_hash = "${ADMIN_TOKEN_HASH}"
77
88
[core.image]
9-
verify = true
9+
verify = ${VERIFY_IMAGE}
1010
cache_dir = "./images"
1111
download_url = "${IMAGE_DOWNLOAD_URL}"
1212
download_timeout = "2m"

0 commit comments

Comments
 (0)