Skip to content

Commit d2ae3f0

Browse files
committed
merge: telemetry-testnet into sync/0.7.2
2 parents ae3d6cd + c368419 commit d2ae3f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2913
-1378
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
.git
2+
**/.git
23
.build.env
34
test-suites
45
data
56
uv.lock
67
.venv
78
polkajam
9+
**/target/
10+
**/node_modules/
11+
**/__pycache__/
12+
logs/
13+
*.swp
14+
.DS_Store
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Deploy Testnet
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
workflow_dispatch:
7+
inputs:
8+
telemetry_host:
9+
description: 'Telemetry host (e.g., jamtart-32255.eastus.azurecontainer.io:9000)'
10+
required: false
11+
default: ''
12+
13+
env:
14+
RESOURCE_GROUP: tessera-testnet-rg
15+
ACR_NAME: tesseratestnetacr
16+
ACI_NAME: tessera-testnet
17+
DNS_LABEL: tessera-testnet
18+
LOCATION: eastus
19+
20+
jobs:
21+
deploy:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
token: ${{ secrets.PRIVATE_REPO_TOKEN }}
30+
submodules: false
31+
32+
- name: Init submodules
33+
run: |
34+
git submodule init deps/tsrkit-pvm deps/py-ark-vrf deps/rockstore deps/tsrkit-asm deps/tsrkit-types
35+
git -c "url.https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/.insteadOf=https://github.com/" \
36+
submodule update --recursive --depth 1 \
37+
deps/tsrkit-pvm deps/py-ark-vrf deps/rockstore deps/tsrkit-asm deps/tsrkit-types
38+
39+
- name: Azure Login
40+
uses: azure/login@v2
41+
with:
42+
creds: ${{ secrets.AZURE_CREDENTIALS }}
43+
44+
- name: Build image (Azure Cloud Build)
45+
run: |
46+
az acr build \
47+
--registry ${{ env.ACR_NAME }} \
48+
--platform linux/amd64 \
49+
--image tessera:${{ github.ref_name }} \
50+
--image tessera:latest \
51+
.
52+
53+
- name: Deploy to ACI
54+
run: |
55+
# Get ACR credentials
56+
ACR_LOGIN_SERVER=$(az acr show --name ${{ env.ACR_NAME }} --query loginServer -o tsv)
57+
ACR_USERNAME=$(az acr credential show --name ${{ env.ACR_NAME }} --query username -o tsv)
58+
ACR_PASSWORD=$(az acr credential show --name ${{ env.ACR_NAME }} --query "passwords[0].value" -o tsv)
59+
60+
# Delete existing
61+
az container delete --resource-group ${{ env.RESOURCE_GROUP }} --name ${{ env.ACI_NAME }} --yes 2>/dev/null || true
62+
63+
# Deploy
64+
az container create \
65+
--resource-group ${{ env.RESOURCE_GROUP }} \
66+
--name ${{ env.ACI_NAME }} \
67+
--image $ACR_LOGIN_SERVER/tessera:latest \
68+
--registry-login-server $ACR_LOGIN_SERVER \
69+
--registry-username $ACR_USERNAME \
70+
--registry-password "$ACR_PASSWORD" \
71+
--cpu 4 --memory 8 \
72+
--ports 19800 \
73+
--ip-address Public \
74+
--dns-name-label ${{ env.DNS_LABEL }} \
75+
--environment-variables TELEMETRY_HOST="${{ github.event.inputs.telemetry_host }}" \
76+
--restart-policy Always \
77+
--location ${{ env.LOCATION }}
78+
79+
- name: Verify deployment
80+
run: |
81+
sleep 30
82+
FQDN=$(az container show --resource-group ${{ env.RESOURCE_GROUP }} --name ${{ env.ACI_NAME }} --query ipAddress.fqdn -o tsv)
83+
echo "Deployed to: http://$FQDN:19800"
84+
85+
# Check container is running
86+
STATE=$(az container show --resource-group ${{ env.RESOURCE_GROUP }} --name ${{ env.ACI_NAME }} --query instanceView.state -o tsv)
87+
if [ "$STATE" != "Running" ]; then
88+
echo "Container state: $STATE"
89+
az container logs --resource-group ${{ env.RESOURCE_GROUP }} --name ${{ env.ACI_NAME }} || true
90+
exit 1
91+
fi
92+
echo "Container is running!"

.github/workflows/deploy-to-azure.yml

Lines changed: 0 additions & 259 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ fuzzer_session.json
9595
logs
9696

9797
jamtart
98-
# graypaper
98+
graypaper

0 commit comments

Comments
 (0)