[arch-commits] Commit in (10 files)

Tim Meusel bastelfreak at archlinux.org
Mon Feb 8 09:02:20 UTC 2021


    Date: Monday, February 8, 2021 @ 09:02:20
  Author: bastelfreak
Revision: 848822

import choria 0.20.2-2

Added:
  choria-io/
  choria-io/repos/
  choria-io/trunk/
  choria-io/trunk/PKGBUILD
  choria-io/trunk/broker.conf
  choria-io/trunk/choria
  choria-io/trunk/choria-broker.service
  choria-io/trunk/choria-server
  choria-io/trunk/choria-server.service
  choria-io/trunk/server.conf

-----------------------+
 PKGBUILD              |   75 ++++++++++++++++++++++++++++++++++++++++++++++++
 broker.conf           |   72 ++++++++++++++++++++++++++++++++++++++++++++++
 choria                |    9 +++++
 choria-broker.service |   14 ++++++++
 choria-server         |    6 +++
 choria-server.service |   15 +++++++++
 server.conf           |   14 ++++++++
 7 files changed, 205 insertions(+)

Added: choria-io/trunk/PKGBUILD
===================================================================
--- choria-io/trunk/PKGBUILD	                        (rev 0)
+++ choria-io/trunk/PKGBUILD	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,75 @@
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+
+pkgname=choria-io
+pkgver=0.20.2
+pkgrel=2
+pkgdesc='Go based server to host Choria agents, networks, federations and discovery'
+arch=('x86_64')
+url='https://choria.io'
+license=('Apache')
+depends=('glibc' 'logrotate' 'puppet>=6.0.0' 'facter')
+makedepends=('go')
+checkdepends=('ruby')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/choria-io/go-choria/archive/v${pkgver}.tar.gz"
+        'choria-broker.service'
+        'choria-server.service'
+        'choria-server'
+        'server.conf'
+        'broker.conf'
+        'choria')
+backup=('etc/default/choria-server' 'etc/choria/server.conf' 'etc/choria/broker.conf')
+sha512sums=('4e5fb0dab21e7031f90a4377f245b277acd78ac3155a595b6c37b696b4b8c468136b057b6d5cc83eb091353624f1eb7b4af00c473edfc1f0969bd058bfc93fd9'
+            '78337d1cd28aa5f6206f85b0a5998c96a974e148149498183057f7e2d9b5adbe9ebe37ceb3add117d4229ca84312fd870ea541512dd29e57dade81f10efe3583'
+            '7d889360b06fdd5e297cb781e898c8f3e87b17b3c7a33f952edd40a35f215032abfdee52e458b8f47678c06ff674e339d99c79fa435d3dd4841c96f28226a9ec'
+            'fa1dbba2353051d9f9c6cd5f6ac8ef9daa179b87a6f12fd476e34a51d17568dfce5f35e92868b7eb277e6f6f114484816062e70cf1219a2ddedd3362d46aa6e2'
+            'fee8f5ce202400d3fe29b7d83df50c59c7a378d41c752356ba27e9a442c39e332f98e4d0316cf67f3994c1b099b88fc76b9c1f41a1415bc072861fe3b740c8af'
+            '29574a94301961abda5140aeec1e97042285b5af027822e55f39be332111a68d2d1054c965d394d9f30a25bc94439f481c9f4e83b977b1c278a5aa7ae5d50416'
+            'c28b500df5728d6880a49d4e02b400f7408fe49ff1ae8372e49ad7e741254feddc3e28815a5922a49522f77978d2d4f85e283721580e4495b5367996d6e7bce9')
+export CGO_LDFLAGS="${LDFLAGS}"
+export CGO_CFLAGS="${CFLAGS}"
+export CGO_CPPFLAGS="${CPPFLAGS}"
+export CGO_CXXFLAGS="${CXXFLAGS}"
+# we cannot add `-mod=readonly` to GOFLAGS because that would break `go generate`
+export GOFLAGS="-buildmode=pie -trimpath"
+export GOOS='linux'
+export GOARCH='amd64'
+export XC_OSARCH='linux/amd64'
+
+prepare() {
+  cd "${srcdir}/go-choria-${pkgver}"
+  mkdir binary
+}
+build() {
+  cd "${srcdir}/go-choria-${pkgver}"
+
+  go generate -v
+
+  go build -o "binary/${pkgname}-${pkgver}" -ldflags "-X 'github.com/choria-io/go-choria/build.Version=${pkgver}' -X 'github.com/choria-io/go-choria/build.SHA=aa7901a99dd91cd247fdf07fe2d09e6961b5fed5' -X 'github.com/choria-io/go-choria/build.BuildDate=$(date '+%F %T %z')' -X 'github.com/choria-io/go-choria/build.ProvisionJWTFile=/etc/choria/provisioning.jwt'"
+}
+
+check() {
+  cd "${srcdir}/go-choria-${pkgver}"
+
+  # TLS certificate name referenced in the tests
+  # https://github.com/choria-io/go-choria/blob/aa7901a99dd91cd247fdf07fe2d09e6961b5fed5/Rakefile#L3
+  export MCOLLECTIVE_CERTNAME='rip.mcollective'
+
+  # advise GO to not require SAN certificates. choria has built-in certs as test fixtures. They don'y contain a SAN yet
+  # because upstream choria builts on go 1.14 and also supports legacy puppet envs without SAN certs
+  # https://golang.org/doc/go1.15#commonname
+  export GODEBUG='x509ignoreCN=0'
+  go test -v -p $(nproc) -parallel $(nproc) './...'
+}
+
+package() {
+  cd "${srcdir}/go-choria-${pkgver}"
+  install -Dm755 "binary/${pkgname}-${pkgver}" "${pkgdir}/usr/bin/choria"
+  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+  install -Dm644 README.md CHANGELOG.md CONFIGURATION.md NOTICE -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm644 "${srcdir}/choria-server.service" "${srcdir}/choria-broker.service" -t "${pkgdir}/usr/lib/systemd/system/"
+  install -Dm644 "${srcdir}/choria-server" -t "${pkgdir}/etc/default/"
+  install -Dm644 "${srcdir}/choria" -t "${pkgdir}/etc/logrotate.d/"
+  install -Dm640 "${srcdir}/broker.conf" "${srcdir}/server.conf" -t "${pkgdir}/etc/choria/"
+}
+
+# vim:set ts=2 sw=2 et:

