rename bin/allmydata-tahoe to bin/tahoe. Closes #155.

This commit is contained in:
Brian Warner 2007-10-11 03:38:24 -07:00
parent ee72a5adfd
commit dc573554c8
9 changed files with 50 additions and 48 deletions

View File

@ -78,6 +78,9 @@ endif
PP=PYTHONPATH="$(SRCPATH)$(PATHSEP)$(EGGSPATH)$(PATHSEP)$(PYTHONPATH)" PP=PYTHONPATH="$(SRCPATH)$(PATHSEP)$(EGGSPATH)$(PATHSEP)$(PYTHONPATH)"
.PHONY: make-version build .PHONY: make-version build
# N.B.: the first argument to make-version.py is used to find darcs tags that
# represent released versions, so it needs to match whatever release
# conventions are in use.
make-version: make-version:
$(PYTHON) misc/make-version.py "allmydata-tahoe" "src/allmydata/_version.py" $(PYTHON) misc/make-version.py "allmydata-tahoe" "src/allmydata/_version.py"
@ -87,7 +90,7 @@ make-version:
build: build:
$(PYTHON) ./setup.py build_ext -i $(PYTHON) ./setup.py build_ext -i
chmod +x bin/allmydata-tahoe chmod +x bin/tahoe
# 'make install' will do the following: # 'make install' will do the following:
# build+install tahoe (probably to /usr/lib/pythonN.N/site-packages) # build+install tahoe (probably to /usr/lib/pythonN.N/site-packages)
@ -239,10 +242,10 @@ check-memory-once: .built
check-speed: .built check-speed: .built
if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi if [ -z '$(TESTCLIENTDIR)' ]; then exit 1; fi
$(PYTHON) bin/allmydata-tahoe start $(TESTCLIENTDIR) $(PYTHON) bin/tahoe start $(TESTCLIENTDIR)
sleep 5 sleep 5
$(PYTHON) src/allmydata/test/check_speed.py $(TESTCLIENTDIR) $(PYTHON) src/allmydata/test/check_speed.py $(TESTCLIENTDIR)
$(PYTHON) bin/allmydata-tahoe stop $(TESTCLIENTDIR) $(PYTHON) bin/tahoe stop $(TESTCLIENTDIR)
test-darcs-boringfile: test-darcs-boringfile:
$(MAKE) $(MAKE)

62
README
View File

