Import net/traefik, a high availability reverse proxy and load balancer

This commit is contained in:
Thomas Zander 2017-10-14 12:58:24 +00:00
parent f9425893a6
commit bf88d5d7ac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=452063
8 changed files with 117 additions and 2 deletions

2
GIDs
View File

@ -416,7 +416,7 @@ vault:*:471:
nomad:*:472:
minio:*:473:
gitlab-runner:*:474:
# free: 475
traefik:*:475:
# free: 476
# free: 477
prometheus:*:478:

2
UIDs
View File

@ -422,7 +422,7 @@ vault:*:471:471::0:0:Vault Daemon:/nonexistent:/usr/sbin/nologin
nomad:*:472:472::0:0:Nomad Daemon:/var/tmp/nomad:/usr/sbin/nologin
minio:*:473:473::0:0:Minio Daemon:/var/tmp/minio:/usr/sbin/nologin
gitlab-runner:*:474:474::0:0:GitLab Runner Daemon:/var/tmp/gitlab_runner:/usr/sbin/nologin
# free: 475
traefik:*:475:475::0:0:Traefik Daemon:/var/tmp/traefik:/usr/sbin/nologin
# free: 476
# free: 477
prometheus:*:478:478::0:0:Prometheus Daemon:/var/tmp/prometheus:/usr/sbin/nologin

View File

@ -1386,6 +1386,7 @@
SUBDIR += torsocks
SUBDIR += traceroute
SUBDIR += traff
SUBDIR += traefik
SUBDIR += trafshow
SUBDIR += trafshow3
SUBDIR += tramp

40
net/traefik/Makefile Normal file
View File

@ -0,0 +1,40 @@
# $FreeBSD$
PORTNAME= traefik
PORTVERSION= 1.3.8
DISTVERSIONPREFIX= v
CATEGORIES= net
MAINTAINER= riggs@FreeBSD.org
COMMENT= High availability reverse proxy and load balancer
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.md
USES= go
USE_GITHUB= yes
GH_ACCOUNT= containous
GH_SUBDIR= src/github.com/containous/traefik
GH_TUPLE= jteeuwen:go-bindata:a0ff256:gobindata/src/github.com/jteeuwen/go-bindata
USE_RC_SUBR= traefik
USERS= traefik
GROUPS= traefik
PLIST_FILES= bin/traefik \
"@sample etc/traefik.toml.sample"
do-build:
@cd ${WRKSRC}/src/github.com/jteeuwen/go-bindata/go-bindata; \
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x
@cd ${WRKSRC}/src/github.com/containous/traefik; \
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go generate && \
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x ./cmd/traefik
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/containous/traefik/traefik ${STAGEDIR}${PREFIX}/bin/traefik
${INSTALL_DATA} ${WRKSRC}/src/github.com/containous/traefik/traefik.sample.toml ${STAGEDIR}${PREFIX}/etc/traefik.toml.sample
.include <bsd.port.mk>

5
net/traefik/distinfo Normal file
View File

@ -0,0 +1,5 @@
TIMESTAMP = 1507464024
SHA256 (containous-traefik-v1.3.8_GH0.tar.gz) = 2e949d01b771550cacd2ab68692b867fa98818eb5918f982fcc9b63fbf073e92
SIZE (containous-traefik-v1.3.8_GH0.tar.gz) = 10757773
SHA256 (jteeuwen-go-bindata-a0ff256_GH0.tar.gz) = 06c7bb64ab428a28eb3633ae19fafb6b7b241d384ef45ac0728b1c5fbec64961
SIZE (jteeuwen-go-bindata-a0ff256_GH0.tar.gz) = 17868

View File

@ -0,0 +1,10 @@
--- generate.go.orig 2017-09-07 20:04:03 UTC
+++ generate.go
@@ -4,6 +4,6 @@ Copyright
//go:generate rm -vf autogen/gen.go
//go:generate mkdir -p static
-//go:generate go-bindata -pkg autogen -o autogen/gen.go ./static/... ./templates/...
+//go:generate src/github.com/jteeuwen/go-bindata/go-bindata/go-bindata -pkg autogen -o autogen/gen.go ./static/... ./templates/...
package main

View File

@ -0,0 +1,53 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: traefik
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# traefik_enable (bool): Set to NO by default.
# Set it to YES to enable traefik.
# traefik_user (user): Set user to run traefik.
# Default is "traefik".
# traefik_group (group): Set group to run traefik.
# Default is "traefik".
# traefik_conf (path): Path to traefik configuration file.
# Default is %%PREFIX%%/etc/traefik.toml
# traefik_env (vars): Set environment variables used with traefik
# Default is "".
# These are necessary for ACME (Let's Encrypt)
# configuration, see
# https://docs.traefik.io/configuration/acme/
. /etc/rc.subr
name=traefik
rcvar=traefik_enable
load_rc_config $name
: ${traefik_enable:="NO"}
: ${traefik_user:="traefik"}
: ${traefik_group:="traefik"}
: ${traefik_conf:="%%PREFIX%%/etc/traefik.toml"}
: ${traefik_env:=""}
pidfile=/var/run/traefik.pid
procname="%%PREFIX%%/bin/traefik"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} /usr/bin/env ${traefik_env} ${procname} --configFile=${traefik_conf} ${traefik_args}"
start_precmd=traefik_startprecmd
traefik_startprecmd()
{
if [ ! -e ${pidfile} ]; then
install -o ${traefik_user} -g ${traefik_group} /dev/null ${pidfile};
fi
}
run_rc_command "$1"

6
net/traefik/pkg-descr Normal file
View File

@ -0,0 +1,6 @@
Traefik (pronounced like traffic) is a modern HTTP reverse proxy and load
balancer made to deploy microservices with ease. It supports several backends
(Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS,
and a lot more) to manage its configuration automatically and dynamically.
WWW: https://traefik.io/