Added: choria-io/trunk/broker.conf
===================================================================
--- choria-io/trunk/broker.conf	                        (rev 0)
+++ choria-io/trunk/broker.conf	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,72 @@
+logfile = /var/log/choria.log
+loglevel = info
+
+# For full configuration details please consult https://choria.io/docs
+
+# The Choria broker can host your middleware, federation brokers and protocol adapters
+# all in one binary or even one process.
+#
+# You can enable all the below features and run just one `choria broker` instance to
+# use them all.  For federation and Adapters you can scale horizontally across nodes
+# and the network broker supports clustering as below
+#
+# At least 1 feature has to be enabled else it will exit.
+
+
+# setting up a 3 node choria broker cluster.
+#
+# ports:
+#   all your clients and nodes connect to 4222
+#   the broker cluster is on 5222
+#   monitoring is on 8222
+#
+# required:
+#
+# plugin.choria.broker_network = true
+# plugin.choria.network.peers = nats://choria1:5222, nats://choria2:5222, nats://choria3:5222
+#
+# optional:
+#
+# plugin.choria.network.client_port = 4222
+# plugin.choria.network.peer_port = 5222
+# plugin.choria.network.monitor_port = 8222
+# plugin.choria.network.peer_user = choria_cluster
+# plugin.choria.network.peer_password = s£cret
+
+plugin.choria.broker_network = false
+
+# setting up a federation broker
+#
+# for full details see http://choria.io/docs/federation/
+#
+# plugin.choria.broker_federation = true
+# plugin.choria.federation.cluster = development
+# plugin.choria.federation.instance = 1 @ dev8.devco.net
+# plugin.choria.srv_domain = dev.devco.net
+
+plugin.choria.broker_federation = false
+
+# Setting up a protocol adapter to publish registration messages to NATS Streaming
+#
+# Here a listener is setup on the collective and received all messages from the
+# discovery subsystem and republish them to NATS Streaming.  This creates a log
+# like Kafka from where you can consume the stream of data, go back in time,
+# etc using your own client code to build whatever integration you want
+#
+# plugin.choria.adapters = cmdb
+#
+# here is the Collective side that receives the messages:
+#
+#   plugin.choria.adapter.cmdb.ingest.topic = mcollective.broadcast.agent.discovery
+#   plugin.choria.adapter.cmdb.ingest.protocol = request # or reply
+#   plugin.choria.adapter.cmdb.ingest.workers = 10 # default
+#
+# This is the side that rewrites to the stream, messages are published as
+# JSON to a topic my.cmdb, payload has body, sender and time.  Body is
+# Base64 encoded
+#
+#   plugin.choria.adapter.cmdb.type = nats_stream
+#   plugin.choria.adapter.cmdb.stream.servers = stan1:4222,stan2:4222
+#   plugin.choria.adapter.cmdb.stream.clusterid = prod
+#   plugin.choria.adapter.cmdb.stream.topic = my.cmdb
+#   plugin.choria.adapter.cmdb.stream.workers = 10 # default

