Skip to content

Commit

Permalink
values for outstanding stage reshare servers (#894)
Browse files Browse the repository at this point in the history
* values for outstanding stage reshare servers

* wrong party id

* remove unneded
  • Loading branch information
carlomazzaferro authored Jan 9, 2025
1 parent 7c7c62e commit 16ae90a
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 1 deletion.
61 changes: 61 additions & 0 deletions deploy/stage/smpcv2-0-stage/values-reshare-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
args:
- "--bind-addr"
- "0.0.0.0:7000"
- "--db-url"
- "$(SMPC__DATABASE__URL)"
- "--party-id"
- "0"
- "--environment"
- "$(ENVIRONMENT)"
- "--sender1-party-id"
- "1"
- "--sender2-party-id"
- "2"
- "--batch-size"
- "100"
- "--max-buffer-size"
- "10"
- "--healthcheck-port"
- "3001"

initContainer:
enabled: true
image: "amazon/aws-cli:2.17.62"
name: "reshare-proto-dns-records-updater"
env:
- name: PARTY_ID
value: "1"
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
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".stage.smpcv2.worldcoin.dev --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": "reshare-server.$PARTY_ID.stage.smpcv2.worldcoin.dev",
"TTL": 5,
"Type": "A",
"ResourceRecords": [{
"Value": "$MY_POD_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"
61 changes: 61 additions & 0 deletions deploy/stage/smpcv2-2-stage/values-reshare-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
args:
- "--bind-addr"
- "0.0.0.0:7000"
- "--db-url"
- "$(SMPC__DATABASE__URL)"
- "--party-id"
- "2"
- "--environment"
- "$(ENVIRONMENT)"
- "--sender1-party-id"
- "0"
- "--sender2-party-id"
- "1"
- "--batch-size"
- "100"
- "--max-buffer-size"
- "10"
- "--healthcheck-port"
- "3001"

initContainer:
enabled: true
image: "amazon/aws-cli:2.17.62"
name: "reshare-proto-dns-records-updater"
env:
- name: PARTY_ID
value: "3"
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
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".stage.smpcv2.worldcoin.dev --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": "reshare-server.$PARTY_ID.stage.smpcv2.worldcoin.dev",
"TTL": 5,
"Type": "A",
"ResourceRecords": [{
"Value": "$MY_POD_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"
1 change: 0 additions & 1 deletion iris-mpc-upgrade/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=proto/reshare.proto");
tonic_build::configure()
.out_dir("src/proto/")
.compile_protos(
Expand Down

0 comments on commit 16ae90a

Please sign in to comment.