Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
894688f
Merge pull request #122 from Syleron/dev
Syleron Jan 8, 2018
5037ba3
resolved issues with TLS
Syleron Jan 15, 2018
9f958bd
Merge branch 'master' into dev
Syleron Jan 15, 2018
db4855a
removed unused ndp code
Syleron Jan 15, 2018
88400f2
Merge branch 'dev' of https://github.com/Syleron/PulseHA into dev
Syleron Jan 15, 2018
281835d
Moved TLS cert generation to the CLI
Syleron Jan 16, 2018
872fee6
Merge pull request #123 from Syleron/dev
Syleron Jan 16, 2018
a9749e3
resolved not being generated after the first time
Syleron Jan 16, 2018
02a17e6
Merge pull request #125 from Syleron/dev
Syleron Jan 16, 2018
00f1411
working mutual TLS
Syleron Jan 19, 2018
3346732
Update server.go
Syleron Jan 29, 2018
81689b3
Update client.go
Syleron Jan 29, 2018
c012297
Removed cluster restriction from group commands
andrew-loadbalancer Mar 26, 2018
4c7d793
continued development
andrew-loadbalancer Apr 3, 2018
3924396
resolved build error
andrew-loadbalancer Apr 5, 2018
c59b38f
changes and added tests
andrew-loadbalancer Apr 5, 2018
4a3deb6
removed redundant tests
andrew-loadbalancer Apr 5, 2018
5fad4e3
added additional general plugin ype
andrew-loadbalancer Apr 11, 2018
f95e253
words
andrew-loadbalancer Apr 11, 2018
73756f0
Removed network restriction. Local node created on start.
andrew-loadbalancer Apr 16, 2018
bd7097a
continued work on constant local config
andrew-loadbalancer Apr 16, 2018
85f8072
removed unsed dep.
andrew-loadbalancer Jul 18, 2018
b969ed8
changed project structure
Syleron Aug 9, 2018
1228a81
continued updates to structure
Syleron Aug 9, 2018
1a3fde4
lots of fixes
Syleron Aug 9, 2018
326ab5b
continued fixes to get a working version
Syleron Aug 9, 2018
f86994d
continued fiex
Syleron Aug 9, 2018
ddc4024
continued fixes
Syleron Aug 9, 2018
188a81f
Fixed a reference to pugins and server.Setup
ben-loadbalancer Aug 10, 2018
9885b92
Updated utils.Execute in net_utils
ben-loadbalancer Aug 10, 2018
a44ab7a
fixing a couple of imports£
ben-loadbalancer Aug 10, 2018
e865139
Fixing some broken references
ben-loadbalancer Aug 10, 2018
ae27a4e
Loading the db in main and passing it into server. There is still mor…
ben-loadbalancer Aug 10, 2018
f38d70a
Removing unsued import
ben-loadbalancer Aug 10, 2018
5d83ad7
Merge pull request #131 from Syleron/packages
Syleron Aug 10, 2018
71b5b4f
all fixed except for the import cycle
Syleron Aug 13, 2018
024af51
had to move the DB into the server package. builds but t panics
Syleron Aug 13, 2018
baf89f9
it runs! but does it work?
Syleron Aug 13, 2018
6c20277
made what I think should be private for one reason or another private…
Syleron Aug 13, 2018
a1bb6f3
moved where plugins are loaded
Syleron Aug 13, 2018
93a50fc
continued development/fixes
Syleron Aug 14, 2018
d2004a9
continued fixes and development
Syleron Aug 14, 2018
c26df9f
updated readme with travis build status
Syleron Aug 14, 2018
092113c
resolved cli server referring to the wrong memberlist
Syleron Aug 14, 2018
180709d
Merge pull request #132 from Syleron/persistent_local_config
Syleron Aug 14, 2018
e4921b8
fixes and improvements
andrew-loadbalancer Aug 29, 2018
3cd6b5a
Merge pull request #134 from Syleron/dev
Syleron Aug 29, 2018
d0e30c5
Added the suspicious state to help determine signify the possibility …
andrew-loadbalancer Aug 29, 2018
6a7e43e
Validate that it was able to load the groups and nodes sections of th…
andrew-loadbalancer Aug 30, 2018
7e31bb1
Fixed not being able to promote after assign/unassign a FIP group
andrew-loadbalancer Aug 30, 2018
7e946c1
Resolved assign accidently attempting to bringup/garp on a passive node
andrew-loadbalancer Aug 30, 2018
11aba3a
Merge pull request #135 from Syleron/dev
Syleron Aug 30, 2018
72f5bec
Delete reset.sh
Syleron Sep 3, 2018
fa528cc
bringUpIps() in the net utils package now checks if the FIP already e…
andrew-loadbalancer Sep 17, 2018
4c6cc08
Updated pusleha systemd service file to wait for the network stack be…
andrew-loadbalancer Sep 17, 2018
0962ea7
added missing return statement
andrew-loadbalancer Sep 17, 2018
22468fa
removed return statement
andrew-loadbalancer Sep 17, 2018
d1179df
added test file for netutils. added some debug text
andrew-loadbalancer Sep 17, 2018
05fa32e
resolved bringipup
andrew-loadbalancer Sep 17, 2018
d514956
added systemd signal checks for reload/shutdown/restart
andrew-loadbalancer Sep 17, 2018
556a883
Update README.md
Syleron Nov 6, 2018
b46064a
Update README.md
Syleron Nov 6, 2018
50016bd
Update README.md
Syleron Nov 8, 2018
a25b2a1
Merge branch 'master' into dev
Nov 8, 2018
df00462
Merge pull request #140 from Syleron/dev
Nov 8, 2018
7365bc3
Update cli_server.go
Syleron Dec 5, 2018
2133172
Merge pull request #141 from Syleron/dev
Dec 5, 2018
ce4ab2e
Update main.go
Syleron Jan 23, 2019
0afa404
Fixed pulseha systemd service. Fixed os term making local node active…
Syleron Jul 3, 2019
0363a5c
Continued development and fixes.
Syleron Jul 4, 2019
277835e
Merge branch 'master' into dev
Syleron Jul 4, 2019
2ec9990
Update proto/pulse.proto
Syleron Jul 4, 2019
459fc5f
Merge pull request #149 from Syleron/dev
Syleron Jul 4, 2019
0a90e7c
added distributed logging
Syleron Jul 4, 2019
2266d40
stuff
Syleron Jul 4, 2019
afe577d
fixed issue with conflicting code
Syleron Jul 4, 2019
22037ea
Merge branch 'master' into dev
Syleron Jul 4, 2019
7d77e21
Merge pull request #150 from Syleron/dev
Syleron Jul 4, 2019
2d31bfb
added protogengo to make file
Syleron Jul 5, 2019
da4053f
Update Makefile
Syleron Jul 5, 2019
52f1e16
Update Makefile
Syleron Jul 5, 2019
af702cf
server shutdown now resets the memberlist
Syleron Aug 2, 2019
249247f
Merge branch 'master' into dev
Syleron Aug 2, 2019
0ce9754
Merge pull request #153 from Syleron/dev
Syleron Aug 2, 2019
92a91f0
GRPC communication security
Syleron Aug 7, 2019
ec298ce
Fixed reload command. Fixed SIGINT/SIGTERM signal handlers.
Syleron Aug 7, 2019
0b48abd
Syntax updates
Syleron Aug 7, 2019
ff8e286
Merge branch 'master' into dev
Syleron Aug 7, 2019
baf29b3
Merge pull request #154 from Syleron/dev
Syleron Aug 7, 2019
42e3f81
Updated licensing date range
Syleron Aug 9, 2019
3edd6b7
Fixed issue where nodes couldn't join with pulse due to the new can c…
Syleron Aug 9, 2019
28dce90
Pusleha remove node command
Syleron Aug 9, 2019
36a0a52
Missed remove command code files
Syleron Aug 9, 2019
1fb3e02
Fixed remove command function call
Syleron Aug 13, 2019
b85146b
CLI command which fail will return 1 instead of 0
Syleron Aug 13, 2019
1d9eb73
Removed make passive before a server shutdown as it's now part of the…
Syleron Aug 13, 2019
77e220a
Integrated start/join delay. Schedulers now take in the config values.
Syleron Aug 13, 2019
5f09119
Forgot to include start delay interval
Syleron Aug 13, 2019
88ea743
Fixed fatal message
Syleron Aug 13, 2019
49ed1a7
Merge pull request #155 from Syleron/dev
Syleron Aug 13, 2019
952afcf
Update config.go
Syleron Aug 13, 2019
2fa9db2
Combined Client and Server certs
Syleron Aug 14, 2019
1785c50
Merge remote-tracking branch 'origin/master'
Syleron Aug 14, 2019
1f0d31e
Pulse will fatal now if it cannot load TLS cert files
Syleron Aug 14, 2019
0930b21
groups command now returns the proper error code, 1
Syleron Aug 14, 2019
5a9fe1b
Fixed timing issues with the schedulers
Syleron Aug 16, 2019
00c31d5
Merge pull request #156 from Syleron/dev
Syleron Aug 16, 2019
78f012e
Update go.yml
Syleron Aug 28, 2019
5b53805
Update go.yml
Syleron Aug 28, 2019
45d7388
Added config command to update pulseha config section values
Syleron Sep 9, 2019
95dace0
Merge branch 'master' into dev
Syleron Sep 9, 2019
56a8896
forgot to include the new cmd files
Syleron Sep 9, 2019
96bd1c4
Merge pull request #157 from Syleron/dev
Syleron Sep 9, 2019
015191e
Fixing formatting
ben-loadbalancer Sep 9, 2019
b35ad49
Merge branch 'master' into testing
ben-loadbalancer Sep 9, 2019
15e689e
Fixed matching case for config changes
Syleron Sep 9, 2019
60d2960
using a standard cert file path
ben-loadbalancer Sep 9, 2019
83e9f3a
Declaring errors as a value
Sep 10, 2019
658be90
Adding a jsonHelper package to edit struct field by their tags. Addin…
Sep 10, 2019
abbed12
adding testing on github
Sep 10, 2019
75f599a
Merge branch 'master' into testing
Bencabot Sep 10, 2019
7daa48c
Merge pull request #158 from Syleron/testing
Syleron Sep 10, 2019
ab7f06e
auto key exchange, token generation, cert cleanup
Syleron Sep 16, 2019
347e518
Merge pull request #159 from Syleron/keyexchange
Syleron Sep 16, 2019
1b63c05
Merge branch 'master' into dev
Syleron Sep 16, 2019
f739030
fixed error formatting
Syleron Sep 16, 2019
6e6a44c
Merge pull request #160 from Syleron/dev
Syleron Sep 16, 2019
31c1f6d
added a token generation command.
Syleron Sep 17, 2019
8d4aef7
Merge branch 'master' into dev
Syleron Sep 17, 2019
2f9029e
forgot to track the token command
Syleron Sep 17, 2019
f180111
Merge remote-tracking branch 'origin/dev' into dev
Syleron Sep 17, 2019
ff74353
Merge pull request #161 from Syleron/dev
Syleron Sep 17, 2019
a50e086
Removed logging section and moved logging level to the local pulse se…
Syleron Sep 19, 2019
651cc6a
Merge pull request #163 from Syleron/logging
Syleron Sep 19, 2019
bbd0516
Merge pull request #164 from Syleron/dev
Syleron Sep 19, 2019
6ee740e
removed the tls option from the default config
Syleron Sep 19, 2019
0793e4d
updated configupdate function to use the config pointer
Syleron Sep 19, 2019
8631349
Removed the ability to change the hostname using a command. This requ…
Syleron Sep 24, 2019
f52694a
Generate default config if config doesnt exist. debug logging log war…
Syleron Sep 25, 2019
9447223
OS stats package for future "details" command
Syleron Sep 25, 2019
8a9c6b1
continued updates and fixes
Syleron Sep 27, 2019
d12922e
Use netlink package to determine if an interface is bonded or not
Syleron Oct 1, 2019
634b0ec
network resync command to resync the pulseha config with the local ne…
Syleron Oct 1, 2019
85de549
ignore tests for now
Syleron Oct 1, 2019
44a0c7b
get deps when CI
Syleron Oct 1, 2019
4fd4764
updated go mod stuff
Syleron Oct 1, 2019
46f87d8
updated go modules
Syleron Oct 1, 2019
c4fa740
Join command includes node's clear interfaces. Added missing default …
Syleron Oct 7, 2019
e13e906
Pulse automagically creates a default config on boot if one does not …
Syleron Oct 8, 2019
216a0a6
removed forgotten reused code in makefile
Syleron Oct 8, 2019
7323cce
lowered pulse dep case
Syleron Oct 8, 2019
b753809
updated go mod
Syleron Oct 8, 2019
58bd230
updated makefile
Syleron Oct 8, 2019
e244b0f
updated makefile
Syleron Oct 8, 2019
7319e66
removed go mod sum file
Syleron Oct 9, 2019
984b721
removed go mod
Syleron Oct 9, 2019
ae373be
added error codes
Syleron Oct 11, 2019
f5b4f8c
updated config to set config in memory when a default is written
Syleron Oct 11, 2019
fb599a7
changed the way we write and reload a new default config
Syleron Oct 11, 2019
e89f08d
reverted config changes
Syleron Oct 11, 2019
b5d7e3f
members are now indexed by UUID in config rather than hostnames
Syleron Nov 14, 2019
f543401
Change hostname command
Syleron Nov 15, 2019
9104ae1
oops forgot return type
Syleron Nov 15, 2019
046725e
Converted local node to utilize unique id.
Syleron Nov 29, 2019
efd92f6
oops missing code for UID commit
Syleron Nov 29, 2019
c850543
lots of fixes to bugs that came with the uid changes
Syleron Dec 3, 2019
e7b2db2
Resolved another issue when pairing with the local hostname no resolv…
Syleron Dec 3, 2019
61f02f5
Resolved memory leak. Resolved issue when removing a node from the cl…
Syleron Dec 6, 2019
0d8e1da
Started describe command. Resolved issue where floating IPs were not …
Syleron Dec 6, 2019
4a9518a
added missing proto build
Syleron Dec 6, 2019
0ed934b
missing describe files
Syleron Dec 6, 2019
818a461
Port validation. Change hostname.
Syleron Dec 13, 2019
afa4897
added go package manager for packages
Syleron Feb 28, 2020
bf71b13
Update Makefile
Syleron Mar 3, 2020
9c2d25e
memberlist state change event for plugins
Syleron May 1, 2020
0d17812
revised project structure
Syleron Aug 23, 2020
364777c
removed travis configu as we are now using github actions
Syleron Aug 23, 2020
ea8ce69
updated action files for both dev and master builds
Syleron Aug 23, 2020
1e9ef0d
changed name of workflow builds
Syleron Aug 23, 2020
facec3e
updated network package to use netlink instead of execute
Syleron Aug 23, 2020
0e5d093
Merge pull request #170 from Syleron/dev
Syleron Aug 23, 2020
a516f39
Moved official plugins into core repo
Syleron Aug 23, 2020
6620823
Merge pull request #171 from Syleron/dev
Syleron Aug 23, 2020
ae055d5
resolved FIP not coming up
Syleron Aug 23, 2020
dd605b9
Merge pull request #172 from Syleron/dev
Syleron Aug 23, 2020
43322b8
renamed internal to src to allow for referencing
Syleron Aug 23, 2020
8b9a5b5
Merge pull request #173 from Syleron/dev
Syleron Aug 23, 2020
ce20e29
The pulseha service is now called pulseha and the pulse command line …
Syleron Aug 24, 2020
0c48a83
Merge pull request #174 from Syleron/dev
Syleron Aug 24, 2020
3bf5597
number of fixes and changes to allow for auto-failback etc.
Syleron Aug 26, 2020
9aaf8cc
Merge branch 'master' into dev
Syleron Aug 26, 2020
deab69b
fixed issue where you could change the local node ID via the config c…
Syleron Aug 27, 2020
a367b62
logging to file. resolved panic when sigterm when not in a configured…
Syleron Aug 27, 2020
9b7cd04
oops forgot to include the new config package
Syleron Aug 27, 2020
99deff2
removed restriction on config command being required to use when in a…
Syleron Sep 1, 2020
586dff5
Journal logging
Syleron Jan 14, 2021
260f4c9
Merge pull request #175 from Syleron/dev
Syleron Jan 15, 2021
60ca9b5
Create FUNDING.yml
Syleron Jun 5, 2021
1d41ff4
Set theme jekyll-theme-leap-day
Syleron Sep 28, 2021
6af434e
Set theme jekyll-theme-midnight
Syleron Sep 28, 2021
20d8647
Create CNAME
Syleron Sep 28, 2021
e3e2567
continued development and improvements to the pulse project including…
Syleron Sep 29, 2021
c9a5a85
updated licensing structure and comment structure from some documents
Syleron Sep 29, 2021
23fceab
continued development to the members document.. more cleaning up more…
Syleron Sep 29, 2021
fefd36c
fix the broken code I introduced changing the return type to makeActive
Syleron Sep 29, 2021
07a44a4
more stylingh and comments
Syleron Sep 29, 2021
b885eaa
corrected issue with promote method for the pulse server
Syleron Sep 29, 2021
a43a303
Updated cli server comments and added a language package
Syleron Oct 12, 2021
23eab03
continued improvements to documentation
Syleron Oct 13, 2021
c9faf70
updated more documentation and language package
Syleron Oct 13, 2021
b48e8cf
continued development
Syleron Nov 24, 2021
85399c4
added score to pulseha status... I've also revamped the protobuf stru…
Nov 25, 2021
a855713
continued development with healthchecks
Syleron Dec 1, 2021
63bc691
Updated the protobuf definitions.. jheeezx that was painful
Syleron Dec 2, 2021
3be3b18
added plugins to the config
Syleron Dec 2, 2021
1a4be56
status command now properly shows member score
Syleron Dec 2, 2021
99daf16
running health checks and getting a score update on the local node
Syleron Dec 2, 2021
432e902
health check scores kinda working
Syleron Dec 2, 2021
101d096
started doing some of the config structure for the ping plugin
Syleron Dec 3, 2021
d74c71d
fixed join issue not defining local definitions correctly
Syleron Dec 3, 2021
85f1b2b
Merge branch 'voting' of github.com:Syleron/pulseha into voting
Syleron Dec 3, 2021
011e8e5
a number of improvements.. communication seems to be failing
Syleron Dec 3, 2021
1cb59b9
ugghhh not workingggg
Syleron Dec 3, 2021
5aaf057
added missing files
Syleron Jan 13, 2022
a88f1db
something that I may need
cottonaf Feb 4, 2022
a76a04b
pushing latest code changes
Syleron Feb 8, 2022
319fc06
last minute fixes to docs
Syleron Feb 9, 2022
a0dc566
Merge pull request #177 from Syleron/voting
Syleron Feb 9, 2022
f9d0e31
Merge branch 'master' into dev
Syleron Feb 9, 2022
6441cdb
Merge pull request #178 from Syleron/dev
Syleron Feb 9, 2022
086ef42
continued development with plugins
Syleron Feb 21, 2022
8eaaca4
Minor improvements to plugins and readme.
Syleron Mar 31, 2022
3b9558e
updated readme
Syleron Mar 31, 2022
efbddb0
Merge branch 'dev' into voting
Syleron Mar 31, 2022
368e32a
more changes
Syleron Mar 31, 2022
0ef9cdb
more work
Syleron Mar 31, 2022
dbc195d
Merge pull request #179 from Syleron/voting
Syleron Mar 31, 2022
b6bff49
Merge branch 'master' into dev
Syleron Mar 31, 2022
a8caf31
Merge pull request #180 from Syleron/dev
Syleron Mar 31, 2022
766e2b5
Merge branch 'master' into dev
Syleron Sep 22, 2022
e577476
Merge branch 'dev' into voting
Syleron Sep 22, 2022
d067836
Merge branch 'dev' of github.com:Syleron/pulseha into dev
Syleron Sep 22, 2022
9c6b91c
resolved pulseha segfault for voting
Syleron Sep 22, 2022
d2e9b00
Merge branch 'dev' into voting
Syleron Sep 22, 2022
0e0ba11
Merge pull request #182 from Syleron/voting
Syleron Sep 22, 2022
c4e2db3
Merge branch 'master' into dev
Syleron Sep 22, 2022
a5284f2
rebuilt from the ground up. need to address a few things and also has…
Syleron Mar 17, 2025
8ba26e6
updated go mod file
Syleron Apr 7, 2025
f730895
updated to use uuid instead of hostnames
Syleron Apr 10, 2025
9a5d927
refine IPv4 validation
Syleron May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added --log-level=debug
Empty file.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: Syleron
30 changes: 30 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: dev
on:
push:
branches:
- '*'
- '!master'
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

