mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 01:37:52 +02:00
add zrok agent service unit
This commit is contained in:
parent
8442cada6f
commit
1a01232123
1
.github/workflows/promote-downstreams.yml
vendored
1
.github/workflows/promote-downstreams.yml
vendored
@ -63,6 +63,7 @@ jobs:
|
|||||||
package_name:
|
package_name:
|
||||||
- zrok
|
- zrok
|
||||||
- zrok-share
|
- zrok-share
|
||||||
|
- zrok-agent
|
||||||
arch:
|
arch:
|
||||||
- deb: amd64
|
- deb: amd64
|
||||||
rpm: x86_64
|
rpm: x86_64
|
||||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -103,7 +103,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
SEMVER_PRE=${SEMVER#*-}
|
SEMVER_PRE=${SEMVER#*-}
|
||||||
fi
|
fi
|
||||||
for PAX in zrok{,-share}; do
|
for PAX in zrok{,-share,-agent}; do
|
||||||
_pattern="./dist/${PAX}-${SEMVER_CORE}${SEMVER_PRE:+~${SEMVER_PRE}}*.${ARCH}.rpm"
|
_pattern="./dist/${PAX}-${SEMVER_CORE}${SEMVER_PRE:+~${SEMVER_PRE}}*.${ARCH}.rpm"
|
||||||
if ! compgen -G "$_pattern" > /dev/null; then
|
if ! compgen -G "$_pattern" > /dev/null; then
|
||||||
echo "ERROR: No RPM files found matching pattern '${_pattern}'" >&2
|
echo "ERROR: No RPM files found matching pattern '${_pattern}'" >&2
|
||||||
@ -139,7 +139,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
SEMVER_PRE=${SEMVER#*-}
|
SEMVER_PRE=${SEMVER#*-}
|
||||||
fi
|
fi
|
||||||
for PAX in zrok{,-share}; do
|
for PAX in zrok{,-share,-agent}; do
|
||||||
_pattern="./dist/${PAX}_${SEMVER_CORE}${SEMVER_PRE:+~${SEMVER_PRE}}*_${ARCH}.deb"
|
_pattern="./dist/${PAX}_${SEMVER_CORE}${SEMVER_PRE:+~${SEMVER_PRE}}*_${ARCH}.deb"
|
||||||
if ! compgen -G "$_pattern" > /dev/null; then
|
if ! compgen -G "$_pattern" > /dev/null; then
|
||||||
echo "ERROR: No DEB files found matching pattern '${_pattern}'" >&2
|
echo "ERROR: No DEB files found matching pattern '${_pattern}'" >&2
|
||||||
|
@ -137,3 +137,56 @@ nfpms:
|
|||||||
- dst: /opt/openziti/etc/zrok/
|
- dst: /opt/openziti/etc/zrok/
|
||||||
src: ./etc/caddy/multiple_upstream.Caddyfile
|
src: ./etc/caddy/multiple_upstream.Caddyfile
|
||||||
type: config|noreplace
|
type: config|noreplace
|
||||||
|
|
||||||
|
- package_name: zrok-agent
|
||||||
|
id: zrok-agent
|
||||||
|
vendor: NetFoundry
|
||||||
|
homepage: https://zrok.io/
|
||||||
|
maintainer: support@zrok.io
|
||||||
|
description: |
|
||||||
|
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
|
||||||
|
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
|
||||||
|
UI by running "zrok agent console".
|
||||||
|
license: Apache 2.0
|
||||||
|
|
||||||
|
# do not bundle the built binaries, only supporting files
|
||||||
|
meta: true
|
||||||
|
|
||||||
|
# Formats to be generated.
|
||||||
|
formats:
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
|
||||||
|
# {{ .ConventionalFileName }} satisfies the RPM name convention.
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
|
||||||
|
# Umask to be used on files without explicit mode set. (overridable)
|
||||||
|
umask: 0o002
|
||||||
|
|
||||||
|
# Package version within this release version.
|
||||||
|
release: 1
|
||||||
|
|
||||||
|
# Section.
|
||||||
|
section: default
|
||||||
|
|
||||||
|
# Priority.
|
||||||
|
priority: optional
|
||||||
|
|
||||||
|
# GoReleaser will automatically add the binaries here
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
|
||||||
|
# apt install --no-recommends zrok-share
|
||||||
|
recommends: []
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
|
||||||
|
rpm:
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# Contents to add to the package.
|
||||||
|
contents:
|
||||||
|
- dst: /usr/lib/systemd/user/
|
||||||
|
src: ./nfpm/zrok-agent.service
|
||||||
|
@ -141,3 +141,56 @@ nfpms:
|
|||||||
- dst: /opt/openziti/etc/zrok/
|
- dst: /opt/openziti/etc/zrok/
|
||||||
src: ./etc/caddy/multiple_upstream.Caddyfile
|
src: ./etc/caddy/multiple_upstream.Caddyfile
|
||||||
type: config|noreplace
|
type: config|noreplace
|
||||||
|
|
||||||
|
- package_name: zrok-agent
|
||||||
|
id: zrok-agent
|
||||||
|
vendor: NetFoundry
|
||||||
|
homepage: https://zrok.io/
|
||||||
|
maintainer: support@zrok.io
|
||||||
|
description: |
|
||||||
|
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
|
||||||
|
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
|
||||||
|
UI by running "zrok agent console".
|
||||||
|
license: Apache 2.0
|
||||||
|
|
||||||
|
# do not bundle the built binaries, only supporting files
|
||||||
|
meta: true
|
||||||
|
|
||||||
|
# Formats to be generated.
|
||||||
|
formats:
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
|
||||||
|
# {{ .ConventionalFileName }} satisfies the RPM name convention.
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
|
||||||
|
# Umask to be used on files without explicit mode set. (overridable)
|
||||||
|
umask: 0o002
|
||||||
|
|
||||||
|
# Package version within this release version.
|
||||||
|
release: 1
|
||||||
|
|
||||||
|
# Section.
|
||||||
|
section: default
|
||||||
|
|
||||||
|
# Priority.
|
||||||
|
priority: optional
|
||||||
|
|
||||||
|
# GoReleaser will automatically add the binaries here
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
|
||||||
|
# apt install --no-recommends zrok-share
|
||||||
|
recommends: []
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
|
||||||
|
rpm:
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# Contents to add to the package.
|
||||||
|
contents:
|
||||||
|
- dst: /usr/lib/systemd/user/
|
||||||
|
src: ./nfpm/zrok-agent.service
|
||||||
|
@ -145,3 +145,56 @@ nfpms:
|
|||||||
- dst: /opt/openziti/etc/zrok/
|
- dst: /opt/openziti/etc/zrok/
|
||||||
src: ./etc/caddy/multiple_upstream.Caddyfile
|
src: ./etc/caddy/multiple_upstream.Caddyfile
|
||||||
type: config|noreplace
|
type: config|noreplace
|
||||||
|
|
||||||
|
- package_name: zrok-agent
|
||||||
|
id: zrok-agent
|
||||||
|
vendor: NetFoundry
|
||||||
|
homepage: https://zrok.io/
|
||||||
|
maintainer: support@zrok.io
|
||||||
|
description: |
|
||||||
|
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
|
||||||
|
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
|
||||||
|
UI by running "zrok agent console".
|
||||||
|
license: Apache 2.0
|
||||||
|
|
||||||
|
# do not bundle the built binaries, only supporting files
|
||||||
|
meta: true
|
||||||
|
|
||||||
|
# Formats to be generated.
|
||||||
|
formats:
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
|
||||||
|
# {{ .ConventionalFileName }} satisfies the RPM name convention.
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
|
||||||
|
# Umask to be used on files without explicit mode set. (overridable)
|
||||||
|
umask: 0o002
|
||||||
|
|
||||||
|
# Package version within this release version.
|
||||||
|
release: 1
|
||||||
|
|
||||||
|
# Section.
|
||||||
|
section: default
|
||||||
|
|
||||||
|
# Priority.
|
||||||
|
priority: optional
|
||||||
|
|
||||||
|
# GoReleaser will automatically add the binaries here
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
|
||||||
|
# apt install --no-recommends zrok-share
|
||||||
|
recommends: []
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
|
||||||
|
rpm:
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# Contents to add to the package.
|
||||||
|
contents:
|
||||||
|
- dst: /usr/lib/systemd/user/
|
||||||
|
src: ./nfpm/zrok-agent.service
|
||||||
|
@ -143,3 +143,56 @@ nfpms:
|
|||||||
- dst: /opt/openziti/etc/zrok/
|
- dst: /opt/openziti/etc/zrok/
|
||||||
src: ./etc/caddy/multiple_upstream.Caddyfile
|
src: ./etc/caddy/multiple_upstream.Caddyfile
|
||||||
type: config|noreplace
|
type: config|noreplace
|
||||||
|
|
||||||
|
- package_name: zrok-agent
|
||||||
|
id: zrok-agent
|
||||||
|
vendor: NetFoundry
|
||||||
|
homepage: https://zrok.io/
|
||||||
|
maintainer: support@zrok.io
|
||||||
|
description: |
|
||||||
|
This package provides zrok-agent.service. Enable your zrok account on this device with "zrok enable". Run
|
||||||
|
"systemctl enable --user --now zrok-agent.service" to enable the service for the current user and visit the agent
|
||||||
|
UI by running "zrok agent console".
|
||||||
|
license: Apache 2.0
|
||||||
|
|
||||||
|
# do not bundle the built binaries, only supporting files
|
||||||
|
meta: true
|
||||||
|
|
||||||
|
# Formats to be generated.
|
||||||
|
formats:
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
|
||||||
|
# {{ .ConventionalFileName }} satisfies the RPM name convention.
|
||||||
|
file_name_template: "{{ .ConventionalFileName }}"
|
||||||
|
|
||||||
|
# Umask to be used on files without explicit mode set. (overridable)
|
||||||
|
umask: 0o002
|
||||||
|
|
||||||
|
# Package version within this release version.
|
||||||
|
release: 1
|
||||||
|
|
||||||
|
# Section.
|
||||||
|
section: default
|
||||||
|
|
||||||
|
# Priority.
|
||||||
|
priority: optional
|
||||||
|
|
||||||
|
# GoReleaser will automatically add the binaries here
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# this allows users to satisfy the requirement for jq another way, not with the package manager, e.g.
|
||||||
|
# apt install --no-recommends zrok-share
|
||||||
|
recommends: []
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
# yum and dnf do not automatically install "weak deps" aka "recommends", so we need to add them as a dependency
|
||||||
|
rpm:
|
||||||
|
dependencies:
|
||||||
|
- zrok
|
||||||
|
|
||||||
|
# Contents to add to the package.
|
||||||
|
contents:
|
||||||
|
- dst: /usr/lib/systemd/user/
|
||||||
|
src: ./nfpm/zrok-agent.service
|
||||||
|
18
nfpm/zrok-agent.service
Normal file
18
nfpm/zrok-agent.service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# /usr/lib/systemd/user/zrok-agent.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=zrok agent user service unit
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
UMask=0007
|
||||||
|
ExecStart=/opt/openziti/bin/zrok agent start
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
#StandardInput=null
|
||||||
|
#StandardOutput=journal
|
||||||
|
#StandardError=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
@ -14,4 +14,4 @@ Restart=always
|
|||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=default.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user