Fork me on GitHub

Vines Agent Install

The Vines agent needs to be installed on each system with which we'd like to chat. The agent connects to the Vines chat server, so it needs to have it's authentication token and connection information configured.

$ hostname -f
fedora.wonderland.lit
$ vines-agent init wonderland.lit
Initialized agent directory: wonderland.lit
Run 'cd wonderland.lit && vines-agent start' to begin

Add Agent Account

Before starting the agent, we need to add a system account for it in the web management console.

Add agent account
Add agent system account. Click for larger image.

Create a system account for fedora.wonderland.lit then copy and paste the generated authentication token into the agent's conf/config.rb file.

Configure Agent

The agent's configuration is in the conf/config.rb file. We need to set the password field to the authentication token generated by the web app. We also need to define the chat server's host name or IP address in the upstream field.

Vines::Agent::Config.configure do
  log :info
  domain 'wonderland.lit' do
    upstream 'chat.wonderland.lit', 5222
    password '0aa0e656e68c86000b81643f88e12b2451dd32a2bfa8 . . .'
    download 'data'
  end
end

Configure Certificates

Finally, all connections to the chat server must be encrypted. If the server is using a self-signed TLS certificate, it needs to be copied into the agent's conf/certs directory. If the agent doesn't have the server's certificate, the encrypted connection will fail.

server$ scp wonderland.lit/conf/certs/wonderland.lit.crt fedora.wonderland.lit:/tmp
 agent$ cp /tmp/wonderland.lit.crt wonderland.lit/conf/certs

Purchasing a signed TLS certificate for the server, from a Certificate Authority (Go Daddy, VeriSign, etc.), avoids the step of copying self-signed certificates to each agent. Agents trust purchased certificates because they've been signed by a trusted third-party.

Start

Now that the agent is configured, we can start it up.

$ cd wonderland.lit
$ vines-agent start
INFO -- vines-agent: Vines agent started
INFO -- vines-agent: Connected fedora.wonderland.lit@wonderland.lit/vines agent to chat.wonderland.lit:5222
WARN -- vines-agent: Agent must run as root user to allow user switching
INFO -- vines-agent: Found vines component at vines.wonderland.lit

We started the agent as a non-root user, so it's warning us about user switches. All commands sent to the agent in this mode will be run as the user that started the agent. To run commands as other users, we need to start the agent as root.

$ sudo vines-agent start