Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 6e3aa2e

Browse files
authored
Merge pull request #1 from ZKStats/add-depolying-infra
Add local deployment docs
2 parents 87ebfc6 + b74f26c commit 6e3aa2e

File tree

8 files changed

+134
-15
lines changed

8 files changed

+134
-15
lines changed

docs/getting-started/deployment.md

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "Depolying the Infrastructure",
3+
"link": {
4+
"type": "generated-index"
5+
}
6+
}
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "On a Local Server",
3+
"link": {
4+
"type": "generated-index"
5+
}
6+
}
7+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: "Manually"
3+
sidebar_position: 2
4+
---
5+
6+
# Manual Deployment
7+
8+
## Procedure
9+
1. Install Poetry by following the instructions [here](https://python-poetry.org/docs/#installation).
10+
11+
2. Clone the repository and cd to the repository root:
12+
```bash
13+
git clone https://github.com/ZKStats/mpc-demo-infra.git
14+
cd mpc-demo-infra
15+
```
16+
17+
3. Install the dependencies:
18+
Ubuntu:
19+
```bash
20+
./setup_env.sh --setup-mpspdz
21+
```
22+
Other environments:
23+
(TO BE ADDED)
24+
25+
4. Create the following configuration files at the repository root:
26+
- `.env.coord`
27+
```
28+
PORT=8005
29+
PARTY_HOSTS=["localhost", "localhost", "localhost"]
30+
PARTY_PORTS=[8006, 8007, 8008]
31+
PARTY_API_KEY=81f47c24b9fbe22421ea3ae92a9cc8f6
32+
PARTY_WEB_PROTOCOL=http
33+
PROHIBIT_MULTIPLE_CONTRIBUTIONS=False
34+
USER_QUEUE_HEAD_TIMEOUT=60
35+
FREE_PORTS_START=8010
36+
FREE_PORTS_END=8100
37+
```
38+
- `.env.party`
39+
```
40+
COORDINATION_SERVER_URL=http://localhost:8005
41+
PARTY_API_KEY=81f47c24b9fbe22421ea3ae92a9cc8f6
42+
PARTY_HOSTS=["localhost", "localhost", "localhost"]
43+
PARTY_PORTS=[8006, 8007, 8008]
44+
PARTY_WEB_PROTOCOL=http
45+
MAX_DATA_PROVIDERS=1000
46+
PERFORM_COMMITMENT_CHECK=False
47+
```
48+
- `.env.consumer_api`
49+
```
50+
COORDINATION_SERVER_URL=http://localhost:8005
51+
CERTS_PATH=certs
52+
PARTY_HOSTS=["localhost", "localhost", "localhost"]
53+
PARTY_PORTS=["8006","8007","8008"]
54+
PARTY_WEB_PROTOCOL=http
55+
PORT=8004
56+
```
57+
58+
5. Start the Coordination Server
59+
```bash
60+
poetry run coord-run
61+
```
62+
63+
6. Start the Computation Party Servers
64+
1. Open a new terminal, start party-0:
65+
```bash
66+
PORT=8006 PARTY_ID=0 poetry run party-run
67+
```
68+
69+
2. Open a new terminal and run party-1:
70+
```bash
71+
PORT=8007 PARTY_ID=1 poetry run party-run
72+
```
73+
74+
3. Open a new terminal and run party-2:
75+
```bash
76+
PORT=8008 PARTY_ID=2 poetry run party-run
77+
```
78+
79+
7. Start the Data Consumer API Server
80+
```bash
81+
poetry run consumet-api-run
82+
```
83+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Using Docker"
3+
sidebar_position: 1
4+
---
5+
6+
# Docker Deployment
7+
8+
1. Install `Docker` by following the instructions [here](https://docs.docker.com/engine/install/).
9+
1. Install `Docker Compose` by following the instructions [here](https://docs.docker.com/compose/install/).
10+
1. Build and start all servers with:
11+
```bash
12+
./configure.py
13+
docker-compose up --build
14+
```
15+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"label": "On Remote Servers",
3+
"link": {
4+
"type": "generated-index"
5+
}
6+
}
7+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Manually"
3+
sidebar_position: 2
4+
---
5+
6+
# Manual Deployment
7+
8+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Using Docker"
3+
sidebar_position: 1
4+
---
5+
6+
# Docker Deployment
7+

0 commit comments

Comments
 (0)