tinc-tailor is a tool for managing a cluster of
CloudFabric servers using
tinc as a VPN.
tinc-tailor can be run from the source checked out from
https://github.com/geniedb/tinc-tailor/. Run sudo python setup.py install
to install to the system or python setup.py install --user to install into
the user's home directory.
If you use pip just run
pip install -r https://github.com/geniedb/tinc-tailor/raw/master/requirements.txt git+https://github.com/geniedb/tinc-tailor.git
or
pip install --install-option=--user -r https://github.com/geniedb/tinc-tailor/raw/master/requirements.txt git+https://github.com/geniedb/tinc-tailor.git.
This is a INI file where each section is a host that tinc-tailor will
considers to be in the cluster. The name of the section should be a symbolic
name for the host, with no hyphens.
You must set the connect_to parameter for each host to a hostname or IP
address that all the other hosts and your workstation can use to find that
host. This parameter defaults to the section name, so if that is a hostname
you are good to go.
You may also add a [DEFAULT] section which sets defaults for all hosts.
-
tinc-tailor tinc install [HOST]...This performs the initial setup of these hosts, adding them to the cluster. Note that they must already be added to the
hosts.listfile. -
tinc-tailor tinc remove [HOST]...This removes the given hosts from the cluster, and removes tinc from them. The hosts should be removed from
hosts.listafter this is run. -
tinc-tailor tinc refreshThis reconfigures all hosts in
hosts.listand ensures tincd is running on them. -
tinc-tailor cloudfabric [--channel {stable|unstable}] install [HOST]...This installs cloudfabric on the given hosts. The
--channeloption, which defaults tounstablecontrols which distribution channel of cloudfabric is installed. -
tinc-tailor cloudfabric upgrade [HOST]...This upgrades cloudfabric on the given hosts.
-
tinc-tailor cloudfabric remove [HOST]...This removes cloudfabric from the given hosts.
-
tinc-tailor cloudfabric refreshThis restarts cloudfabric on the given hosts.
-
tinc-tailor checkThis makes every host in
hosts.listcan ping every other host. -
tinc-tailor run COMMANDThis runs command on every host in
hosts.list.
tinc-tailor has some options to customize it's behavior:
-
--helpShow a brief summary of the options and comamnds thattinc-tailoraccepts.--hosts-file FILENAMEThis file tells
tinc-tailorto read the given file instead ofhosts.list(described above). -
--log-level (DEBUG|INFO|WARNING|ERROR|FATAL)This option determines the amount of information to be logged. The default is WARNING, which prints very little.
-
--global-log-level (DEBUG|INFO|WARNING|ERROR|FATAL)As
--log-level, but also log higher detail from python libraries used, for example for debugging the SSH connection.
Installing two nodes:
$ cat > hosts.list
[DEFAULT]
netname = cf
[node1]
connect_to = node1.publicnetwork.com
[node2]
connect_to = 203.0.113.3
$ ./tinc-tailor tinc install
Verifying they work:
$ ./tinc-tailor check
Adding an extra node:
$ cat >> host.list
[ondemand]
connect_to = dc3-198-51-100-3.cloudprovider.com
key = /home/user/key.pem
$ ./tinc-tailor tinc install ondemand
Removing the first node:
$ ./tinc-tailor tinc remove node2
$ cat > host.list
[node1]
connect_to = node1.publicnetwork.com
[ondemand]
connect_to = dc3-198-51-100-3.cloudprovider.com
key = /home/user/key.pem
Running a command on all the nodes:
$ ./tinc-tailor run uname -r
tailor.host.node1: 2.6.32-279.5.2.el6.x86_64
tailor.host.ondemand: 2.6.32-5-amd64