2015-10-28 16:54:37 +00:00
|
|
|
=========================
|
|
|
|
Magic Folder Set-up Howto
|
|
|
|
=========================
|
|
|
|
|
2016-12-12 21:48:13 +00:00
|
|
|
#. `This document`_
|
|
|
|
#. `Setting up a local test grid`_
|
|
|
|
#. `Setting up Magic Folder`_
|
|
|
|
#. `Testing`_
|
2015-11-02 14:14:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
This document
|
|
|
|
=============
|
|
|
|
|
2016-12-12 21:48:13 +00:00
|
|
|
This is preliminary documentation of how to set up Magic Folder using a test
|
|
|
|
grid on a single Linux or Windows machine, with two clients and one server.
|
|
|
|
It is aimed at a fairly technical audience.
|
2015-11-02 14:14:49 +00:00
|
|
|
|
|
|
|
For an introduction to Magic Folder and how to configure it
|
2016-12-12 21:48:13 +00:00
|
|
|
more generally, see :doc:`frontends/magic-folder`.
|
2015-11-02 14:14:49 +00:00
|
|
|
|
|
|
|
It it possible to adapt these instructions to run the nodes on
|
|
|
|
different machines, to synchronize between three or more clients,
|
|
|
|
to mix Windows and Linux clients, and to use multiple servers
|
|
|
|
(if the Tahoe-LAFS encoding parameters are changed).
|
|
|
|
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
Setting up a local test grid
|
|
|
|
============================
|
|
|
|
|
|
|
|
Linux
|
|
|
|
-----
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Run these commands::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
mkdir ../grid
|
|
|
|
bin/tahoe create-introducer ../grid/introducer
|
|
|
|
bin/tahoe start ../grid/introducer
|
|
|
|
export FURL=`cat ../grid/introducer/private/introducer.furl`
|
|
|
|
bin/tahoe create-node --introducer="$FURL" ../grid/server
|
|
|
|
bin/tahoe create-client --introducer="$FURL" ../grid/alice
|
|
|
|
bin/tahoe create-client --introducer="$FURL" ../grid/bob
|
|
|
|
|
|
|
|
|
|
|
|
Windows
|
|
|
|
-------
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Run::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
mkdir ..\grid
|
|
|
|
bin\tahoe create-introducer ..\grid\introducer
|
|
|
|
bin\tahoe start ..\grid\introducer
|
|
|
|
|
|
|
|
Leave the introducer running in that Command Prompt,
|
|
|
|
and in a separate Command Prompt (with the same current
|
2015-10-28 16:58:49 +00:00
|
|
|
directory), run::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
set /p FURL=<..\grid\introducer\private\introducer.furl
|
|
|
|
bin\tahoe create-node --introducer=%FURL% ..\grid\server
|
|
|
|
bin\tahoe create-client --introducer=%FURL% ..\grid\alice
|
|
|
|
bin\tahoe create-client --introducer=%FURL% ..\grid\bob
|
|
|
|
|
|
|
|
|
|
|
|
Both Linux and Windows
|
|
|
|
----------------------
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
(Replace ``/`` with ``\`` for Windows paths.)
|
2015-10-28 16:54:37 +00:00
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Edit ``../grid/alice/tahoe.cfg``, and make the following
|
2015-11-02 14:14:49 +00:00
|
|
|
changes to the ``[node]`` and ``[client]`` sections::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
[node]
|
|
|
|
nickname = alice
|
|
|
|
web.port = tcp:3457:interface=127.0.0.1
|
|
|
|
|
|
|
|
[client]
|
|
|
|
shares.needed = 1
|
|
|
|
shares.happy = 1
|
|
|
|
shares.total = 1
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Edit ``../grid/bob/tahoe.cfg``, and make the following
|
|
|
|
change to the ``[node]`` section, and the same change as
|
|
|
|
above to the ``[client]`` section::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
[node]
|
|
|
|
nickname = bob
|
|
|
|
web.port = tcp:3458:interface=127.0.0.1
|
|
|
|
|
|
|
|
Note that when running nodes on a single machine,
|
|
|
|
unique port numbers must be used for each node (and they
|
|
|
|
must not clash with ports used by other server software).
|
|
|
|
Here we have used the default of 3456 for the server,
|
|
|
|
3457 for alice, and 3458 for bob.
|
|
|
|
|
|
|
|
Now start all of the nodes (the introducer should still be
|
2015-10-28 16:58:49 +00:00
|
|
|
running from above)::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
bin/tahoe start ../grid/server
|
|
|
|
bin/tahoe start ../grid/alice
|
|
|
|
bin/tahoe start ../grid/bob
|
|
|
|
|
|
|
|
On Windows, a separate Command Prompt is needed to run each
|
|
|
|
node.
|
|
|
|
|
2015-10-28 20:41:15 +00:00
|
|
|
Open a web browser on http://127.0.0.1:3457/ and verify that
|
2015-10-28 16:54:37 +00:00
|
|
|
alice is connected to the introducer and one storage server.
|
2015-10-28 20:41:15 +00:00
|
|
|
Then do the same for http://127.0.0.1:3568/ to verify that
|
2015-10-28 16:54:37 +00:00
|
|
|
bob is connected. Leave all of the nodes running for the
|
|
|
|
next stage.
|
|
|
|
|
|
|
|
|
|
|
|
Setting up Magic Folder
|
|
|
|
=======================
|
|
|
|
|
|
|
|
Linux
|
|
|
|
-----
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Run::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
mkdir -p ../local/alice ../local/bob
|
|
|
|
bin/tahoe -d ../grid/alice magic-folder create magic: alice ../local/alice
|
|
|
|
bin/tahoe -d ../grid/alice magic-folder invite magic: bob >invitecode
|
|
|
|
export INVITECODE=`cat invitecode`
|
2015-10-28 20:41:15 +00:00
|
|
|
bin/tahoe -d ../grid/bob magic-folder join "$INVITECODE" ../local/bob
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
bin/tahoe restart ../grid/alice
|
|
|
|
bin/tahoe restart ../grid/bob
|
|
|
|
|
|
|
|
Windows
|
|
|
|
-------
|
|
|
|
|
2015-10-28 16:58:49 +00:00
|
|
|
Run::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
mkdir ..\local\alice ..\local\bob
|
|
|
|
bin\tahoe -d ..\grid\alice magic-folder create magic: alice ..\local\alice
|
|
|
|
bin\tahoe -d ..\grid\alice magic-folder invite magic: bob >invitecode
|
|
|
|
set /p INVITECODE=<invitecode
|
2015-10-28 20:45:50 +00:00
|
|
|
bin\tahoe -d ..\grid\bob magic-folder join %INVITECODE% ..\local\bob
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
Then close the Command Prompt windows that are running the alice and bob
|
2015-10-28 16:58:49 +00:00
|
|
|
nodes, and open two new ones in which to run::
|
2015-10-28 16:54:37 +00:00
|
|
|
|
2015-10-28 17:00:57 +00:00
|
|
|
bin\tahoe start ..\grid\alice
|
|
|
|
bin\tahoe start ..\grid\bob
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
Testing
|
|
|
|
=======
|
|
|
|
|
|
|
|
You can now experiment with creating files and directories in
|
2015-10-28 16:58:49 +00:00
|
|
|
``../local/alice`` and ``/local/bob``; any changes should be
|
|
|
|
propagated to the other directory.
|
2015-10-28 16:54:37 +00:00
|
|
|
|
|
|
|
Note that when a file is deleted, the corresponding file in the
|
2015-10-28 16:58:49 +00:00
|
|
|
other directory will be renamed to a filename ending in ``.backup``.
|
2015-10-28 16:54:37 +00:00
|
|
|
Deleting a directory will have no effect.
|
|
|
|
|
2016-12-12 21:48:13 +00:00
|
|
|
For other known issues and limitations, see :ref:`Known Issues in
|
|
|
|
Magic-Folder`.
|
2015-10-28 16:54:37 +00:00
|
|
|
|
2015-11-02 14:14:49 +00:00
|
|
|
As mentioned earlier, it is also possible to run the nodes on
|
|
|
|
different machines, to synchronize between three or more clients,
|
|
|
|
to mix Windows and Linux clients, and to use multiple servers
|
|
|
|
(if the Tahoe-LAFS encoding parameters are changed).
|
2016-10-25 21:21:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
=============
|
|
|
|
|
|
|
|
There will be a ``[magic_folder]`` section in your ``tahoe.cfg`` file
|
|
|
|
after setting up Magic Folder.
|
|
|
|
|
|
|
|
There is an option you can add to this called ``poll_interval=`` to
|
2016-10-26 01:27:11 +00:00
|
|
|
control how often (in seconds) the Downloader will check for new things
|
2016-10-25 21:21:43 +00:00
|
|
|
to download.
|