Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Dec 2019 10:50:04 +0000 (UTC)
From:      Luca Pizzamiglio <pizzamig@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r519658 - in head/sysutils: . minipot minipot/files
Message-ID:  <201912101050.xBAAo4U3069125@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pizzamig
Date: Tue Dec 10 10:50:04 2019
New Revision: 519658
URL: https://svnweb.freebsd.org/changeset/ports/519658

Log:
  sysutils/minipot: new port, to run a single node service mash
  
  A single node service mesh based on jails, using the pot framework.
  Based on consul, nomad, traefik
  
  Sponsored by:	trivago N.V.

Added:
  head/sysutils/minipot/
  head/sysutils/minipot/Makefile   (contents, props changed)
  head/sysutils/minipot/distinfo   (contents, props changed)
  head/sysutils/minipot/files/
  head/sysutils/minipot/files/pkg-install.in   (contents, props changed)
  head/sysutils/minipot/pkg-descr   (contents, props changed)
  head/sysutils/minipot/pkg-plist   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Tue Dec 10 10:33:26 2019	(r519657)
+++ head/sysutils/Makefile	Tue Dec 10 10:50:04 2019	(r519658)
@@ -678,6 +678,7 @@
     SUBDIR += mgeupsd
     SUBDIR += minikube
     SUBDIR += minimunin
+    SUBDIR += minipot
     SUBDIR += minipro
     SUBDIR += minirsyslogd
     SUBDIR += mixer

Added: head/sysutils/minipot/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/minipot/Makefile	Tue Dec 10 10:50:04 2019	(r519658)
@@ -0,0 +1,57 @@
+# $FreeBSD$
+
+PORTNAME=	minipot
+PORTVERSION=	0.1.0
+CATEGORIES=	sysutils
+
+MAINTAINER=	pizzamig@FreeBSD.org
+COMMENT=	Mono-server installation of pot, nomad and consul
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	pot:sysutils/pot \
+	nomad:sysutils/nomad \
+	${LOCALBASE}/libexec/nomad/plugins/nomad-pot-driver:sysutils/nomad-pot-driver \
+	consul:sysutils/consul \
+	traefik:net/traefik
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	pizzamig
+NO_BUILD=	yes
+NO_ARCH=	yes
+
+OPTIONS_DEFINE=	EXAMPLES
+
+PORTEXAMPLES=	*
+
+do-install:
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/consul.d
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/nomad
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/syslog.d
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/newsyslog.conf.d
+	${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/cron.d
+
+	${INSTALL_DATA} ${WRKSRC}/etc/consul.d/minipot-agent.json \
+		${STAGEDIR}${LOCALBASE}/etc/consul.d/minipot-agent.json
+	${INSTALL_DATA} ${WRKSRC}/etc/nomad/minipot-server.hcl.sample \
+		${STAGEDIR}${LOCALBASE}/etc/nomad/minipot-server.hcl.sample
+	${INSTALL_DATA} ${WRKSRC}/etc/minipot-traefik.toml.sample \
+		${STAGEDIR}${LOCALBASE}/etc/minipot-traefik.toml.sample
+	${INSTALL_DATA} ${WRKSRC}/etc/syslog.d/*.conf \
+		${STAGEDIR}${LOCALBASE}/etc/syslog.d
+	${INSTALL_DATA} ${WRKSRC}/etc/newsyslog.conf.d/*.conf \
+		${STAGEDIR}${LOCALBASE}/etc/newsyslog.conf.d
+	${INSTALL_DATA} ${WRKSRC}/etc/cron.d/* \
+		${STAGEDIR}${LOCALBASE}/etc/cron.d
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/minipot-init \
+		${STAGEDIR}${LOCALBASE}/bin/minipot-init
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/minipot-start \
+		${STAGEDIR}${LOCALBASE}/bin/minipot-start
+
+post-install-EXAMPLES-on:
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/share/examples/${PORTNAME}/* \
+		${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>

Added: head/sysutils/minipot/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/minipot/distinfo	Tue Dec 10 10:50:04 2019	(r519658)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1575974330
+SHA256 (pizzamig-minipot-0.1.0_GH0.tar.gz) = b7f97df7fdf20b2a4ec72166bd73c136febf93b21db02607d5cfee18f0a42685
+SIZE (pizzamig-minipot-0.1.0_GH0.tar.gz) = 5240

Added: head/sysutils/minipot/files/pkg-install.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/minipot/files/pkg-install.in	Tue Dec 10 10:50:04 2019	(r519658)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+case $2 in
+	PRE-INSTALL)
+		if [ -r %%PREFIX%%/etc/nomad/server.hcl ]; then
+			cp %%PREFIX%%/etc/nomad/server.hcl %%PREFIX%%/etc/nomad/server.hcl.bkp
+		fi
+		if [ -r %%PREFIX%%/etc/consul.d/agent.json ]; then
+			cp %%PREFIX%%/etc/consul.d/agent.json %%PREFIX%%/etc/consul.d/agent.json.bkp
+		fi
+		if [ -r %%PREFIX%%/etc/traefik.toml ]; then
+			cp %%PREFIX%%/etc/traefik.toml %%PREFIX%%/etc/traefik.toml.bkp
+		fi
+		;;
+esac
+

Added: head/sysutils/minipot/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/minipot/pkg-descr	Tue Dec 10 10:50:04 2019	(r519658)
@@ -0,0 +1,4 @@
+Minipot is a set of configuration files and dependency that makes easy
+to run a single-noe nomad-pot cluster in a VM or on your laptop.
+
+WWW: https://github.com/pizzamig/minipot

Added: head/sysutils/minipot/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/minipot/pkg-plist	Tue Dec 10 10:50:04 2019	(r519658)
@@ -0,0 +1,11 @@
+bin/minipot-init
+bin/minipot-start
+etc/consul.d/minipot-agent.json
+etc/cron.d/pot-prune
+etc/newsyslog.conf.d/consul.conf
+etc/newsyslog.conf.d/nomad.conf
+etc/newsyslog.conf.d/traefik.conf
+@sample etc/nomad/minipot-server.hcl.sample
+etc/syslog.d/consul.conf
+etc/syslog.d/nomad.conf
+@sample etc/minipot-traefik.toml.sample



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