@ -180,11 +180,11 @@ Running-In-Place Way, and The Debian Way. Choose one:
3. Build Tahoe by running "make". 3. Build Tahoe by running "make".
4. Once you've built it then you can execute "./bin/allmydata-tahoe". (When 4. Once you've built it then you can execute "./bin/tahoe". (When the tahoe
the allmydata-tahoe script is in a Tahoe source distribution, it adds script is in a Tahoe source distribution, it adds the necessary
the necessary directory to the Python "sys.path". It also looks for any directory to the Python "sys.path". It also looks for any dependencies
dependencies that you installed by "make build-deps" and includes them that you installed by "make build-deps" and includes them in the
in the sys.path.) See the RUNNING section, below. sys.path.) See the RUNNING section, below.
The Debian Way: The Debian Way:
@ -215,15 +215,15 @@ TESTING THAT IT IS PROPERLY INSTALLED
slow computers. There are a lot of tests and some of them do a lot of slow computers. There are a lot of tests and some of them do a lot of
public-key cryptography.) public-key cryptography.)
Executing the allmydata-tahoe script from the "bin" subdirectory will work Executing the tahoe script from the "bin" subdirectory will work only if
only if Tahoe itself is installed, either because it is installed into the Tahoe itself is installed, either because it is installed into the local
local subdirectory (as per "The Running-In-Place Way") or because it is subdirectory (as per "The Running-In-Place Way") or because it is installed
installed into your system (as per the other three ways of installing). into your system (as per the other three ways of installing).
RUNNING: RUNNING:
Run the "allmydata-tahoe" executable. Run the "tahoe" executable.
If you installed "The Running-In-Place Way", then it is in your source tree, If you installed "The Running-In-Place Way", then it is in your source tree,
in the "bin" subdirectory thereof. If you installed in one of the other in the "bin" subdirectory thereof. If you installed in one of the other
@ -231,10 +231,10 @@ RUNNING:
filesystem, perhaps in "/usr/bin" on Unix, or in "C:\Python25\Scripts" on filesystem, perhaps in "/usr/bin" on Unix, or in "C:\Python25\Scripts" on
Window. Window.
The "allmydata-tahoe" utility is used to create, start, and stop nodes. The "tahoe" utility is used to create, start, and stop nodes. Each node
Each node lives in a separate base directory, inside of which you can add lives in a separate base directory, inside of which you can add files to
files to configure and control the node. Nodes also read and write files configure and control the node. Nodes also read and write files within that
within that directory. directory.
A grid consists of a single central 'introducer and vdrive' node and one or A grid consists of a single central 'introducer and vdrive' node and one or
more 'client' nodes. If you are joining an existing grid, the more 'client' nodes. If you are joining an existing grid, the
@ -243,28 +243,28 @@ RUNNING:
create both an introducer-and-vdrive and a client (and then invite other create both an introducer-and-vdrive and a client (and then invite other
people to create their own client nodes and join your grid). people to create their own client nodes and join your grid).
The introducer (-and-vdrive) node is constructed by running 'allmydata-tahoe The introducer (-and-vdrive) node is constructed by running 'tahoe
create-introducer --basedir $HERE'. Once constructed, you can start the create-introducer --basedir $HERE'. Once constructed, you can start the
introducer by running 'allmydata-tahoe start --basedir $HERE' (or, if you introducer by running 'tahoe start --basedir $HERE' (or, if you are already
are already in the introducer's base directory, just type 'allmydata-tahoe in the introducer's base directory, just type 'tahoe start'). Inside that
start'). Inside that base directory, there will be a pair of files base directory, there will be a pair of files 'introducer.furl' and
'introducer.furl' and 'vdrive.furl'. Make a copy of these, as they'll be 'vdrive.furl'. Make a copy of these, as they'll be needed on the client
needed on the client nodes. nodes.
To construct a client node, pick a new working directory for it, then run To construct a client node, pick a new working directory for it, then run
'allmydata-tahoe create-client --basedir $HERE'. Copy the two .furl files 'tahoe create-client --basedir $HERE'. Copy the two .furl files from the
from the introducer into this new directory, then run 'allmydata-tahoe start introducer into this new directory, then run 'tahoe start --basedir $HERE'.
--basedir $HERE'. After that, the client node should be off and running. After that, the client node should be off and running. The first thing it
The first thing it will do is connect to the introducer and introduce itself will do is connect to the introducer and introduce itself to all other nodes
to all other nodes on the grid. You can follow its progress by looking at on the grid. You can follow its progress by looking at the
the $HERE/logs/twistd.log file. $HERE/logs/twistd.log file.
To actually use the client, enable the web interface by writing a port To actually use the client, enable the web interface by writing a port
number (like "8123") into a file named $HERE/webport and then restarting the number (like "8123") into a file named $HERE/webport and then restarting the
node with 'allmydata-tahoe restart --basedir $HERE'. This will prompt the node with 'tahoe restart --basedir $HERE'. This will prompt the client node
client node to run a webserver on the desired port, through which you can to run a webserver on the desired port, through which you can view, upload,
view, upload, download, and delete files. This 'webport' file is actually a download, and delete files. This 'webport' file is actually a "strports
"strports specification", defined in specification", defined in
http://twistedmatrix.com/documents/current/api/twisted.application.strports.html http://twistedmatrix.com/documents/current/api/twisted.application.strports.html
, so you can have it only listen on a local interface by writing , so you can have it only listen on a local interface by writing
"tcp:8123:interface=127.0.0.1" to this file, or make it use SSL by writing "tcp:8123:interface=127.0.0.1" to this file, or make it use SSL by writing

View File

@ -1,2 +1 @@
This file exists so the preamble in bin/allmydata-tahoe can find its source This file exists so the preamble in bin/tahoe can find its source tree.
tree.

View File

@ -79,8 +79,8 @@ held while they are being received.
client.tac : this file defines the client, by constructing the actual Client client.tac : this file defines the client, by constructing the actual Client
instance each time the node is started. It is used by the 'twistd' instance each time the node is started. It is used by the 'twistd'
daemonization program (in the "-y" mode), which is run internally by the daemonization program (in the "-y" mode), which is run internally by the
"allmydata-tahoe start" command. This file is created by the "allmydata-tahoe "tahoe start" command. This file is created by the "tahoe create-client"
create-client" command. command.
control.furl : this file contains a FURL that provides access to a control control.furl : this file contains a FURL that provides access to a control
port on the client node, from which files can be uploaded and downloaded. port on the client node, from which files can be uploaded and downloaded.

View File

@ -9,9 +9,9 @@ include /usr/share/cdbs/1/class/python-distutils.mk
STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
# we overwrite the setuptools-generated /usr/bin/allmydata-tahoe with our # we overwrite the setuptools-generated /usr/bin/tahoe with our package's
# package's original version, because the setuptools form (using "entry # original version, because the setuptools form (using "entry points")
# points") insists upon .egg-info -visible forms of dependent packages to be # insists upon .egg-info -visible forms of dependent packages to be
# installed. For a debian package, we rely upon the dependencies that are # installed. For a debian package, we rely upon the dependencies that are
# declared in debian/control . # declared in debian/control .
# #
@ -23,7 +23,7 @@ STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
install/allmydata-tahoe:: install/allmydata-tahoe::
mkdir -pm755 $(STAGING_DIR) mkdir -pm755 $(STAGING_DIR)
python setup.py install --root=$(STAGING_DIR) python setup.py install --root=$(STAGING_DIR)
cp bin/allmydata-tahoe $(STAGING_DIR)/usr/bin/ cp bin/tahoe $(STAGING_DIR)/usr/bin/
dh_pycentral dh_pycentral

View File

@ -9,9 +9,9 @@ include /usr/share/cdbs/1/class/python-distutils.mk
STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
# we overwrite the setuptools-generated /usr/bin/allmydata-tahoe with our # we overwrite the setuptools-generated /usr/bin/tahoe with our package's
# package's original version, because the setuptools form (using "entry # original version, because the setuptools form (using "entry points")
# points") insists upon .egg-info -visible forms of dependent packages to be # insists upon .egg-info -visible forms of dependent packages to be
# installed. For a debian package, we rely upon the dependencies that are # installed. For a debian package, we rely upon the dependencies that are
# declared in debian/control . # declared in debian/control .
# #
@ -23,7 +23,7 @@ STAGING_DIR=$(CURDIR)/debian/allmydata-tahoe
install/allmydata-tahoe:: install/allmydata-tahoe::
mkdir -pm755 $(STAGING_DIR) mkdir -pm755 $(STAGING_DIR)
python setup.py install --root=$(STAGING_DIR) python setup.py install --root=$(STAGING_DIR)
cp bin/allmydata-tahoe $(STAGING_DIR)/usr/bin/ cp bin/tahoe $(STAGING_DIR)/usr/bin/
dh_pycentral dh_pycentral

View File

@ -118,7 +118,7 @@ setup(name='allmydata-tahoe',
test_suite="allmydata.test", test_suite="allmydata.test",
install_requires=install_requires, install_requires=install_requires,
dependency_links=dependency_links, dependency_links=dependency_links,
entry_points = { 'console_scripts': [ 'allmydata-tahoe = allmydata.scripts.runner:run' ] }, entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
ext_modules=[ ext_modules=[
Extension("allmydata.Crypto.Cipher.AES", Extension("allmydata.Crypto.Cipher.AES",
include_dirs=["src/allmydata/Crypto"], include_dirs=["src/allmydata/Crypto"],

View File

@ -172,7 +172,7 @@ class RunNode(unittest.TestCase, testutil.PollMixin):
# now we can kill it. TODO: On a slow machine, the node might kill # now we can kill it. TODO: On a slow machine, the node might kill
# itself before we get a chance too, especially if spawning the # itself before we get a chance too, especially if spawning the
# 'allmydata-tahoe stop' command takes a while. # 'tahoe stop' command takes a while.
def _stop(res): def _stop(res):
open(HOTLINE_FILE, "w").write("") open(HOTLINE_FILE, "w").write("")
self.failUnless(os.path.exists(TWISTD_PID_FILE)) self.failUnless(os.path.exists(TWISTD_PID_FILE))