Update mgmt binary name and config doc (#75)

* using wiretrustee-mgmt for binary name

* using wiretrustee-mgmt

* updated documentation and compose files to use config.json
This commit is contained in:
Maycon Santos 2021-07-31 12:33:04 +02:00 committed by GitHub
parent f51a79d3b3
commit ea99def502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 7 deletions

View File

@ -24,7 +24,7 @@ builds:
- id: wiretrustee-mgmt - id: wiretrustee-mgmt
dir: management dir: management
env: [CGO_ENABLED=0] env: [CGO_ENABLED=0]
binary: wiretrustee-mgmt
goos: goos:
- linux - linux
goarch: goarch:

View File

@ -0,0 +1,24 @@
{
"Stuns": [
{
"Proto": "udp",
"URI": "stun:stun.wiretrustee.com:3468",
"Username": "",
"Password": null
}
],
"Turns": [
{
"Proto": "udp",
"URI": "turn:stun.wiretrustee.com:3468",
"Username": "some_turn_user",
"Password": "some_turn_passwd"
}
],
"Signal": {
"Proto": "http",
"URI": "signal.wiretrustee.com:10000",
"Username": "",
"Password": null
}
}

View File

@ -12,6 +12,7 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- wiretrustee-mgmt:/var/lib/wiretrustee - wiretrustee-mgmt:/var/lib/wiretrustee
- ./config.json:/etc/wiretrustee/config.json
ports: ports:
- 33073:33073 - 33073:33073
# # port and command for Let's Encrypt validation # # port and command for Let's Encrypt validation

View File

@ -1,3 +1,3 @@
FROM gcr.io/distroless/base FROM gcr.io/distroless/base
ENTRYPOINT [ "/go/bin/wiretrustee","management"] ENTRYPOINT [ "/go/bin/wiretrustee-mgmt","management"]
COPY wiretrustee /go/bin/wiretrustee COPY wiretrustee-mgmt /go/bin/wiretrustee-mgmt

View File

@ -1,3 +1,3 @@
FROM gcr.io/distroless/base:debug FROM gcr.io/distroless/base:debug
ENTRYPOINT [ "/go/bin/wiretrustee","management","--log-level","debug"] ENTRYPOINT [ "/go/bin/wiretrustee-mgmt","management","--log-level","debug"]
COPY wiretrustee /go/bin/wiretrustee COPY wiretrustee-mgmt /go/bin/wiretrustee-mgmt

View File

@ -7,7 +7,7 @@ The CLI accepts the command **management** with the following options:
start Wiretrustee Management Server start Wiretrustee Management Server
Usage: Usage:
wiretrustee management [flags] wiretrustee-mgmt management [flags]
Flags: Flags:
--datadir string server data directory location (default "/var/lib/wiretrustee/") --datadir string server data directory location (default "/var/lib/wiretrustee/")
@ -39,9 +39,11 @@ docker run -d --name wiretrustee-management \
-p 33073:33073 \ -p 33073:33073 \
-p 443:443 \ -p 443:443 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \ -v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:latest \ wiretrustee/management:latest \
--letsencrypt-domain <YOUR-DOMAIN> --letsencrypt-domain <YOUR-DOMAIN>
``` ```
> An example of config.json can be found here [config.json](../infrastructure_files/config.json)
Trigger Let's encrypt certificate generation: Trigger Let's encrypt certificate generation:
```bash ```bash
@ -76,6 +78,7 @@ docker volume create wiretrustee-mgmt
docker run -d --name wiretrustee-management \ docker run -d --name wiretrustee-management \
-p 33073:33073 \ -p 33073:33073 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \ -v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:latest wiretrustee/management:latest
``` ```
### Debug tag ### Debug tag
@ -84,6 +87,7 @@ We also publish a docker image with the debug tag which has the log-level set to
shell $ docker run -d --name wiretrustee-management-debug \ shell $ docker run -d --name wiretrustee-management-debug \
-p 33073:33073 \ -p 33073:33073 \
-v wiretrustee-mgmt:/var/lib/wiretrustee \ -v wiretrustee-mgmt:/var/lib/wiretrustee \
-v ./config.json:/etc/wiretrustee/config.json \
wiretrustee/management:debug-latest wiretrustee/management:debug-latest
shell $ docker exec -ti wiretrustee-management-debug /bin/sh shell $ docker exec -ti wiretrustee-management-debug /bin/sh

View File

@ -21,7 +21,7 @@ var (
logLevel string logLevel string
rootCmd = &cobra.Command{ rootCmd = &cobra.Command{
Use: "wiretrustee", Use: "wiretrustee-mgmt",
Short: "", Short: "",
Long: "", Long: "",
} }