|
| 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 | + |
0 commit comments