-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ jobs: | |
matrix: | ||
package_name: | ||
- openziti | ||
- openziti-controller | ||
arch: | ||
- goreleaser: amd64 | ||
gox: amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# nfpm configuration file | ||
# | ||
# check https://nfpm.goreleaser.com/configuration for detailed usage | ||
# | ||
name: openziti-controller | ||
arch: ${GOARCH} | ||
platform: linux | ||
version: ${ZITI_VERSION} | ||
maintainer: ${ZITI_MAINTAINER} | ||
description: > | ||
Provides a system service for running an OpenZiti Controller | ||
vendor: ${ZITI_VENDOR} | ||
homepage: ${ZITI_HOMEPAGE} | ||
license: Apache-2.0 | ||
|
||
# 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 | ||
|
||
depends: | ||
- openziti # ziti CLI | ||
|
||
# Contents to add to the package. | ||
contents: | ||
- dst: /lib/systemd/system/ | ||
src: ./dist/dist-packages/linux/openziti-controller/ziti-controller.service | ||
|
||
- dst: /opt/openziti/etc/controller | ||
type: dir | ||
file_info: | ||
mode: 0755 | ||
|
||
- dst: /opt/openziti/etc/controller/ | ||
src: ./dist/dist-packages/linux/openziti-controller/env | ||
type: config|noreplace | ||
|
||
- dst: /opt/openziti/etc/controller/ | ||
src: ./dist/dist-packages/linux/openziti-controller/entrypoint.bash | ||
|
13 changes: 13 additions & 0 deletions
13
dist/dist-packages/linux/openziti-controller/entrypoint.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# this thin wrapper script for the OpenZiti Controller enables | ||
# - evaluating arguments from the env file | ||
# - future: bootstrapping a default run environment with PKI and initialized database | ||
# | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# shellcheck disable=SC2068 # because we want to word-split args | ||
exec /opt/openziti/bin/ziti controller run $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ZITI_CONTROLLER_RUN_ARGS="config.yml --log-formatter text --verbose" | ||
#PFXLOG_NO_JSON=true |
17 changes: 17 additions & 0 deletions
17
dist/dist-packages/linux/openziti-controller/ziti-controller.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=OpenZiti Controller | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
DynamicUser=yes | ||
StateDirectory=ziti-controller | ||
UMask=0007 | ||
Restart=always | ||
RestartSec=3 | ||
LimitNOFILE=65535 | ||
EnvironmentFile=/opt/openziti/etc/controller/env | ||
ExecStart=/opt/openziti/etc/controller/entrypoint.bash ${ZITI_CONTROLLER_RUN_ARGS} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |