Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update configurations for prod deployment #521

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions deploy/prod/common-values-iris-mpc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc:v0.6.7"
image: "ghcr.io/worldcoin/iris-mpc:v0.8.21"

environment: prod
replicaCount: 1
Expand Down Expand Up @@ -30,15 +30,17 @@ readinessProbe:

resources:
limits:
cpu: 31
memory: 120Gi
nvidia.com/gpu: 1
vpc.amazonaws.com/efa: 1
cpu: 192
memory: 1000Gi
nvidia.com/gpu: 8
hugepages-2Mi: 5Gi
vpc.amazonaws.com/efa: 32
requests:
cpu: 30
memory: 110Gi
nvidia.com/gpu: 1
vpc.amazonaws.com/efa: 1
cpu: 190
memory: 1000Gi
nvidia.com/gpu: 8
hugepages-2Mi: 5Gi
vpc.amazonaws.com/efa: 32

imagePullSecrets:
- name: github-secret
Expand Down
46 changes: 44 additions & 2 deletions deploy/prod/smpcv2-0-prod/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
value: "eth0"

- name: NCCL_COMM_ID
value: "10.15.33.72:4000"
value: "iris-mpc-node.1.smpcv2.worldcoin.org:4000"

- name: RUST_BACKTRACE
value: "full"
Expand Down Expand Up @@ -63,7 +63,7 @@ env:
value: "0"

- name: SMPC__PUBLIC_KEY_BASE_URL
value: "https://pki-smpcv2-prod.worldcoin.org"
value: "https://pki-smpc.worldcoin.org"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"
Expand All @@ -76,3 +76,45 @@ env:

- name: SMPC__MAX_BATCH_SIZE
value: "64"

initContainer:
enabled: true
image: "amazon/aws-cli:2.17.62"
name: "iris-mpc-dns-records-updater"
env:
- name: PARTY_ID
value: "1"
- name: MY_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
configMap:
init.sh: |
#!/usr/bin/env bash

# Set up environment variables
HOSTED_ZONE_ID=$(aws route53 list-hosted-zones-by-name --dns-name "$PARTY_ID".smpcv2.worldcoin.org --query "HostedZones[].Id" --output text)

# Generate the JSON content in memory
BATCH_JSON=$(cat <<EOF
{
"Comment": "Upsert the A record for upgrade-server",
"Changes": [
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "iris-mpc-node.$PARTY_ID.smpcv2.worldcoin.org",
"TTL": 5,
"Type": "A",
"ResourceRecords": [{
"Value": "$MY_NODE_IP"
}]
}
}
]
}
EOF
)

# Execute AWS CLI command with the generated JSON
aws route53 change-resource-record-sets --hosted-zone-id "$HOSTED_ZONE_ID" --change-batch "$BATCH_JSON"
4 changes: 2 additions & 2 deletions deploy/prod/smpcv2-1-prod/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
value: "eth0"

- name: NCCL_COMM_ID
value: "10.15.33.72:4000"
value: "iris-mpc-node.1.smpcv2.worldcoin.org:4000"

- name: SMPC__ENVIRONMENT
value: "prod"
Expand Down Expand Up @@ -63,7 +63,7 @@ env:
value: "1"

- name: SMPC__PUBLIC_KEY_BASE_URL
value: "https://pki-smpcv2-prod.worldcoin.org"
value: "https://pki-smpc.worldcoin.org"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"
Expand Down
4 changes: 2 additions & 2 deletions deploy/prod/smpcv2-2-prod/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
value: "eth0"

- name: NCCL_COMM_ID
value: "10.15.33.72:4000"
value: "iris-mpc-node.1.smpcv2.worldcoin.org:4000"

- name: SMPC__ENVIRONMENT
value: "prod"
Expand Down Expand Up @@ -63,7 +63,7 @@ env:
value: "2"

- name: SMPC__PUBLIC_KEY_BASE_URL
value: "https://pki-smpcv2-prod.worldcoin.org"
value: "https://pki-smpc.worldcoin.org"

- name: SMPC__CLEAR_DB_BEFORE_INIT
value: "true"
Expand Down
Loading