Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e13de5bd0d | |||
813b1519e4 | |||
f9b8d4f243 |
@ -101,6 +101,18 @@ nfpms:
|
|||||||
file_info:
|
file_info:
|
||||||
mode: 0755
|
mode: 0755
|
||||||
packager: apk
|
packager: apk
|
||||||
|
- dst: /var/lib/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
|
- dst: /usr/share/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
|
- dst: /var/log/emissary
|
||||||
|
type: dir
|
||||||
|
file_info:
|
||||||
|
mode: 0700
|
||||||
scripts:
|
scripts:
|
||||||
postinstall: "misc/packaging/common/postinstall-server.sh"
|
postinstall: "misc/packaging/common/postinstall-server.sh"
|
||||||
- id: emissary-agent
|
- id: emissary-agent
|
||||||
|
2
go.mod
2
go.mod
@ -14,6 +14,7 @@ require (
|
|||||||
github.com/golang-migrate/migrate/v4 v4.15.2
|
github.com/golang-migrate/migrate/v4 v4.15.2
|
||||||
github.com/jackc/pgx/v5 v5.2.0
|
github.com/jackc/pgx/v5 v5.2.0
|
||||||
github.com/jedib0t/go-pretty/v6 v6.4.4
|
github.com/jedib0t/go-pretty/v6 v6.4.4
|
||||||
|
github.com/lestrrat-go/jwx/v2 v2.0.8
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/qri-io/jsonschema v0.2.1
|
github.com/qri-io/jsonschema v0.2.1
|
||||||
@ -50,7 +51,6 @@ require (
|
|||||||
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
||||||
github.com/lestrrat-go/httprc v1.0.4 // indirect
|
github.com/lestrrat-go/httprc v1.0.4 // indirect
|
||||||
github.com/lestrrat-go/iter v1.0.2 // indirect
|
github.com/lestrrat-go/iter v1.0.2 // indirect
|
||||||
github.com/lestrrat-go/jwx/v2 v2.0.8 // indirect
|
|
||||||
github.com/lestrrat-go/option v1.0.0 // indirect
|
github.com/lestrrat-go/option v1.0.0 // indirect
|
||||||
github.com/lib/pq v1.10.7 // indirect
|
github.com/lib/pq v1.10.7 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
|
@ -2,6 +2,7 @@ package agent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"forge.cadoles.com/Cadoles/emissary/internal/command/agent/openwrt"
|
"forge.cadoles.com/Cadoles/emissary/internal/command/agent/openwrt"
|
||||||
|
"forge.cadoles.com/Cadoles/emissary/internal/command/config"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ func Root() *cli.Command {
|
|||||||
Usage: "Agent related commands",
|
Usage: "Agent related commands",
|
||||||
Subcommands: []*cli.Command{
|
Subcommands: []*cli.Command{
|
||||||
openwrt.Root(),
|
openwrt.Root(),
|
||||||
|
config.Root(),
|
||||||
RunCommand(),
|
RunCommand(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
agent:
|
agent:
|
||||||
|
serverUrl: http://127.0.0.1:3000
|
||||||
|
privateKeyPath: /var/lib/emissary/agent-key.json
|
||||||
reconciliationInterval: 5
|
reconciliationInterval: 5
|
||||||
controllers:
|
controllers:
|
||||||
persistence:
|
persistence:
|
||||||
@ -6,10 +8,14 @@ agent:
|
|||||||
stateFile: /var/lib/emissary/state.json
|
stateFile: /var/lib/emissary/state.json
|
||||||
spec:
|
spec:
|
||||||
enabled: true
|
enabled: true
|
||||||
serverUrl: http://192.168.0.45:3000
|
|
||||||
gateway:
|
gateway:
|
||||||
enabled: true
|
enabled: true
|
||||||
uci:
|
uci:
|
||||||
enabled: true
|
enabled: true
|
||||||
binPath: uci
|
binPath: uci
|
||||||
configBackupFile: /var/lib/emissary/uci-backup.conf
|
configBackupFile: /var/lib/emissary/uci-backup.conf
|
||||||
|
collectors:
|
||||||
|
- name: uname
|
||||||
|
command: uname
|
||||||
|
args:
|
||||||
|
- -a
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
command="/usr/bin/emissary"
|
command="/usr/bin/emissary"
|
||||||
command_args="--config /etc/emissary/config.yml agent run"
|
command_args="--workdir /usr/share/emissary --config /etc/emissary/agent.yml agent run"
|
||||||
start_stop_daemon_args='--chdir /usr/share/emissary'
|
|
||||||
supervisor=supervise-daemon
|
supervisor=supervise-daemon
|
||||||
|
output_log="/var/log/emissary/agent.log"
|
||||||
|
error_log="$output_log"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
command="/usr/bin/emissary"
|
command="/usr/bin/emissary"
|
||||||
command_args="--config /etc/emissary/config.yml server run"
|
command_args="--workdir /usr/share/emissary --config /etc/emissary/server.yml server run"
|
||||||
start_stop_daemon_args='--chdir /usr/share/emissary'
|
|
||||||
supervisor=supervise-daemon
|
supervisor=supervise-daemon
|
||||||
|
output_log="/var/log/emissary/server.log"
|
||||||
|
error_log="$output_log"
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
/usr/bin/emissary --workdir /usr/share/emissary --config /etc/emissary/server.yml server database migrate
|
||||||
|
}
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
|
Reference in New Issue
Block a user