Skip to content

Commit

Permalink
Merge pull request #17 from cybertec-postgresql/experimental_hetzner_…
Browse files Browse the repository at this point in the history
…support_w_interfaces

Version 0.6
  • Loading branch information
markwort authored Sep 16, 2019
2 parents 31b91a4 + 462041a commit 04191ea
Show file tree
Hide file tree
Showing 1,234 changed files with 89,982 additions and 80,746 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vip-manager
*.deb
*.rpm
tmp/
88 changes: 73 additions & 15 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
[[constraint]]
name = "github.com/coreos/etcd"
version = "3.2.5"

[[constraint]]
name = "gopkg.in/yaml.v2"
version = "2.2.2"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2017, Cybertec Schönig & Schönig GmbH
Copyright (c) 2017-2019, Cybertec Schönig & Schönig GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=vip-manager
VERSION=0.4-1
VERSION=0.6-1
ARCH=amd64
LICENSE="BSD 2-Clause License"
MAINTAINER="Ants Aasma <[email protected]>"
Expand All @@ -22,17 +22,20 @@ install:
install -d $(DESTDIR)/etc/init.d/
install package/scripts/init-systemv.sh $(DESTDIR)/etc/init.d/vip-manager
install -d $(DESTDIR)/etc/default
install package/scripts/vip-manager.default $(DESTDIR)/etc/default/vip-manager
install vipconfig/vip-manager.yml $(DESTDIR)/etc/default/vip-manager.yml

DESTDIR=tmp

.PHONY: package
package: vip-manager

package: package-deb package-rpm

package-deb: vip-manager
install -d $(DESTDIR)/usr/bin
install vip-manager $(DESTDIR)/usr/bin/vip-manager
install -d $(DESTDIR)/usr/share/doc/$(NAME)
install --mode=644 package/DEBIAN/copyright $(DESTDIR)/usr/share/doc/$(NAME)/copyright
fpm -s dir -t deb -n $(NAME) -v $(VERSION) -C $(DESTDIR) \
fpm -f -s dir -t deb -n $(NAME) -v $(VERSION) -C $(DESTDIR) \
-p $(NAME)_$(VERSION)_$(ARCH).deb \
--license $(LICENSE) \
--maintainer $(MAINTAINER) \
Expand All @@ -43,11 +46,17 @@ package: vip-manager
--deb-field 'Vcs-Browser: $(GITBROWSER)' \
--deb-upstream-changelog package/DEBIAN/changelog \
--deb-no-default-config-files \
--deb-default package/config/vip-manager.default \
--deb-default vipconfig/vip-manager.yml \
--deb-systemd package/scripts/vip-manager.service \
usr/bin usr/share/doc/

package-rpm: package-deb
fpm -f -s deb -t rpm -n $(NAME) -v $(VERSION) -C $(DESTDIR) \
-p $(NAME)_$(VERSION)_$(ARCH).rpm \
$(NAME)_$(VERSION)_$(ARCH).deb

clean:
rm -f vip-manager
rm -f vip-manager*.deb
rm -f vip-manager*.rpm
rm -fr $(DESTDIR)
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Manages a virtual IP based on state kept in etcd or Consul. Monitors state in etcd

## building
1. 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`.
The resulting location should be `$GOPATH/src/github.com/cybertec-postgresql/vip-manager/`. The easiest way to do this is:
```go get github.com/cybertec-postgresql/vip-manager```
2. Build the binary using `make`.
3. To build your own .deb or .rpm, `fpm` is required.
Install it, add it to your path and try running `make package`, which will generate a .deb package and will also convert that into a matching .rpm file.
> note: on debianoids, rpmbuild will be required to create the rpm package...
## Installing on debian

* Install the debian package. Currently you will have to build the package yourself. Prebuilt packages are coming soon.
Expand All @@ -16,8 +25,11 @@ Manages a virtual IP based on state kept in etcd or Consul. Monitors state in et
* Edit config and start the service.

## Configuration
The configuration can be passed to the executable through argument flags or through a YAML config file.
> The location of the YAML config file can be specified with the -config flag.
> An exemplary config file is installed into `/etc/default/vip-manager_default.yml` or is available in the vipconfig directory in the repository of the software.
All configuration keys are currently mandatory.
These configuration keys are currently mandatory:

| Variable | Example | Description |
|-----------|----------|------------------------------------------------------------------------------------------|
Expand All @@ -29,6 +41,8 @@ All configuration keys are currently mandatory.
| VIP_TYPE | etcd | Type of endpoint (etcd or consul) |
| VIP_ENDPOINT | http://10.1.2.3:2379 | Location of endpoint (etcd or consul) |



## Author

Cybertec Schönig & Schönig GmbH, https://www.cybertec-postgresql.com
Loading

0 comments on commit 04191ea

Please sign in to comment.