Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2024 13:08:19 GMT
From:      Jimmy Olgeni <olgeni@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d55b13c0d079 - main - net/redpanda-connect: add new port
Message-ID:  <202406041308.454D8JuB065939@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by olgeni:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d55b13c0d079379533133ca3f9c0b29499bbf3b6

commit d55b13c0d079379533133ca3f9c0b29499bbf3b6
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2024-06-02 00:59:47 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2024-06-04 13:06:49 +0000

    net/redpanda-connect: add new port
    
    After the acquisition of benthos.dev by Redpanda, Benthos was renamed to
    Redpanda Connect.
    
    Some connectors in Redpanda Connect require an Enterprise license to be
    used; they are provided under the 'ENTERPRISE' port option.
---
 net/Makefile                                       |  1 +
 net/redpanda-connect/Makefile                      | 50 ++++++++++++++++++
 net/redpanda-connect/distinfo                      |  5 ++
 net/redpanda-connect/files/config.yaml             | 27 ++++++++++
 .../files/patch-internal_impl_redis_client.go      | 11 ++++
 net/redpanda-connect/files/redpanda_connect.in     | 60 ++++++++++++++++++++++
 .../files/remove-enterprise-connectors.patch       | 11 ++++
 net/redpanda-connect/pkg-descr                     | 24 +++++++++
 8 files changed, 189 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index da15599fa71a..3d8d6773210e 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1221,6 +1221,7 @@
     SUBDIR += reaver
     SUBDIR += recvnet
     SUBDIR += redir
+    SUBDIR += redpanda-connect
     SUBDIR += relayd
     SUBDIR += remarkable-devd
     SUBDIR += remmina
