Skip to content

Commit 86118cd

Browse files
committed
- update README
- bump version to 1.0.2
1 parent 8cf8321 commit 86118cd

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
Manages a virtual IP based on state kept in etcd or Consul. Monitors state in etcd
99

1010
## Table of Contents
11+
- [Prerequisites](#prerequisites)
1112
- [Building](#building)
1213
- [Installing from package](#Installing-from-package)
13-
- [Installing by hand](#installing-by-hand)
14+
- [Installing from source](#installing-by-hand)
1415
- [PostgreSQL prerequisites](#PostgreSQL-prerequisites)
1516
- [Configuration](#Configuration)
1617
- [Migrating configuration from releases before v1.0](#migrating-configuration-from-releases-before-v10)
@@ -21,26 +22,43 @@ Manages a virtual IP based on state kept in etcd or Consul. Monitors state in et
2122
- [Debugging](#Debugging)
2223
- [Author](#Author)
2324

25+
## Prerequisites
26+
27+
- `go` >= 1.14
28+
- `make`
29+
- [`nfpm`](https://github.com/goreleaser/nfpm) for building .rpm and .deb packages
30+
- [`chglog`](https://github.com/goreleaser/chglog) for changelog and packaging
31+
2432
## Building
25-
1. Make sure you have at least version 1.14 of Golang for proper module support. You can get by with go 1.12 or 1.13, but YMMV.
26-
2. To make sure that internal includes (the vipconfig and the checker package) are satisfied, place the base directory of this project properly into your `$GOPATH`.
27-
The resulting location should be `$GOPATH/src/github.com/cybertec-postgresql/vip-manager/`. The easiest way to do this is:
28-
```go get github.com/cybertec-postgresql/vip-manager```
29-
3. Build the binary using `make`.
30-
4. To build your own .deb or .rpm, [`nfpm`](https://github.com/goreleaser/nfpm) and [`chglog`](https://github.com/goreleaser/chglog) are required. Install it, add it to your path and try running `make package`, which will generate a .deb and .rpm package.
33+
1. clone this repo
34+
```
35+
git clone https://github.com/cybertec-postgresql/vip-manager.git
36+
```
37+
2. get the (optional) requirements
38+
```
39+
# packaging:
40+
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
41+
# changelog, also packaging:
42+
go get github.com/goreleaser/chglog/cmd/chglog
43+
```
44+
3. (optionally) set PATH to find those dependencies
45+
```
46+
PATH="$HOME/go/bin:$PATH"
47+
```
48+
4. Build the binary using `make`.
49+
5. To build your own .deb or .rpm, run `make package`, which will generate a .deb and .rpm package.
3150

3251
## Installing from package
3352
You can download .rpm or .deb packages here, on the [Releases](https://github.com/cybertec-postgresql/vip-manager/releases) page.
3453
On Debian and Ubuntu, the universe repositories should provide you with vip-manager, though the version may be not as recent.
3554
> NB! Our .deb is probably not compatible with the one from those repositories, do not try to install them side-by-side.
3655
37-
## Installing by hand
56+
## Installing from source
3857

39-
* Build the vip-manager binary using `make`.
40-
* Copy the resulting `vip-manager` binary to `/usr/bin/vip-manager`.
41-
* Install service file from `package/scripts/vip-manager.service` to `/etc/systemd/system/`
42-
* Install configuration file from `vipconfig/vip-manager.yml` `/etc/default/vip-manager.yml`
43-
* Edit config to your needs, then `systemctl daemon-reload`, then `systemctl start vip-manager`.
58+
- Follow the steps to [build](#building) vip-manager.
59+
- Run `DESTDIR=/tmp make install` to copy the binary, service files and config file into the destination of your choice.
60+
- Edit config to your needs, then run `systemctl daemon-reload`, then `systemctl start vip-manager`.
61+
> systemd will only pick the service files up if you chose a `DESTDIR` so that it can find it. Usually `DESTDIR=''` should work.
4462
4563
## PostgreSQL prerequisites
4664

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
var (
2121
// vip-manager version definition
22-
version string = "1.0.1"
22+
version string = "1.0.2"
2323
)
2424

2525
func getMask(vip net.IP, mask int) net.IPMask {

package/nfpm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name: vip-manager
66
arch: amd64
77
platform: linux
8-
version: v1.0.1
8+
version: v1.0.2
99
release: 1
1010
section: default
1111
priority: extra

0 commit comments

Comments
 (0)