-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·110 lines (95 loc) · 3.6 KB
/
deploy.sh
File metadata and controls
executable file
·110 lines (95 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
# deploy.sh - vLEI workshop module infrastructure deploy script
# Sets up schema server, six witnesses, KERIA server, verifier (sally), and a webhook
set -e
echo "vLEI module infrastructure deploying..."
# Check if Docker is available
if ! command -v docker &> /dev/null; then
echo "Docker not found. Please install Docker first."
exit 1
fi
# Check if docker compose is available
if ! command -v docker compose &> /dev/null; then
echo "docker compose not found. Please install docker compose first."
exit 1
fi
# Create Docker network if it doesn't exist
echo "Creating vlei-workshop docker network network..."
docker network create vlei_workshop --driver bridge 2>/dev/null || echo "vlei_workshop network already exists"
# Stop and remove existing containers
echo "Cleaning up existing containers..."
docker compose down --remove-orphans --volumes 2>/dev/null || true
# Build and start services
echo "Starting services and waiting to come up..."
docker compose up --wait -d
# Check service health
echo "Checking service health..."
# Check vLEI server
if curl -f http://127.0.0.1:7723/oobi/EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao >/dev/null 2>&1; then
echo "vLEI Server is healthy"
else
echo "vLEI Server is not responding"
fi
# Check witnesses
witness_urls=(
"http://127.0.0.1:5642/oobi" # wan
"http://127.0.0.1:5643/oobi" # wil
"http://127.0.0.1:5644/oobi" # wes
"http://127.0.0.1:5645/oobi" # wit
"http://127.0.0.1:5646/oobi" # wub
"http://127.0.0.1:5647/oobi" # wyz
)
for wit_url in "${witness_urls[@]}"; do
if curl -f "$wit_url" >/dev/null 2>&1; then
echo "Witness at $wit_url is healthy"
else
echo "Witness at $wit_url is not responding"
fi
done
# Check KERIA
if curl -f http://127.0.0.1:3902/spec.yaml >/dev/null 2>&1; then
echo "KERIA is healthy"
else
echo "KERIA is not responding"
fi
# Check hook service
if curl -f http://127.0.0.1:9923/health >/dev/null 2>&1; then
echo "Hook service is healthy"
else
echo "Hook service is not responding"
fi
# Check verifier service
if curl -f http://127.0.0.1:9723/health >/dev/null 2>&1; then
echo "Verifier service is healthy"
else
echo "Verifier service is not responding"
fi
echo ""
echo "Deployment complete"
echo ""
echo "Service URLs:"
echo " schema (vLEI svr): http://127.0.0.1:7723"
echo " Witnesses: http://127.0.0.1:5642 (wan)"
echo " http://127.0.0.1:5643 (wil)"
echo " http://127.0.0.1:5644 (wes)"
echo " http://127.0.0.1:5645 (wit)"
echo " http://127.0.0.1:5646 (wub)"
echo " http://127.0.0.1:5647 (wyz)"
echo " KERIA: http://127.0.0.1:3901 (admin)"
echo " http://127.0.0.1:3902 (HTTP)"
echo " http://127.0.0.1:3903 (boot)"
echo " Verifier (sally): http://127.0.0.1:9723"
echo " Webhook: http://127.0.0.1:9923"
echo ""
echo "Next steps:"
echo " 1. Run ./task-scripts/create-geda-aid.sh to create the GEDA AID"
echo " 2. Run ./task-scripts/create-qvi-aid.sh to create the QVI AID"
echo " 3. Run ./task-scripts/create-le-aid.sh to create the LE AID"
echo " 4. Run ./task-scripts/create-person-aid.sh to create the Person AID"
echo " 5. Run ./task-scripts/create-qvi-acdc-credential.sh to issue QVI credential"
echo " 6. Run ./task-scripts/create-le-acdc-credential.sh to issue LE credential"
echo " 7. Run ./task-scripts/create-oor-acdc-credential.sh to issue OOR credentials"
echo ""
echo "To stop the environment, run ./stop.sh"
echo "To run the whole process above run ./run-all.sh"
echo ""