gopkg.in/dedis/onet.v2@v2.0.0-20181115163211-c8f3724038a7/simul/platform/DETERLAB.md (about) 1 Navigation: [DEDIS](https://github.com/dedis/doc/tree/master/README.md) :: 2 [Onet](../../README.md) :: 3 [Simulation](../README.md) :: 4 Deterlab 5 6 # Deterlab Simulation 7 8 The first implementation of a simulation (even before localhost) was a deterlab 9 simulation that allowed to run CoSi on https://deterlab.net. Deterlab is a 10 _state-of-the-art scientific computing facility for cyber-security researchers 11 engaged in research, development, discovery, experimentation, and testing of 12 innovative cyber-security technology_. It allows to reserve computers and define 13 the network between those. Using onet, it is very simple to pass from a localhost 14 simulation to a simulation using Deterlab. 15 16 Before a successful Deterlab simulation, you need to 17 18 1. be signed up at Deterlab. If you're working with DEDIS, ask your 19 responsible for the _Project Name_ and the _Group Name_. 20 2. create a simulation defined by an NS-file. You can find a simple 21 NS-file here: [deterlab_users/cothority.ns] 22 3. swap the simulation in 23 24 For point 3. it is important of course that Deterlab has enough machines 25 available at the moment of your experiment. If machines are missing, you might 26 change the NS-file to reference machines that are available. Attention: different 27 machines have different capabilities and can run more or less nodes, depending 28 on the power of the machine. 29 30 Supposing you have the points 1., 2., 3., solved, you can go on to the next step. 31 32 ## Preparing automatic login 33 34 For easier simulation, you should prepare your ssh client to allow automatic 35 login to the remote server. If you login to the https://deterlab.net website, 36 go to _My DeterLab_ (on top), then _Profile_ (one of the tabs in the middle), 37 and finally chose _Edit SSH keys_ from the left. Now you can add your public 38 ssh-key to the list of allowed keys. Verify everything is running by checking 39 that you're not asked for your password when doing 40 41 ```bash 42 ssh username@users.deterlab.net 43 ``` 44 45 ## Running a Deterlab Simulation 46 47 If you have a successful [localhost](Localhost.md) simulation, it is very easy 48 to run it on Deterlab. Make sure the experiment is swapped in, then you can 49 start it with: 50 51 ```go 52 go build && ./simul -platform deterlab simul.toml 53 ``` 54 55 Of course you'll need to adjust the `simul` and `simul.toml` to fit your 56 experiment. When running for the first time, the simulation will ask you for 57 your user-name, project and experiment. For the hostname of deterlab and the 58 monitor address, you can accept the default values. It will store all this in the 59 `deter.toml` file, where you can also change it. Or you delete the file, if you 60 want to enter the information again. 61 62 ## Monitoring Port 63 64 During the experiment, your computer will play the role as the organizer and 65 start all the experiments on the remote deterlab network. This means, that 66 your computer needs to be online during the whole experiment. 67 68 To communicate with Deterlab, the simulation starts a ssh-tunnel to deterlab.net 69 where all information from the simulation are received. As there might 70 be more than one person using deterlab, and all users need to go through 71 users.deterlab.net, you might want to change the port-number you're using. It's 72 as easy as: 73 74 ```go 75 ./simul -platform deterlab -mport 10002 simult.toml 76 ``` 77 78 This will use port 10002 to communicate with deterlab. Be sure to increment by 79 2, so only use even numbers. 80 81 ## Oversubscription 82 83 If you have more nodes than available servers, the simulation will put multiple 84 cothority-nodes on the same server. When creating the `Tree` in 85 `Simulation.Setup`, it will make sure that any parent-children connection will 86 go through the network, so that every communication between a parent and a 87 child will go through the bandwidth and timing restrictions. 88 89 Unfortunately this means that not all nodes will have these restrictions, and 90 in the case of a broadcast with oversubscription, some nodes might communicate 91 directly with the other nodes. If you need a fully restricted network, you 92 need to use [Mininet](MININET.md)