This repository has been archived by the owner on May 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Write developer documentation for Freeseer server #674
Open
dbrenden
wants to merge
2
commits into
Freeseer:master
Choose a base branch
from
dbrenden:server_docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Notes on the Freeseer Server/Client | ||
=================================== | ||
|
||
Freeseer will eventually be headlessly configurable and controllable via its REST API. We use Zeroconf protocol to alert Clients of any running Freeseer hosts, as well as their IP and Port. This article denotes the environment requirements, and instructions for running Freeseer as a headless server. Furthermore, I will explain how the Freeseer browser mechanism works, on how Freeseer is seen by Zeroconf/Bonjour more generally. | ||
|
||
Running the Freeseer Server | ||
--------------------------- | ||
|
||
**OS Requirements** | ||
|
||
The Freeseer server can only be run on Linux boxes because of a dependency on Avahi. | ||
|
||
**Dependencies** | ||
|
||
The Freeseer server requires the following packages to be installed:: | ||
|
||
avahi-daemon | ||
python-avahi | ||
|
||
**Instructions** | ||
|
||
Ensure ``avahi-daemon`` is running. | ||
The Freeseer server is run in the command line with:: | ||
|
||
freeseer server | ||
|
||
Your box should now have an http server that accepts API requests and is broadcast over Zeroconf protocol. | ||
|
||
On the servers box, the http server can be accessed at http://0.0.0.0:7079 | ||
On any client's box, the http server can be accessed at http://<hosts_ip>:7079 | ||
|
||
Finding Freeseer hosts on Your Network | ||
-------------------------------------- | ||
|
||
We have yet to develop a client that can control our server headlessly, however there is a function in Freeseer that lets us browse any Freeseer hosts broadcasting on our network. This browse function makes use of the python library ``zeroconf``, and should be modified to be used with the client we eventually develop. | ||
|
||
**Dependencies** | ||
|
||
The key dependency for server browsing is the python library ``zeroconf``. | ||
Dependencies are automatically installed by running:: | ||
|
||
pip install -Ur dev_requirements.txt | ||
|
||
in the folder where ``dev_requirements.txt`` is found. | ||
|
||
**Running Host Browser** | ||
|
||
To list any running Freeseer servers on your network:: | ||
|
||
freeseer browse | ||
|
||
**Notes on Advertising/Browsing** | ||
|
||
During browsing, the ``zeroconf`` library searches for any services running with the service type ``_freeseer._tcp``. If there are any on the network, it will be found and printed to the user. If you run into any issues with clients browsing Freeseer Hosts, it is a good idea to check if your client's computer also sees the Freeseer host running. On linux, we can do this with the following command:: | ||
|
||
avahi-browse -t _freeseer._tcp | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as in the other PR, can you hard wrap the text so it's on multiple lines?