You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-20Lines changed: 32 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,31 @@ TagIt is a tool that updates Consul service registration tags with outputs of a
8
8
9
9
## Table of Contents
10
10
11
-
-[Why TagIt?](#why)
11
+
-[Why TagIt?](#why-tagit)
12
12
-[Installation](#installation)
13
13
-[Usage](#usage)
14
+
-[Run Command](#run-command)
15
+
-[Cleanup Command](#cleanup-command)
16
+
-[Systemd Command](#systemd-command)
14
17
-[How It Works](#how-it-works)
15
18
-[Examples](#examples)
16
19
-[Contributing](#contributing)
17
20
-[License](#license)
18
21
19
-
## Why?
22
+
## Why TagIt?
20
23
21
24
TagIt addresses a feature that's currently missing from Consul. You can read more about the need for this functionality in [this Consul issue](https://github.com/hashicorp/consul/issues/1048).
22
25
23
26
Here are some scenarios where TagIt can be useful:
24
27
25
-
1.**Database Leader Tagging**: Your databases are under `mydb.service.consul`, and you want to ensure all writes go to the leader.
26
-
- Run a script that checks for the leader and updates the tag accordingly.
27
-
28
-
2.**Non-Consul-Aware Service Discovery**: You have a service that isn't Consul-aware, but you want to use Consul for service discovery.
29
-
- Run a script that checks the service status and updates the tags.
30
-
31
-
3.**Web Server VHost Tagging**: You have a load balancer or web server, and you want tags for all vhosts served by this server.
32
-
- Run a script that checks the vhosts and updates the tags.
33
-
34
-
4.**Generic Service Tagging**: For any services that aren't Consul-aware, but you want to use Consul for service discovery.
35
-
- Run a script that checks the service and updates the tags.
28
+
1.**Database Leader Tagging**: Ensure all writes go to the leader by tagging it appropriately.
29
+
2.**Non-Consul-Aware Service Discovery**: Use Consul for service discovery with services that aren't Consul-aware.
30
+
3.**Web Server VHost Tagging**: Tag all vhosts served by a web server or load balancer.
31
+
4.**Generic Service Tagging**: Tag any services for Consul-based service discovery.
36
32
37
33
## Installation
38
34
39
-
To install TagIt, you can use the following commands:
35
+
To install TagIt, use the following commands:
40
36
41
37
```bash
42
38
$ git clone https://github.com/ncode/tagit
@@ -46,7 +42,7 @@ $ go build
46
42
47
43
## Usage
48
44
49
-
TagIt provides two main commands: `run`and `cleanup`.
45
+
TagIt provides three main commands: `run`, `cleanup`, and `systemd`.
50
46
51
47
### Run Command
52
48
@@ -64,19 +60,30 @@ The `cleanup` command removes all tags with the specified prefix from the servic
0 commit comments