Dtella:Network Setup
This document will outline the steps required to localize and setup a new Dtella network. It is broken down into a few sections. The introduction (what you are currently reading), the prerequisites you must go collect before undertaking this task, and finally the steps to follow to create your network.
1 Documentation Notes
2 Prerequisites
3 Setup Process
3.1 Localizing Your Dtella Network
3.2 Building the Distribution Packages
3.3 Setting up the Dynamic Configuration
3.4 Setting up an IRC Bridge
Documentation Notes

Throughout this document we will refer to various files that you may need to edit or scripts you may need to run. The will be shown in code blocks like this:
Unless otherwise specified, all paths are assumed relative to the Dtella “project” folder. For example if you checked out the trunk to “~/mydtella/” then when we say “dtella/local_config.py” we mean: “~/mydtella/dtella/local_config.py”
Finally if you find any issues with this document please let us know or feel free to correct the issue yourself.


Dtella Network Diagram (IMAGE HERE)[http://wiki.dtella.org/w/images/thumb/4/42/Dtella_diagram_evidlo.png/300px-Dtella_diagram_evidlo.png]
In order to setup a Dtella network, you should have at least the following tools and knowledge
A high speed network or LAN to run Dtella on
A basic understanding of networking
A basic knowledge of the Python programming language
Computers to build the distribution on (A Mac and a PC)
Some location for the Dynamic Configuration
Optionally, if you wish to setup a Dtella to IRC Bridge you will need the following:
An UnrealIRCd server (you need to have administrative access)
Additional prerequisites listed in:
Setup Process

Localizing Your Dtella Network

The first step to building your network is to checkout a copy of the source code from the Dtella Labs repository. This can be accomplished by executing the following command:
svn checkout http://dtella.googlecode.com/svn/trunk/ dtella
Note that you may want to checkout a specific release tag of Dtella as the trunk may contain new (read: potentially untested) features.

The second step is to localize or configure your specific Dtella network. This is done by editing the following file in your project folder:
The file is self documenting with comments to guide you along the way.
Building the Distribution Packages

First ensure you have read and acquired all the required dependencies listed in the following file:
The next step is to build distributions of your Dtella instance.
For the windows and Linux versions execute the following script on a windows computer:
To build the Mac OS X binary, execute the following script:
Setting up the Dynamic Configuration

The Dynamic Configuration for Dtella is a public entry point to the network where a new node can find existing nodes as well as some basic configuration for the network. Manual setup is not required; an attached bridge will push infromation set in bridge_config.py to the desired location. The configuration is stored in one of the following supported locations:
yi.org DNS Server
Google Spreadsheet (Gdata)
It stores the following information:
IP Cache – An encrypted list of good nodes your client can connect to
Minshare – The minimum share size for a client to join and download from the network
Version – The required version, current version, and download location for your instance.
PK Hash – A hash of the public key used for digitally signing messages from the Bridge or other administrative source.
Here is an example of a DNS dynamic configuration entry:

version=1.0.4 1.2.0 http://www.dtella.org/

Setting up an IRC Bridge

This section is a work in progress.
This section will outline the setup of a Dtella to IRC bridge. The bridge provides a link where by you may chat between the two networks. Additionally, you can then use IRC to perform moderation / administrative tasks such as kicking and banning from the IRC channel you establish. Because of the low level access the bridge requires it is not possible to simply connect it to an existing IRC network (such as Freenode), rather you must link the IRC server directly to the Dtella Bridge. This will require administrative access to the IRC network configuration file.
The steps you will need to follow to establish your bridge and link are as follows:
Setup an UnrealIRCd according to their documentation.
Establish a link block in the links.conf (or unrealircd.conf for unrealIRCD) file.
Configure your bridge by setting up bridge_config.py
Run the bridge and test the functionality (python dtella.py –bridge)

Inspircd Configuration

For more information about configuring bridges on inspircd check inspircd’s documentation (here)[https://wiki.inspircd.org/Configuration#.3Clink.3E_-_links.conf].

Dtella Bridge Configuration

service_args = dict(
    # ip or hostname of the irc server you wish the bot to connect to
    host = "irc.dhirc.com", 

    # port you set the irc daemon to listen on for incomming linked connections
    port = 7000, 

    # Matches the recv pass of the IRC Link configuration
    sendpass = "password2", 

    # Matches the send pass of the IRC link configuration
    recvpass = "password1", 

    # the network name of the IRC server you want to connect to
    network_name = "DarkHorse", 

    # Matches the link name= paramter in the link configuration for the irc daemon
    my_host = "bridge1.dtella.zomg", 

    # the name response you want the bot to have (shows in IRC WHOIS requests, not the nickaneme)
    my_name = "Dtella IRC Bridge", 

    # The channel you want the bot to join
    channel = "#dtella", 

    # Leave this as None
    sid = None,

    # To disable cloaking, set these 3 lines to None.

    # set to half or full to enable or disable half or full hostmask cloaking
    cloak_mode = "half",   

    # The prefix on the masked hostnames of the dtella clients
    cloak_prefix = "pre-", 

    # This is the hash used to mask the addresses of your clients, enter random letters and numbers.
    cloak_key = "asdf1234", 

UnrealIRCd Configuration

link bridge1.somedomain.com
        username          *;  
        hostname          *;  //This can be set to restrict to a static IP for security
        bind-ip           *;
        port              6667; 
        leaf              *;
        password-connect  "super_secret_password";
        password-receive  "super_secret_password";
        class             servers;

Note: the dtella bridge currently does not support UnrealIRCD, see inspircd above.