Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
### Installation
havirt can be installed on any node, or on a completely separate machine. If
installed on multiple nodes, it can be safely be run simultaneously on multiple
nodes as file locking is enabled on any code which writes to /var
You need shared storage if havirt will run on multiple nodes, and havirt
should be installed in that storage. The shared space is assumed to be
mounted a the same location on all nodes. havirt will store temporary files in
it's install or install/var directory which allows a process on one node to
respect a running process on another. In our implementation, we have an nfs
mount at /media/shared/havirt. File locking is required on the shared
storage.
There is no fancy installer. Simply grab the files via subversion.
svn co http://svn.dailydata.net/svn/havirt/stable /path/to/install
ln -s /path/to/install/havirt /usr/local/bin/havirt
If you use the same setup we use, where havirt is to be stored in
/media/shared, the commands are:
svn co http://svn.dailydata.net/svn/havirt/stable /media/shared/havirt
ln -s /media/shared/havirt/havirt /usr/local/bin/havirt
Some Perl modules are needed.
- Exporter
- Getopt::Long
- version
- YAML::Tiny
- Data::Dumper
Most may be on your system already, but you can run the following command on
Debian based systems to add the ones not in the base install.
apt install -y libdata-dump-perl libyaml-tiny-perl
### Setup
Ensure all nodes can talk to each other (including themselves) via public
key encryption (no password). If havirt is on a separate machine, it
must be able to talk to all nodes. To do this, on each node which will be
managed by havirt, run the following command as root
ssh-keygen -t rsa -b 4096
When asked for a passphrase, just press the Enter key for no passphrase.
Now, on each machine, grab the public key for the generated keys.
cat /root/.ssh/rsa.pub >> /media/shared/havirt/sshkeys
This will build the file /media/shared/havirt/sshkeys with all of the keys.
Finally, on each machine
cp /media/shared/havirt/sshkeys /root/.ssh/authorized_keys
chown root:root /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
Each should be able to talk to the other. I generally create a
/root/.ssh/config which contains aliases for simplicity.
Once you are sure all of your nodes can talk to each other, run the following
command for each node.
havirt node add NAMEOFNODE
where NAMEOFNODE is accessible either via DNS or an ssh alias.
When all nodes are added, you can list them with
havirt node list -t tsv
which will dump a tab delimited text file to STDOUT.
Now it is time to populate all of the domains currently running
havirt node scan # scan all nodes for running domains
havirt domain update # get conf for all domains and store in conf/
havirt domain list # show all domains
Note: domain list will not show nodes which have no domains on them.