DEPLOY.rst 2.26 KB
Newer Older
juga's avatar
juga committed
1
2
.. _deploy:

3
Deploying Simple Bandwidth Scanner
Matt Traudt's avatar
Matt Traudt committed
4
=====================================
5
6
7

So you want to run sbws for yourself. You will need

juga's avatar
juga committed
8
9
- A machine to run the :term:`scanner`.
- One or more :term:`destination` (s) that serve a large file.
10

Matt Traudt's avatar
Matt Traudt committed
11
12
Both |scanner_nick| and your |dests| should be on fast, well connected
machines.
13

Matt Traudt's avatar
Matt Traudt committed
14
15
|scanner_nick| requirements
-------------------------------
16

Matt Traudt's avatar
Matt Traudt committed
17
18
19
20
21
- A fast, well connected machine on the Internet. Ideally its bandwidth should
  not be a limiting factor in measurements.
- Linux host OS
- Python 3, virtualenv
- Tor installed with ``tor`` in your ``PATH``
22

Matt Traudt's avatar
Matt Traudt committed
23
24
|dests| requirements
-------------------------------
25

Matt Traudt's avatar
Matt Traudt committed
26
27
28
29
30
31
- A fast, well connected machine on the Internet. Ideally its bandwidth should
  not be a limiting factor in measurements.
- Some sort of webserver installed and running that supports HEAD and GET
  requests (apache and nginx fit this description)
- Optional support for TLS
- A large file; at the time of writing, at least 1 GiB in size
32

Matt Traudt's avatar
Matt Traudt committed
33
34
|scanner_nick| setup
-------------------------------
35
36


Matt Traudt's avatar
Matt Traudt committed
37
Install sbws according to :doc:`/INSTALL`.
38

Matt Traudt's avatar
Matt Traudt committed
39
40
Make sure you have initialized sbws. If you haven't already run ``sbws init``,
then enter your virtualenv and run it.
41

Matt Traudt's avatar
Matt Traudt committed
42
43
44
Inside |dotsbws| you will find ``config.ini``. Open it with a text editor. it
should be very simple. Let's give our scanner a nickname. Add the following
lines
45
46
47

::

Matt Traudt's avatar
Matt Traudt committed
48
49
    [scanner]
    nickname = D0ntD3@dOpen!nside
50

Matt Traudt's avatar
Matt Traudt committed
51
52
(Pick your own nickname. This one just demonstrates that you can use almost any
character)
53

Matt Traudt's avatar
Matt Traudt committed
54
55
Congratulations, you've learned how to add a section to your config file and
how to add an option to a section.
56

Matt Traudt's avatar
Matt Traudt committed
57
58
Remeber |dests|? We need to add them to ``config.ini``. We're going to assume
you have two you are ready to use and one that isn't quite ready yet.
59
60
61

::

Matt Traudt's avatar
Matt Traudt committed
62
63
64
65
    [destinations]
    foo = on
    bar = on
    baz = off
66

Matt Traudt's avatar
Matt Traudt committed
67
68
    [destinations.foo]
    url = http://fooshoomoo.com/sbws.bin
69

Matt Traudt's avatar
Matt Traudt committed
70
71
    [destinations.bar]
    url = https://barstoolsinc.com
72

Matt Traudt's avatar
Matt Traudt committed
73
74
    [destinations.baz]
    url = https://bazistan.com/ask/stan/where/the/file/is.exe
75

Matt Traudt's avatar
Matt Traudt committed
76
``foo`` demonstrates a typical case.
77

Matt Traudt's avatar
Matt Traudt committed
78
79
80
``bar`` demonstrates a case where you want to use HTTPS and want to assume the
large file for sbws to download is at its default path (probably
``/sbws.bin``).
juga's avatar
juga committed
81

Matt Traudt's avatar
Matt Traudt committed
82
``baz`` demonstrates a disabled destination that sbws will ignore.
juga's avatar
juga committed
83