@@ -355,6 +355,27 @@ results.
355
355
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/report-2022-1-capucine-badr-d-voting-frontend.pdf">Report</a>,
356
356
<a href="https://www.epfl.ch/labs/dedis/wp-content/uploads/2022/07/presentation-2022-1-capucine-badr-d-voting-frontend.pdf">Presentation</a>
357
357
</td>
358
+ </tr>
359
+ <tr>
360
+ <td>Fall 2022</td>
361
+ <td>Students: Amine Benaziz, Albert Troussard<br>Supervisor: Noémien Kocher, Pierluca Borso<br>Assistant: Emilien Duc</td></td>
362
+ <td></td>
363
+ <td>
364
+ </td>
365
+ </tr>
366
+ <tr>
367
+ <td>Fall 2022</td>
368
+ <td>Students: Ahmed Elalamy, Ghita Tagemouati, Khadija Tagemouati<br>Supervisor: Noémien Kocher</td></td>
369
+ <td></td>
370
+ <td>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <td>Fall 2022</td>
375
+ <td>Students: Chen Chang Lew<br>Supervisor: Noémien Kocher, Pierluca Borso</td></td>
376
+ <td></td>
377
+ <td>
378
+ </td>
358
379
</tr>
359
380
</table >
360
381
@@ -375,85 +396,70 @@ added to you path (like with `export PATH=$PATH:/Users/david/go/bin`).
375
396
376
397
3: [ Install tmux] ( https://github.com/tmux/tmux/wiki/Installing )
377
398
378
- # Setup a simple system with 3 nodes
379
-
380
- If you are using Windows and cannot use tmux, you need to do the actions of the
381
- scripts in point _ 1_ and _ 2_ manually: open 3 terminal sessions and run the
382
- commands from the section _ Run the nodes_ below (1 command LLVL=info memcoin etc.
383
- per terminal and then launch the setup script in another terminal). You can then
384
- follow the instructions below starting from point _ 3_ .
399
+ # Setup a simple system with 5 nodes (Linux and MacOS)
385
400
386
- 1: Run 3 nodes
401
+ If you are using Windows and cannot use tmux, you need to follow the instructions in [ this] ( #Setup-a-simple-system-with-5-nodes-(Windows) )
402
+ section.
387
403
404
+ 1: Only for the first time
388
405
``` sh
389
- ./runNode.sh -n 3
406
+ cd web/backend
407
+ npm install
408
+ cp config.env.template config.env
409
+ cd ../frontend
410
+ npm install
411
+ cd ../..
390
412
```
391
413
392
- This will run 4 terminal sessions. You can navigate by hitting
393
- <kbd >CTRL</kbd >+<kbd >B</kbd > and then <kbd >S</kbd >. Use the arrows to select a
394
- window.
414
+ 2: Then run the following script to start and setup the nodes and the web server:
395
415
396
- 2: Launch the setup
397
416
398
- From the first terminal sessions, run:
399
417
400
418
``` sh
401
- ./setupnNode .sh -n 3
419
+ ./runSystems .sh -n 5
402
420
```
403
421
404
- 3: Launch the web backend
422
+ This will run 8 terminal sessions. You can navigate by hitting
423
+ <kbd >CTRL</kbd >+<kbd >B</kbd > and then <kbd >S</kbd >. Use the arrows to select a
424
+ window.
405
425
406
- From a new terminal session, run:
407
426
408
- ``` sh
409
- cd web/backend
410
- # if this is the first time, run `npm install` and `cp config.env.template config.env` first
411
- npm start
412
- ```
427
+ 3: Stop nodes
428
+ If you want to stop the system, you can use the following command:
413
429
414
- 4: Launch the web frontend
430
+ (If you forgot, this will be done automatically when you start a new system)
415
431
416
- From a new terminal session, run:
417
-
418
- ``` sh
419
- cd web/frontend
420
- # if this is the first time, run `npm install` first
421
- REACT_APP_PROXY=http://localhost:9081 REACT_APP_NOMOCK=on npm start
422
- ```
423
-
424
- Note that you need to be on EPFL's network to login with Tequila. Additionally,
425
- once logged with Tequila, update the redirect URL and replace
426
- ` dvoting-dev.dedis.ch ` with ` localhost ` . Once logged, you can create an
427
- form.
428
-
429
- 5: Stop nodes
430
432
431
433
``` sh
432
434
./kill_test.sh
433
435
```
434
436
435
- 6 : Troubleshoot
437
+ 4 : Troubleshoot
436
438
437
439
If while running
438
440
439
441
``` sh
440
- npm start
442
+ ./runSystems.sh -n 5
441
443
```
442
444
443
- in the web backend folder, you get this error:
445
+ You get this error:
444
446
445
447
``` sh
446
448
Error: listen EADDRINUSE: address already in use :::5000
447
449
```
448
450
449
- then run this instead :
451
+ then in the file runSystems.sh, replace the line :
450
452
451
453
``` sh
452
- PORT=4000 npm start
454
+ tmux send-keys -t $s :{end} " cd web/backend && npm start" C-m
455
+ ```
456
+ with
457
+ ``` sh
458
+ tmux send-keys -t $s :{end} " cd web/backend && PORT=4000 npm start" C-m
453
459
# or any other available port
454
460
```
455
461
456
- and in the web/frontend/src/setupProxy.js file, change :
462
+ And in the web/frontend/src/setupProxy.js file, change :
457
463
458
464
``` sh
459
465
target: ' http://localhost:5000' ,
465
471
target: ' http://localhost:4000' ,
466
472
```
467
473
468
- # Run the nodes
474
+ # Setup a simple system with 3 nodes (Windows)
469
475
470
476
In three different terminal sessions, from the root folder:
471
477
@@ -502,24 +508,36 @@ remove the old state:
502
508
rm -rf /tmp/node{1,2,3}
503
509
```
504
510
505
- # Testing
511
+ 3: Launch the web backend
512
+
513
+ From a new terminal session, run:
514
+
515
+ ``` sh
516
+ cd web/backend
517
+ # if this is the first time, run `npm install` and `cp config.env.template config.env` first
518
+ npm start
519
+ ```
506
520
507
- ## Automate the previous setup using ` tmux `
521
+ 4: Launch the web frontend
508
522
509
- If you have ` tmux ` installed, you can start a ` tmux ` session that will
510
- execute the above setup by running in the project root ` ./runNode.sh -n 3 ` .
511
- This command takes as argument the number of nodes.
512
- Once the session is started, you can move around the panes with
513
- ` Ctrl+B ` followed by arrow keys or by ` N ` . You can also have an overview of the
514
- windows with ` Ctrl+B ` followed by ` S ` .
523
+ From a new terminal session, run:
515
524
516
- To end the session, run ` ./kill_test.sh ` ,
517
- which will kill each window then the ` tmux ` session (which you can do manually
518
- with ` Ctrl+D ` ), then delete the node data (i.e. the files ` /tmp/node{1,2,3} ` ).
525
+ ``` sh
526
+ cd web/frontend
527
+ # if this is the first time, run `npm install` first
528
+ REACT_APP_PROXY=http://localhost:9081 REACT_APP_NOMOCK=on npm start
529
+ ```
530
+
531
+ Note that you need to be on EPFL's network to login with Tequila. Additionally,
532
+ once logged with Tequila, update the redirect URL and replace
533
+ ` dvoting-dev.dedis.ch ` with ` localhost ` . Once logged, you can create an
534
+ form.
535
+
536
+ # Testing
519
537
520
538
## Run the scenario test
521
539
522
- If nodes are running and ` setup.sh ` or ` ./setupnNode .sh -n 3 ` has been called,
540
+ If nodes are running and ` setup.sh ` or ` ./runSystem .sh -n 3 --backend false --frontend false ` (for this test you don't want the user interface so the web components are not needed) has been called,
523
541
you can run a test scenario:
524
542
525
543
``` sh
@@ -540,7 +558,10 @@ Public key: `adbacd10fdb9822c71025d6d00092b8a4abb5ebcb673d28d863f7c7c5adaddf3`
540
558
541
559
Secret key: ` 28912721dfd507e198b31602fb67824856eb5a674c021d49fdccbe52f0234409 `
542
560
543
- ## Run the scenario test with docker
561
+ <!-- -
562
+ Currently not working
563
+
564
+ ## Run the scenario test with docker
544
565
545
566
Use the following commands to launch and set up nodes, and start the scenario
546
567
test with user defined number of nodes.
@@ -571,6 +592,8 @@ N.B. run following commands to get help
571
592
./autotest.sh -h
572
593
```
573
594
595
+ -->
596
+
574
597
# Use the frontend
575
598
576
599
See README in ` web/ ` .
0 commit comments