diff --git a/net/redpanda-connect/Makefile b/net/redpanda-connect/Makefile
new file mode 100644
index 000000000000..f0ab06fece5c
--- /dev/null
+++ b/net/redpanda-connect/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	connect
+DISTVERSIONPREFIX=	v
+DISTVERSION=	4.28.0
+CATEGORIES=	net
+PKGNAMEPREFIX=	redpanda-
+
+MAINTAINER=	olgeni@FreeBSD.org
+COMMENT=	Stream processor for a wide array of data sources and sinks
+WWW=		https://redpanda.com/blog/redpanda-connect
+
+# RCL license applies to the "snowflake" and "splunk" connectors
+LICENSE=	APACHE20 RCL
+LICENSE_COMB=	multi
+LICENSE_NAME_RCL=	Redpanda Community License Agreement
+LICENSE_FILE_APACHE20=	${WRKSRC}/licenses/Apache-2.0.txt
+LICENSE_FILE_RCL=	${WRKSRC}/licenses/rcl.md
+LICENSE_PERMS_RCL=	dist-mirror dist-sell pkg-mirror pkg-sell no-auto-accept
+LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+USES=		go:modules
+USE_RC_SUBR=	redpanda_connect
+
+GO_MODULE=	github.com/redpanda-data/connect/v4
+GO_TARGET=	./cmd/redpanda-connect
+
+ETCDIR=		${PREFIX}/etc/${PKGNAMEPREFIX}${PORTNAME}
+
+# Redpanda Connect was formerly known as Benthos
+USERS=		benthos
+GROUPS=		benthos
+
+PLIST_FILES=	bin/redpanda-connect \
+		"@dir(,,755) %%ETCDIR%%" \
+		"@sample %%ETCDIR%%/config.yaml.sample"
+
+OPTIONS_DEFINE=	ENTERPRISE
+ENTERPRISE_DESC=Enable connectors under the RCL license
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if !${PORT_OPTIONS:MENTERPRISE}
+	@${PATCH} -d ${WRKSRC} < ${FILESDIR}/remove-enterprise-connectors.patch
+.endif
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${FILESDIR}/config.yaml ${STAGEDIR}${ETCDIR}/config.yaml.sample
+
+.include <bsd.port.post.mk>
diff --git a/net/redpanda-connect/distinfo b/net/redpanda-connect/distinfo
new file mode 100644
index 000000000000..9f66911658f7
--- /dev/null
+++ b/net/redpanda-connect/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1717255055
+SHA256 (go/net_redpanda-connect/connect-v4.28.0/v4.28.0.mod) = 026b458b37223045756f4054c8666d25523b86b032f0372e598f87879ed79820
+SIZE (go/net_redpanda-connect/connect-v4.28.0/v4.28.0.mod) = 17727
+SHA256 (go/net_redpanda-connect/connect-v4.28.0/v4.28.0.zip) = 8177df59a24c9796884bfe7430e24d2b20cd90ad620206c32cd3cf909fd2035e
+SIZE (go/net_redpanda-connect/connect-v4.28.0/v4.28.0.zip) = 1454691
diff --git a/net/redpanda-connect/files/config.yaml b/net/redpanda-connect/files/config.yaml
new file mode 100644
index 000000000000..aaad19490758
--- /dev/null
+++ b/net/redpanda-connect/files/config.yaml
@@ -0,0 +1,27 @@
+# Sample configuration file for Redpanda Connect. It saves all messages to a file (/tmp/benthos.txt).
+http:
+  enabled: true
+  address: 127.0.0.1:4195
+  root_path: /
+  debug_endpoints: false
+input:
+  http_server:
+    path: /post
+    ws_path: /post/ws
+    ws_welcome_message: "Welcome to the Benthos Websocket API."
+    allowed_verbs:
+      - POST
+    timeout: 5s
+    cors:
+      enabled: false
+      allowed_origins: []
+    sync_response:
+      status: "200"
+      headers:
+        Content-Type: application/octet-stream
+output:
+  file:
+    path: /tmp/benthos.txt
+    codec: lines
+shutdown_delay: 0s
+shutdown_timeout: 20s
diff --git a/net/redpanda-connect/files/patch-internal_impl_redis_client.go b/net/redpanda-connect/files/patch-internal_impl_redis_client.go
new file mode 100644
index 000000000000..f9697c1afeab
--- /dev/null
+++ b/net/redpanda-connect/files/patch-internal_impl_redis_client.go
@@ -0,0 +1,11 @@
+--- internal/impl/redis/client.go.orig	1979-11-29 23:00:00 UTC
++++ internal/impl/redis/client.go
+@@ -21,7 +21,7 @@ Some cloud hosted instances of Redis (such as Azure Ca
+ 	return []*service.ConfigField{
+ 		service.NewURLField("url").
+ 			Description("The URL of the target Redis server. Database is optional and is supplied as the URL path.").
+-			Example("redis://:6397").
++			Example("redis://:6379").
+ 			Example("redis://localhost:6379").
+ 			Example("redis://foousername:foopassword@redisplace:6379").
+ 			Example("redis://:foopassword@redisplace:6379").
diff --git a/net/redpanda-connect/files/redpanda_connect.in b/net/redpanda-connect/files/redpanda_connect.in
new file mode 100644
index 000000000000..01c722f80385
--- /dev/null
+++ b/net/redpanda-connect/files/redpanda_connect.in
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# PROVIDE: redpanda_connect
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to run NATS:
+#
+# redpanda_connect_enable (bool):	Set it to "YES" to enable redpanda_connect.
+#					Default is "NO".
+# redpanda_connect_user:		User name to run as. default "benthos"
+# redpanda_connect_group:		Group name to run as. default "benthos"
+# redpanda_connect_resources:		Path to redpanda_connect resources files (glob).
+# redpanda_connect_config:		Path to redpanda_connect configuration file.
+# redpanda_connect_watcher (bool):	Set it to "YES" to enable redpanda_connect watcher mode.
+#					Default is "NO".
+# redpanda_connect_options:		Options to pass redpanda_connect
+# 					(e.g. 'streams' for streams mode).
+#
+
+. /etc/rc.subr
+
+name=redpanda_connect
+rcvar=`set_rcvar`
+
+load_rc_config ${name}
+
+: ${redpanda_connect_enable:=NO}
+: ${redpanda_connect_user:=benthos}
+: ${redpanda_connect_group:=benthos}
+: ${redpanda_connect_resources:=""}
+: ${redpanda_connect_config:="%%PREFIX%%/etc/redpanda-connect/config.yaml"}
+: ${redpanda_connect_watcher:=NO}
+: ${redpanda_connect_options=""}
+
+if [ -n "${redpanda_connect_resources}" ]; then
+    redpanda_connect_options="--resources '${redpanda_connect_resources}' ${redpanda_connect_options}"
+fi
+
+if [ -n "${redpanda_connect_config}" ]; then
+    redpanda_connect_options="--config ${redpanda_connect_config} ${redpanda_connect_options}"
+fi
+
+if checkyesno redpanda_connect_watcher; then
+    redpanda_connect_options="--watcher ${redpanda_connect_options}"
+fi
+
+start_precmd=redpanda_connect_start_precmd
+
+pidfile="/var/run/${name}.pid"
+procname=%%PREFIX%%/bin/redpanda-connect
+command=/usr/sbin/daemon
+command_args="-p ${pidfile} ${procname} ${redpanda_connect_options}"
+
+redpanda_connect_start_precmd()
+{
+    install -o ${redpanda_connect_user} -g ${redpanda_connect_group} /dev/null ${pidfile}
+}
+
+run_rc_command "$1"
diff --git a/net/redpanda-connect/files/remove-enterprise-connectors.patch b/net/redpanda-connect/files/remove-enterprise-connectors.patch
new file mode 100644
index 000000000000..6444fec482e9
--- /dev/null
+++ b/net/redpanda-connect/files/remove-enterprise-connectors.patch
@@ -0,0 +1,11 @@
+--- public/components/all/package.go.orig
++++ public/components/all/package.go
+@@ -45,8 +45,6 @@
+ 	_ "github.com/redpanda-data/connect/v4/public/components/redis"
+ 	_ "github.com/redpanda-data/connect/v4/public/components/sentry"
+ 	_ "github.com/redpanda-data/connect/v4/public/components/sftp"
+-	_ "github.com/redpanda-data/connect/v4/public/components/snowflake"
+-	_ "github.com/redpanda-data/connect/v4/public/components/splunk"
+ 	_ "github.com/redpanda-data/connect/v4/public/components/sql"
+ 	_ "github.com/redpanda-data/connect/v4/public/components/statsd"
+ 	_ "github.com/redpanda-data/connect/v4/public/components/twitter"
diff --git a/net/redpanda-connect/pkg-descr b/net/redpanda-connect/pkg-descr
new file mode 100644
index 000000000000..86daee43e3da
--- /dev/null
+++ b/net/redpanda-connect/pkg-descr
@@ -0,0 +1,24 @@
+Redpanda Connect (formerly Benthos) solves common data engineering
+tasks such as transformations, integrations, and multiplexing with
+declarative and unit-testable configuration. This allows you to
+easily and incrementally adapt your data pipelines as requirements
+change, letting you focus on the more exciting stuff.
+
+It comes armed with a wide range of processors, a lit mapping
+language, stateless windowed processing capabilities, and an
+industry-leading mascot.
+
+Redpanda Connect is able to glue a wide range of sources and sinks
+together and hook into a variety of databases, caches, HTTP APIs,
+lambdas, and more, enabling you to seamlessly drop it into your
+existing infrastructure.
+
+Working with disparate APIs and services can be a daunting task,
+doubly so in a streaming data context. With Redpanda Connect, it's
+possible to break these tasks down and automatically parallelize
+them as a streaming workflow.
+
+* LICENSING NOTICE *
+
+This port provides an ENTERPRISE option to include the "snowflake"
+and "splunk" connectors, which require an Enterprise license.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406041308.454D8JuB065939>