Bug 244913 - [NEW PORT] net/traefik2 High availability reverse proxy and load balancer (Version 2.x)
Summary: [NEW PORT] net/traefik2 High availability reverse proxy and load balancer (Ve...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords: feature
Depends on:
Blocks:
 
Reported: 2020-03-19 16:39 UTC by Christopher Beppler
Modified: 2020-03-21 12:55 UTC (History)
1 user (show)

See Also:


Attachments
net/traefik2 shar (5.22 KB, text/plain)
2020-03-19 16:39 UTC, Christopher Beppler
no flags Details
net/traefik2 shar, version 2.1.8 (4.99 KB, text/plain)
2020-03-20 11:59 UTC, Christopher Beppler
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Beppler 2020-03-19 16:39:30 UTC
Created attachment 212530 [details]
net/traefik2 shar

Hi,

This port is based on net/traefik but since the configuration is not compatible between v1 and v2, I thought having it as a separate port is better.

Thanks,
Funzi
Comment 1 Kurt Jaeger freebsd_committer 2020-03-19 18:39:43 UTC
Have you tested the build in poudriere ?

cd /wrkdirs/usr/ports/net/traefik2/work/traefik-2.1.7/webui; npm install; npm run build:nc
npm ERR! code EAI_FAIL
npm ERR! errno EAI_FAIL
npm ERR! network request to https://registry.npmjs.org/semver/-/semver-5.7.0.tgz failed, reason: getaddrinfo EAI_FAIL registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-03-19T18_27_19_879Z-debug.log
*** Error code 1
Comment 2 Christopher Beppler 2020-03-19 20:13:41 UTC
Apologies, I've tested only in /usr/ports and understand the problem now.

This will take a while to fix. I realized that the vendoring will fail as well (once the node issue is resolved) and there are a lot of dependencies.

Once I was able to solve it, I will update the shar.
Comment 3 Kurt Jaeger freebsd_committer 2020-03-20 02:50:54 UTC
For the go modules, I have this little writeup on how to get it into the makefile:

- Change to WRKSRC of your port
- run
  go mod vendor
  modules2tuple vendor/modules.txt > /tmp/ggg
- use /tmp/ggg as GH_TUPLE for the port Makefile
- go list -m shows you the list of modules
Comment 4 Christopher Beppler 2020-03-20 11:59:47 UTC
Created attachment 212547 [details]
net/traefik2 shar, version 2.1.8
Comment 5 Christopher Beppler 2020-03-20 12:00:20 UTC
I have tried it with GH_TUPLE but after 1 hour of trying to fix the branches/commit IDs I gave up and decided to fork the upstream repository and vendored the 203 dependencies.

In a way, that was also the approach the maintainer of net/traefik took because generating the static resources required running npm in a specific version just at build time.

According to the Porter's handbook that is the least preferred option but to my opinion for 2.1.8 the only sustainable way. Hopefully the dependencies clear up a bit once 2.2 is released.

I have attached a new shar and verified that it build with poudriere with 11.3 and 12.1.
Comment 6 commit-hook freebsd_committer 2020-03-21 12:55:19 UTC
A commit references this bug:

Author: pi
Date: Sat Mar 21 12:54:55 UTC 2020
New revision: 528852
URL: https://svnweb.freebsd.org/changeset/ports/528852

Log:
  New port: net/traefik2 High availability reverse proxy and load balancer 2.x

  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/

  PR:		244913
  Submitted by:	Christopher Beppler <freebsd@funzi.org>

Changes:
  head/net/Makefile
  head/net/traefik2/
  head/net/traefik2/Makefile
  head/net/traefik2/distinfo
  head/net/traefik2/pkg-message
Comment 7 Kurt Jaeger freebsd_committer 2020-03-21 12:55:33 UTC
Committed, thanks!