Added: choria-io/trunk/choria
===================================================================
--- choria-io/trunk/choria	                        (rev 0)
+++ choria-io/trunk/choria	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,9 @@
+/var/log/choria-*.log
+/var/log/choria.log
+{
+  daily
+  copytruncate
+  notifempty
+  missingok
+  rotate 10
+}

Added: choria-io/trunk/choria-broker.service
===================================================================
--- choria-io/trunk/choria-broker.service	                        (rev 0)
+++ choria-io/trunk/choria-broker.service	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Choria Orchestrator Network Broker
+After=network.target
+
+[Service]
+StandardOutput=syslog
+StandardError=syslog
+LimitNOFILE=51200
+User=root
+Group=root
+ExecStart=/usr/bin/choria broker --config=/etc/choria/broker.conf
+
+[Install]
+WantedBy=multi-user.target

Added: choria-io/trunk/choria-server
===================================================================
--- choria-io/trunk/choria-server	                        (rev 0)
+++ choria-io/trunk/choria-server	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,6 @@
+# These are additional flags to pass to the choria server invocation
+EXTRA_OPTS=""
+
+# This is a prefix command to invoke the server, use this is perhaps you want
+# to run choria in a namespace and wish to invoke nsenter or ip netns exec
+COMMAND_PREFIX=""

Added: choria-io/trunk/choria-server.service
===================================================================
--- choria-io/trunk/choria-server.service	                        (rev 0)
+++ choria-io/trunk/choria-server.service	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,15 @@
+[Unit]
+Description=The Choria Orchestrator Server
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/default/choria-server
+StandardOutput=syslog
+StandardError=syslog
+User=root
+Group=root
+ExecStart=/bin/sh -c "${COMMAND_PREFIX} /usr/bin/choria server --config=/etc/choria/server.conf"
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target

Added: choria-io/trunk/server.conf
===================================================================
--- choria-io/trunk/server.conf	                        (rev 0)
+++ choria-io/trunk/server.conf	2021-02-08 09:02:20 UTC (rev 848822)
@@ -0,0 +1,14 @@
+classesfile = /opt/puppetlabs/puppet/cache/state/classes.txt
+collectives = mcollective
+logfile = /var/log/choria.log
+loglevel = info
+plugin.choria.agent_provider.mcorpc.agent_shim = /usr/bin/choria_mcollective_agent_compat.rb
+plugin.choria.agent_provider.mcorpc.config = /etc/puppetlabs/mcollective/choria-shim.cfg
+plugin.choria.agent_provider.mcorpc.libdir = /opt/puppetlabs/mcollective/plugins
+plugin.choria.machine.store = /etc/choria/machine
+plugin.choria.status_file_path = /var/log/choria-status.json
+plugin.choria.status_update_interval = 30
+plugin.rpcaudit.logfile = /var/log/choria-audit.log
+plugin.scout.overrides = /etc/choria/overrides.json
+plugin.yaml = /etc/puppetlabs/mcollective/generated-facts.yaml
+rpcaudit = 1


More information about the arch-commits mailing list