Skip to content
Draft
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
19 changes: 19 additions & 0 deletions deployment/testnet/frodo2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# MPC Docker image override
MPC_IMAGE_NAME=nearone/mpc-node
MPC_IMAGE_TAGS=barak-doc-update_localnet_guide-b12bc7d
MPC_REGISTRY=registry.hub.docker.com

# MPC node settings
MPC_ACCOUNT_ID=barak_tee_test1_frodo2.testnet
MPC_LOCAL_ADDRESS=127.0.0.1
MPC_SECRET_STORE_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
MPC_CONTRACT_ID=barak_tee_test1.testnet
MPC_ENV=testnet
MPC_HOME_DIR=/data
RUST_BACKTRACE=full
RUST_LOG=info

NEAR_BOOT_NODES=ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24568,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24568,ed25519:[email protected]:24567,ed25519:[email protected]:24568,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567,ed25519:[email protected]:24567

# Port forwarding
PORTS=8080:8080,24567:24567,13001:13001,2080:2080
48 changes: 48 additions & 0 deletions deployment/testnet/frodo2.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Required environment variables for Launcher / MPC app deployment.
# Please uncomment and set values for the following variables:

APP_NAME="frodo2_testnet_tee"

# VMM_RPC -The RPC of the dstack-vmm RPC service used to deploy CVMs
# Can either be a unix socket or an http address. (make sure this is the same configuration as in the dstack-vmm service.toml)

#VMM_RPC=unix:../../../build/vmm.sock

VMM_RPC=http://127.0.0.1:10000

# The type of sealing key to used by the VM (SGX,KMS)
# KMS should only be used for deployment and SGX for production.
SEALING_KEY_TYPE=SGX

# Port on the host machine to connect to the dstack guest agent
EXTERNAL_DSTACK_AGENT_PORT=127.0.0.1:18091

EXTERNAL_SSH_PORT=127.0.0.1:1220

# External MPC ports (host machine)
EXTERNAL_MPC_PUBLIC_DEBUG_PORT=127.0.0.1:18081
EXTERNAL_MPC_LOCAL_DEBUG_PORT=127.0.0.1:3031
EXTERNAL_MPC_DECENTRALIZED_STATE_SYNC=51.89.199.47:24567
EXTERNAL_MPC_MAIN_PORT=51.89.199.47:13001

# Internal MPC ports (inside CVM)
INTERNAL_MPC_PUBLIC_DEBUG_PORT=8080
INTERNAL_MPC_LOCAL_DEBUG_PORT=3030 # ✅ Matches container listener
INTERNAL_MPC_DECENTRALIZED_STATE_SYNC=24567
INTERNAL_MPC_MAIN_PORT=13001

# The dstack OS image name use for the CVM

# production OS image
#OS_IMAGE=dstack-0.5.4

# development OS image
OS_IMAGE=dstack-dev-0.5.4

# Path of the launcher docker_compose_file
DOCKER_COMPOSE_FILE_PATH=launcher_docker_compose.yaml
# Path of the user_config file
USER_CONFIG_FILE_PATH=../deployment/testnet/frodo2.conf

# for testing use a smaller disk size 128G
DISK=500G
40 changes: 40 additions & 0 deletions tee_launcher/scripts/update_ports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -euo pipefail

# Hard-coded VM ID
VM_ID="301e47cc-f9e7-40b8-bb95-c734fdd257ab"

# Hard-coded VMM RPC
VMM_RPC="http://127.0.0.1:10000"

# Path to vmm-cli, wrapped with python3
CLI="python3 /mnt/data/barak/dstack/vmm/src/vmm-cli.py --url $VMM_RPC"

# Hard-coded port mappings
PORTS=(
"tcp:127.0.0.1:18092:8090"
"tcp:127.0.0.1:1221:22"
"tcp:57.129.140.254:18082:8080"
"tcp:127.0.0.1:3032:3030"
"tcp:57.129.140.254:13002:13002"
"tcp:57.129.140.254:24567:24567"
"tcp:57.129.140.254:2080:2080"
)

echo "Updating ports for VM: $VM_ID"

echo "Stopping VM..."
$CLI stop "$VM_ID" || true

echo "Updating port mappings..."
PORT_ARGS=()
for p in "${PORTS[@]}"; do
PORT_ARGS+=( "--port" "$p" )
done

$CLI update-ports "$VM_ID" "${PORT_ARGS[@]}"

echo "Starting VM..."
$CLI start "$VM_ID"

echo "Done!"
40 changes: 40 additions & 0 deletions tee_launcher/scripts/update_ports_frodo2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -euo pipefail

# Hard-coded VM ID
VM_ID="04ffdac4-09f8-4a4e-9813-d1e3f0c27e02"

# Hard-coded VMM RPC
VMM_RPC="http://127.0.0.1:10000"

# Path to vmm-cli, wrapped with python3
CLI="python3 /mnt/data/barak/dstack/vmm/src/vmm-cli.py --url $VMM_RPC"

# Hard-coded port mappings
PORTS=(
"tcp:127.0.0.1:18091:8090"
"tcp:127.0.0.1:1220:22"
"tcp:51.89.199.47:18081:8080"
"tcp:127.0.0.1:3031:3030"
"tcp:51.89.199.47:13001:13001"
"tcp:51.89.199.47:24567:24567"
"tcp:51.89.199.47:2080:2080"
)

echo "Updating ports for VM: $VM_ID"

echo "Stopping VM..."
$CLI stop "$VM_ID" || true

echo "Updating port mappings..."
PORT_ARGS=()
for p in "${PORTS[@]}"; do
PORT_ARGS+=( "--port" "$p" )
done

$CLI update-ports "$VM_ID" "${PORT_ARGS[@]}"

echo "Starting VM..."
$CLI start "$VM_ID"

echo "Done!"