# - name: Test
# run: make test

- name: Dependencies
run: make get

- name: Build
run: make
29 changes: 29 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: master
on:
push:
branches:
- 'master'
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

# - name: Test
# run: make test

- name: Dependencies
run: make get

- name: Build
run: make
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@ cmake-build-debug/
*.out

# Project-local glide cache
.glide/
.glide/


# Bin directory
bin/
cmd/pulseha/bin/
cmd/pulsectl/bin/
plugins/netcore/bin/
.idea/

go.sum
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pulseha.com
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

PulseHA - HA Cluster Daemon
Copyright (C) 2017 Andrew Zak <andrew@pulseha.com>
Copyright (C) 2017-2021 Andrew Zak <andrew@linux.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand Down
75 changes: 42 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
.PHONEY: clean get
.PHONEY: clean get protos test

VERSION=`git describe`
VERSION=`git describe --tags`
BUILD=`git rev-parse HEAD`
LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}"

default: all

all: build cli
all: protos build cli

build: get test
if [ ! -d "./bin/" ]; then mkdir ./bin/; fi
cp config.json ./bin/
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -v -o ./bin/pulse ./src/
buildrace: get test
if [ ! -d "./bin/" ]; then mkdir ./bin/; fi
cp config.json ./bin/
env GOOS=linux GOARCH=amd64 go build -race ${LDFLAGS} -v -o ./bin/pulse ./src/
macbuild: get test
if [ ! -d "./bin/" ]; then mkdir ./bin/; fi
cp config.json ./bin/
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -v -o ./bin/pulse ./src/
build: get
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -v -o ./cmd/pulseha/bin/pulseha ./cmd/pulseha
buildrace: get
env GOOS=linux GOARCH=amd64 go build -race ${LDFLAGS} -v -o ./cmd/pulseha/bin/pulseha ./cmd/pulseha
netcore: get
env GOOS=linux GOARCH=amd64 go build -buildmode=plugin -o ./plugins/netcore/bin/networking.so ./plugins/netcore
hcping: get
env GOOS=linux GOARCH=amd64 go build -buildmode=plugin -o ./plugins/hcPing/bin/hcping.so ./plugins/hcPing
hcserial: get
env GOOS=linux GOARCH=amd64 go build -buildmode=plugin -o ./plugins/hcSerial/bin/hcserial.so ./plugins/hcSerial
genemailalerts: get
env GOOS=linux GOARCH=amd64 go build -buildmode=plugin -o ./plugins/genEmailAlerts/bin/genemail.so ./plugins/genEmailAlerts
get:
go get -d ./src/
go get -d ./cmd/
cli: get testCMD
if [ ! -d "./bin/" ]; then mkdir ./bin/; fi
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -v -o ./bin/pulseha ./cmd/
maccli: get testCMD
if [ ! -d "./bin/" ]; then mkdir ./bin/; fi
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -v -o ./bin/pulseha ./cmd/
go mod download
go get -u google.golang.org/protobuf/cmd/protoc-gen-go
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc
cli: get
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -v -o ./cmd/pulsectl/bin/pulsectl ./cmd/pulsectl
protos:
protoc ./proto/pulse.proto --go_out=plugins=grpc:.
testCMD:
go test -timeout 10s -v ./cmd/
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
./rpc/server.proto
test:
go test -timeout 10s -v ./src/
go test -timeout 30s -v ./internal/...
go test -timeout 30s -v ./cmd/...
go test -timeout 30s -v ./packages/...
clean:
go clean
install: build cli
go clean -modcache
rm -f ./rpc/*.pb.go
rm -f ./rpc/*/*.pb.go
install:
ifneq ($(shell uname),Linux)
echo "Install only available on Linux"
exit 1
endif
cp ./bin/pulseha /usr/local/bin/
cp ./cmd/pulseha/bin/pulseha /usr/local/sbin/
cp ./cmd/pulsectl/bin/pulsectl /usr/local/sbin/
#chmod +x /etc/pulsectl/pulse
if [ ! -d "/etc/pulseha/" ]; then mkdir /etc/pulseha/; fi
cp config.json /etc/pulseha/
cp ./bin/pulse /etc/pulseha/
chmod +x /etc/pulseha/pulse
if [ ! -d "/usr/local/lib/pulseha" ]; then mkdir /usr/local/lib/pulseha; fi
cp pulseha.service /etc/systemd/system/
systemctl daemon-reload
install-netcore:
cp ./plugins/netcore/bin/networking.so /usr/local/lib/pulseha
install-hcping:
cp ./plugins/hcPing/bin/hcping.so /usr/local/lib/pulseha
install-hcserial:
cp ./plugins/hcSerial/bin/hcserial.so /usr/local/lib/pulseha
install-genemailalerts:
cp ./plugins/genEmailAlerts/bin/genemail.so /usr/local/lib/pulseha
Loading