summaryrefslogtreecommitdiff
path: root/doc/quickstart.md
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2020-01-23 11:48:42 +0000
committerPaul Bütow <pbuetow@mimecast.com>2020-01-23 11:48:42 +0000
commit2a8e5de265a0e0a31a5834909d6879f5c9941467 (patch)
treec72761ce6c31937778cd1cbaff6f76b1dc2acb25 /doc/quickstart.md
parentce1663bacc1c83983ba9e4446d07b6d79d004b9c (diff)
parenteee041d58738f17f97db4b4302ea77086ff8f5ac (diff)
Merge branch 'master' into develop
Diffstat (limited to 'doc/quickstart.md')
-rw-r--r--doc/quickstart.md31
1 files changed, 14 insertions, 17 deletions
diff --git a/doc/quickstart.md b/doc/quickstart.md
index daaca35..46f7fae 100644
--- a/doc/quickstart.md
+++ b/doc/quickstart.md
@@ -9,31 +9,30 @@ This guide also assumes that you know how to install and use a Go compiler and G
# Compile it
-To produce all DTail binaries run ``make``:
+To install all DTail binaries from github run:
```console
-workstation01 ~/git/dtail % make
-go build -o dtail ./cmd/dtail/main.go
-go build -o dcat ./cmd/dcat/main.go
-go build -o dgrep ./cmd/dgrep/main.go
-go build -o dmap ./cmd/dmap/main.go
-go build -o dserver ./cmd/dserver/main.go
+% go get github.com/mimecast/dtail/cmd/dtail
+% go get github.com/mimecast/dtail/cmd/dcat
+% go get github.com/mimecast/dtail/cmd/dgrep
+% go get github.com/mimecast/dtail/cmd/dmap
+% go get github.com/mimecast/dtail/cmd/dserver
```
-It produces the following executables:
+It produces the following executables in ``$GOPATH/bin``:
-* ``dserver``: The DTail server
* ``dtail``: Client for tailing/following log files remotely (distributed tail)
* ``dcat``: Client for displaying whole files remotely (distributed cat)
* ``dgrep``: Client for searching whole files files remotely using a regex (distributed grep)
* ``dmap``: Client for executing distributed mapreduce queries (may will consume a lot of RAM and CPU)
+* ``dserver``: The DTail server
# Start DTail server
Copy the ``dserver`` binary to the remote server machines of your choice (e.g. ``serv-001.lan.example.org`` and ``serv-002.lan.example.org``) and start it on each of the servers as follows:
```console
-serv-001 ~ % ./dserver
+% ./dserver
SERVER|serv-001|INFO|Launching server|server|DTail 1.0.0
SERVER|serv-001|INFO|Creating server|DTail 1.0.0
SERVER|serv-001|INFO|Generating private server RSA host key
@@ -52,7 +51,7 @@ Make sure that your public SSH key is listed in ``~/.ssh/authorized_keys`` on al
DTail utilises the SSH Agent for SSH authentication. This is to avoid entering the passphrase of the private SSH key over and over again when a new SSH session is initiated from the DTail client to a new DTail server. For this the private SSH key has to be registered at the SSH Agent:
```console
-workstation01 ~ % ssh-add ~/.ssh/id_rsa
+% ssh-add ~/.ssh/id_rsa
Enter passphrase for ~/.ssh/id_rsa: **********
Identity added: ~/.ssh/id_rsa (~/.ssh/id_rsa)
```
@@ -62,10 +61,9 @@ The DTail client communicates with the SSH Agent through ``~/.ssh/ssh_auth_socke
To test whether SSH is setup correctly you should be able to SSH into the servers with the OpenSSH client and your private SSH key through the SSH Agent without entering the private keys passphrase. The following assumes to have an OpenSSH server running on ``serv-001.lan.example.org`` and an OpenSSH client installed on your laptop or workstation. Please notice that DTail does not require to have an OpenSSH infrastructure set up but DTail uses by default the same public/private key file paths as OpenSSH. OpenSSH can be of a great help to verify that the SSH keys are configured correctly:
```console
-workstation01 ~/git/dtail % ssh serv-001.lan.example.org
-serv-001 ~ %
-serv-001 ~ % exit
-workstation01 ~/git/dtail %
+% ssh serv-001.lan.example.org
+%
+% exit
```
## Run DTail client
@@ -73,7 +71,7 @@ workstation01 ~/git/dtail %
Now it is time to connect to the DTail servers through the DTail client:
```console
-workstation01 ~/git/dtail % ./bin/dtail --servers serv-001.lan.example.org,server-002.lan.example.org --files "/var/log/service/*.log"
+% dtail --servers serv-001.lan.example.org,server-002.lan.example.org --files "/var/log/service/*.log"
CLIENT|workstation01|INFO|Launching client|tail|DTail 1.0.0
CLIENT|workstation01|INFO|Initiating base client
CLIENT|workstation01|INFO|Added SSH Agent to list of auth methods
@@ -89,7 +87,6 @@ CLIENT|workstation01|INFO|stats|connected=1/1(100%)|new=0|rate=0.00/s|throttle=0
CLIENT|workstation01|INFO|stats|connected=1/1(100%)|new=0|rate=0.00/s|throttle=0|cpus/goroutines=8/17
.
.
-.
```
Have a look [here](examples.md) for more usage examples.