Skip to content

Commit

Permalink
databases/percona-orchestrator: new port!
Browse files Browse the repository at this point in the history
Orchestrator is a replication topology manager for MySQL.

Features include:

* The topology and status of the replication tree is automatically detected
  and monitored.
* Either a GUI, CLI or API can be used to check the status and perform
  operations.
* Supports automatic failover of the master, and the replication tree can
  be fixed when servers in the tree fail - either manually or automatically.
* It is not dependent on any specific version or flavor of MySQL (MySQL,
  Percona Server, MariaDB or even MaxScale binlog servers).
* Orchestrator supports many different types of topologies, from a single
  master -> slave  to complex multi-layered replication trees consisting of
  hundreds of servers.
* Orchestrator can make topology changes and will do so based on the state
  at that moment; it does not require a configuration to be defined with what
  corresponds to the database topology.
* The GUI is not only there to report the status - one of the cooler things
  you can do is change replication just by doing a drag and drop in the web
  interface (of course you can do this and much more through the CLI and API
  as well).
  • Loading branch information
zi0r committed Apr 5, 2024
1 parent 571758f commit 7a832ca
Show file tree
Hide file tree
Showing 10 changed files with 428 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GIDs
Expand Up @@ -273,8 +273,8 @@ certspotter:*:329:
orthanc:*:330:
svxlink:*:331:
keycloak:*:332:
# free: 333
honeytrap:*:333:
percona:*:334:
# free: 335
# free: 336
daapd:*:337:
Expand Down
2 changes: 1 addition & 1 deletion UIDs
Expand Up @@ -279,7 +279,7 @@ orthanc:*:330:330::0:0:Orthanc Daemon:/nonexistent:/usr/sbin/nologin
svxlink:*:331:331::0:0:svxlink server:/nonexistent:/usr/sbin/nologin
keycloak:*:332:332::0:0:keycloak server:/nonexistent:/usr/sbin/nologin
honeytrap:*:333:333::0:0:HoneyTrap Daemon:/nonexistent:/usr/sbin/nologin
# free: 334
percona:*:334:334::0:0:Percona Daemons:/nonexistent:/usr/sbin/nologin
# free: 335
_pma:*:336:80::0:0:phpMyAdmin Owner:/nonexistent:/usr/sbin/nologin
daapd:*:337:337::0:0:daapd User:/nonexistent:/usr/sbin/nologin
Expand Down
1 change: 1 addition & 0 deletions databases/Makefile
Expand Up @@ -532,6 +532,7 @@
SUBDIR += pecl-mongodb
SUBDIR += pecl-redis
SUBDIR += pecl-rrd
SUBDIR += percona-orchestrator
SUBDIR += percona-toolkit
SUBDIR += pg-gvm
SUBDIR += pg.el
Expand Down
99 changes: 99 additions & 0 deletions databases/percona-orchestrator/Makefile
@@ -0,0 +1,99 @@
PORTNAME= orchestrator
DISTVERSIONPREFIX= v
DISTVERSION= 3.2.6-12
CATEGORIES= databases
PKGNAMEPREFIX= percona-

MAINTAINER= zi@FreeBSD.org
COMMENT= Replication topology manager for MySQL
WWW= https://github.com/percona/orchestrator

LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE

RUN_DEPENDS= bash>0:shells/bash \
gsed>0:textproc/gsed \
jq>0:textproc/jq

USES= go mysql:server shebangfix

USERS= percona
GROUPS= percona

USE_GITHUB= yes
GH_ACCOUNT= percona
USE_RC_SUBR= ${PKGNAMEPREFIX}${PORTNAME}
SUB_FILES= pkg-message
SHEBANG_FILES= resources/bin/orchestrator-client

GO_PKGNAME= github.com/openark/${PORTNAME}
GO_TARGET= ./go/cmd/${PORTNAME}
GO_BUILDFLAGS= -ldflags '-X main.AppVersion=${DISTVERSION} -X main.BuildDescribe=${DISTVERSION}'

GH_TUPLE= \
Showmax:go-fqdn:v1.0.0:showmax_go_fqdn/vendor/github.com/Showmax/go-fqdn \
armon:consul-api:eb2c6b5be1b6:armon_consul_api/vendor/github.com/armon/consul-api \
armon:go-metrics:f0300d1749da:armon_go_metrics/vendor/github.com/armon/go-metrics \
codegangsta:inject:33e0aa1cb7c0:codegangsta_inject/vendor/github.com/codegangsta/inject \
cyberdelia:go-metrics-graphite:39f87cc3b432:cyberdelia_go_metrics_graphite/vendor/github.com/cyberdelia/go-metrics-graphite \
fatih:color:v1.10.0:fatih_color/vendor/github.com/fatih/color \
go-gcfg:gcfg:v1.2.3:go_gcfg_gcfg/vendor/gopkg.in/gcfg.v1 \
go-martini:martini:22fa46961aab:go_martini_martini/vendor/github.com/go-martini/martini \
go-sql-driver:mysql:v1.7.1:go_sql_driver_mysql/vendor/github.com/go-sql-driver/mysql \
go-warnings:warnings:v0.1.2:go_warnings_warnings/vendor/gopkg.in/warnings.v0 \
golang:crypto:630584e8d5aa:golang_crypto/vendor/golang.org/x/crypto \
golang:net:bea034e7d591:golang_net/vendor/golang.org/x/net \
golang:sys:3c1f35247d10:golang_sys/vendor/golang.org/x/sys \
golang:term:03fcf44c2211:golang_term/vendor/golang.org/x/term \
golang:text:v0.3.8:golang_text/vendor/golang.org/x/text \
google:btree:v1.0.0:google_btree/vendor/github.com/google/btree \
hashicorp:consul:v1.7.0:hashicorp_consul_api/vendor/github.com/hashicorp/consul \
hashicorp:go-cleanhttp:d3fcbee8e181:hashicorp_go_cleanhttp/vendor/github.com/hashicorp/go-cleanhttp \
hashicorp:go-hclog:59fbd7b93270:hashicorp_go_hclog/vendor/github.com/hashicorp/go-hclog \
hashicorp:go-immutable-radix:v1.3.0:hashicorp_go_immutable_radix/vendor/github.com/hashicorp/go-immutable-radix \
hashicorp:go-msgpack:v0.5.3:hashicorp_go_msgpack/vendor/github.com/hashicorp/go-msgpack \
hashicorp:go-rootcerts:c8a9a31cbd76:hashicorp_go_rootcerts/vendor/github.com/hashicorp/go-rootcerts \
hashicorp:go-sockaddr:v1.0.2:hashicorp_go_sockaddr/vendor/github.com/hashicorp/go-sockaddr \
hashicorp:go-uuid:v1.0.2:hashicorp_go_uuid/vendor/github.com/hashicorp/go-uuid \
hashicorp:golang-lru:v0.5.4:hashicorp_golang_lru/vendor/github.com/hashicorp/golang-lru \
hashicorp:serf:v0.9.5:hashicorp_serf/vendor/github.com/hashicorp/serf \
howeyc:gopass:7cb4b85ec19c:howeyc_gopass/vendor/github.com/howeyc/gopass \
martini-contrib:auth:fa62c19b7ae8:martini_contrib_auth/vendor/github.com/martini-contrib/auth \
martini-contrib:gzip:6c035326b43f:martini_contrib_gzip/vendor/github.com/martini-contrib/gzip \
martini-contrib:render:ec18f8345a11:martini_contrib_render/vendor/github.com/martini-contrib/render \
mattn:go-colorable:v0.1.8:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
mattn:go-isatty:cb30d6282491:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
mattn:go-sqlite3:v1.14.7:mattn_go_sqlite3/vendor/github.com/mattn/go-sqlite3 \
miekg:dns:v1.1.31:miekg_dns/vendor/github.com/miekg/dns \
mitchellh:go-homedir:v1.1.0:mitchellh_go_homedir/vendor/github.com/mitchellh/go-homedir \
mitchellh:go-testing-interface:v1.14.0:mitchellh_go_testing_interface/vendor/github.com/mitchellh/go-testing-interface \
mitchellh:mapstructure:v1.3.3:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
montanaflynn:stats:f8cd06f93c6c:montanaflynn_stats/vendor/github.com/montanaflynn/stats \
openark:golib:827f3ea62180:openark_golib \
openark:raft:fba9f909f7fe:openark_raft/vendor/github.com/hashicorp/raft \
outbrain:golib:2531e5dbcc71:outbrain_golib/vendor/github.com/outbrain/golib \
oxtoacart:bpool:03653db5a59c:oxtoacart_bpool/vendor/github.com/oxtoacart/bpool \
patrickmn:go-cache:v2.1.0:patrickmn_go_cache/vendor/github.com/patrickmn/go-cache \
rcrowley:go-metrics:cf1acfcdf475:rcrowley_go_metrics/vendor/github.com/rcrowley/go-metrics \
samuel:go-zookeeper:7117e9ea2414:samuel_go_zookeeper/vendor/github.com/samuel/go-zookeeper \
sjmudd:stopwatch:637ef30077b7:sjmudd_stopwatch/vendor/github.com/sjmudd/stopwatch \
stretchr:testify:v1.6.1:stretchr_testify/vendor/github.com/stretchr/testify

post-extract:
@${RLN} ${WRKSRC_openark_golib} ${WRKSRC}/go/golib

post-patch:
@${REINPLACE_CMD} -e 's|"resources|"${DATADIR}|g' ${WRKSRC}/go/app/http.go

do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/resources/bin/orchestrator-client ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin

post-install:
@${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${DATADIR}
@(cd ${WRKSRC}/resources/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
${INSTALL_DATA} ${WRKSRC}/conf/orchestrator-simple.conf.json \
${STAGEDIR}${ETCDIR}/orchestrator.conf.sample

.include <bsd.port.mk>
97 changes: 97 additions & 0 deletions databases/percona-orchestrator/distinfo
@@ -0,0 +1,97 @@
TIMESTAMP = 1712256381
SHA256 (percona-orchestrator-v3.2.6-12_GH0.tar.gz) = 6ea9d25494f66fd67b18c71e155bc810ee13ea499617ffe2ec5e3caf17197d93
SIZE (percona-orchestrator-v3.2.6-12_GH0.tar.gz) = 7913143
SHA256 (Showmax-go-fqdn-v1.0.0_GH0.tar.gz) = 99c53987211042ccd088193792c458e2c4abd2377b599ada4cfb6188752dec99
SIZE (Showmax-go-fqdn-v1.0.0_GH0.tar.gz) = 7305
SHA256 (armon-consul-api-eb2c6b5be1b6_GH0.tar.gz) = c4707c2cf495f918b229991c818fe59acd28259d7e2d738551312eb5c4347c39
SIZE (armon-consul-api-eb2c6b5be1b6_GH0.tar.gz) = 17989
SHA256 (armon-go-metrics-f0300d1749da_GH0.tar.gz) = 27ff0a7294f6c031e5ec6c52cc5664ea2bec19c18a09b4d01ec2aa17587e90e8
SIZE (armon-go-metrics-f0300d1749da_GH0.tar.gz) = 23852
SHA256 (codegangsta-inject-33e0aa1cb7c0_GH0.tar.gz) = 7626f355fd6782529c24b2538c12e0d612bff6e4298e055158d692961c9f83ae
SIZE (codegangsta-inject-33e0aa1cb7c0_GH0.tar.gz) = 5061
SHA256 (cyberdelia-go-metrics-graphite-39f87cc3b432_GH0.tar.gz) = 702a9c872e66b4797c682cc7d455c2bde25ee8032ee9f68afb88a36d8901e2e0
SIZE (cyberdelia-go-metrics-graphite-39f87cc3b432_GH0.tar.gz) = 3915
SHA256 (fatih-color-v1.10.0_GH0.tar.gz) = a00342a7ffb8b119346dce56e152a111cbb9eab3970c429cc2ed4272aec2858e
SIZE (fatih-color-v1.10.0_GH0.tar.gz) = 1267532
SHA256 (go-gcfg-gcfg-v1.2.3_GH0.tar.gz) = 3d60ba7a07e7d7d831a756f565c7fdc75895f294b2b69185674bb0ed70622645
SIZE (go-gcfg-gcfg-v1.2.3_GH0.tar.gz) = 29146
SHA256 (go-martini-martini-22fa46961aab_GH0.tar.gz) = 182c7c6237f9165adcde05bcbdab6ad493deb57cabd0c587d0f4c07e1aaca334
SIZE (go-martini-martini-22fa46961aab_GH0.tar.gz) = 66070
SHA256 (go-sql-driver-mysql-v1.7.1_GH0.tar.gz) = c6aaf1309cbeabdc43414a1230257b8943800643c581a3e2211d1efd5495a9c2
SIZE (go-sql-driver-mysql-v1.7.1_GH0.tar.gz) = 95747
SHA256 (go-warnings-warnings-v0.1.2_GH0.tar.gz) = 4712c4ceae321433d8c1d9ebc6afd154d7932c849129ded48b1c4a51c21275e8
SIZE (go-warnings-warnings-v0.1.2_GH0.tar.gz) = 3769
SHA256 (golang-crypto-630584e8d5aa_GH0.tar.gz) = 8e3a597010e5de9b02f1feae066510c52dd8de2b12069c24cff5424df833540b
SIZE (golang-crypto-630584e8d5aa_GH0.tar.gz) = 1631349
SHA256 (golang-net-bea034e7d591_GH0.tar.gz) = 72533b014a9e4185f38e84b82b52c9aaee212afcce7acddbcf7806647f749688
SIZE (golang-net-bea034e7d591_GH0.tar.gz) = 1226414
SHA256 (golang-sys-3c1f35247d10_GH0.tar.gz) = 27fdc75cc74da979f59142f1f5a1f08505c55918a0d5019ed4ebb04901834842
SIZE (golang-sys-3c1f35247d10_GH0.tar.gz) = 1336787
SHA256 (golang-term-03fcf44c2211_GH0.tar.gz) = 1919967c8fbf15de9261a2315d90072357524ee557d7df106b426def02a8e5f3
SIZE (golang-term-03fcf44c2211_GH0.tar.gz) = 14972
SHA256 (golang-text-v0.3.8_GH0.tar.gz) = f4f6c558d3b5530adbfc1e6787f82867801f86d9c7afc37f2ca03d630465a388
SIZE (golang-text-v0.3.8_GH0.tar.gz) = 8358801
SHA256 (google-btree-v1.0.0_GH0.tar.gz) = 9f53e0e1330a4dbe92100d516606791f7196bf828ba93d693ef4d5c1cbd5fe30
SIZE (google-btree-v1.0.0_GH0.tar.gz) = 15292
SHA256 (hashicorp-consul-v1.7.0_GH0.tar.gz) = 457162a2d5babe1f560c8e169528020d0c80e1fe5becc25fe286c4bf91f73bfb
SIZE (hashicorp-consul-v1.7.0_GH0.tar.gz) = 22791557
SHA256 (hashicorp-go-cleanhttp-d3fcbee8e181_GH0.tar.gz) = adc5cf3ec45757d574fab2aa1e744224b4963ed645a5444ce88f68f91d31a87a
SIZE (hashicorp-go-cleanhttp-d3fcbee8e181_GH0.tar.gz) = 8063
SHA256 (hashicorp-go-hclog-59fbd7b93270_GH0.tar.gz) = c81b79edb44e015054494655b0551b8657bd7eb0eb4f633bca2ce70fc276641d
SIZE (hashicorp-go-hclog-59fbd7b93270_GH0.tar.gz) = 26159
SHA256 (hashicorp-go-immutable-radix-v1.3.0_GH0.tar.gz) = 6072cfc76f23e45aee0a2a0d0a168d2005fdb15817ab4a23e52df40eb12cda38
SIZE (hashicorp-go-immutable-radix-v1.3.0_GH0.tar.gz) = 25023
SHA256 (hashicorp-go-msgpack-v0.5.3_GH0.tar.gz) = 6273c6c7c22d87d8bdbb08e50eb6cdcd1b6da79b577995c9fe70926b73b25938
SIZE (hashicorp-go-msgpack-v0.5.3_GH0.tar.gz) = 49675
SHA256 (hashicorp-go-rootcerts-c8a9a31cbd76_GH0.tar.gz) = 85cfbbb6e2570c4aae35a992f660bd8b5c728718202d040708d344e093077ae7
SIZE (hashicorp-go-rootcerts-c8a9a31cbd76_GH0.tar.gz) = 12247
SHA256 (hashicorp-go-sockaddr-v1.0.2_GH0.tar.gz) = ce70228b6c0ac432b97c2a98697600668bf7ac8b4cd21e7c6767bed1e755ae7f
SIZE (hashicorp-go-sockaddr-v1.0.2_GH0.tar.gz) = 663049
SHA256 (hashicorp-go-uuid-v1.0.2_GH0.tar.gz) = 2dee0f810c3e3a2cd3d49a075d0a64a88806c90712a4b66013b20a1ff0562eae
SIZE (hashicorp-go-uuid-v1.0.2_GH0.tar.gz) = 7058
SHA256 (hashicorp-golang-lru-v0.5.4_GH0.tar.gz) = d50c188af0cc8b22e7e4b79e9071694fa06428a9964b22d68dc997fa787a177a
SIZE (hashicorp-golang-lru-v0.5.4_GH0.tar.gz) = 13428
SHA256 (hashicorp-serf-v0.9.5_GH0.tar.gz) = a1ae9e387c9d5d7f58770d1864d72dbf0b8a27ba1595f07c3399a9dc7fbb9c50
SIZE (hashicorp-serf-v0.9.5_GH0.tar.gz) = 2301292
SHA256 (howeyc-gopass-7cb4b85ec19c_GH0.tar.gz) = f5f5131b92098d8b1bbf9645b9bfd1b22e6cce61807f97fab24dce79f7224073
SIZE (howeyc-gopass-7cb4b85ec19c_GH0.tar.gz) = 11192
SHA256 (martini-contrib-auth-fa62c19b7ae8_GH0.tar.gz) = 487ded1a35f74d22c0f9cc5459dec20f6cdb6abc103b19579df5ca0aba9031c0
SIZE (martini-contrib-auth-fa62c19b7ae8_GH0.tar.gz) = 3227
SHA256 (martini-contrib-gzip-6c035326b43f_GH0.tar.gz) = eba862e75a70f67d94db7f7d6a3e385a11a48f801aaa354a33e45661b681c33a
SIZE (martini-contrib-gzip-6c035326b43f_GH0.tar.gz) = 3000
SHA256 (martini-contrib-render-ec18f8345a11_GH0.tar.gz) = 42ce0fa9fe44c757cf586a92fa80032cab3e179ed92c8105f344f879d8f85050
SIZE (martini-contrib-render-ec18f8345a11_GH0.tar.gz) = 7701
SHA256 (mattn-go-colorable-v0.1.8_GH0.tar.gz) = 1027954f9abbe06b6e117e3047af70204dd0eb4f8c27fcd459fb2574b279755f
SIZE (mattn-go-colorable-v0.1.8_GH0.tar.gz) = 9571
SHA256 (mattn-go-isatty-cb30d6282491_GH0.tar.gz) = bfe6329ca6770ccd28796a63c3cbbce23663bc00960f80619ebd42a30d15d8c7
SIZE (mattn-go-isatty-cb30d6282491_GH0.tar.gz) = 4470
SHA256 (mattn-go-sqlite3-v1.14.7_GH0.tar.gz) = ed9922998dc82553a7cc5889747b123fc216a15036e7c3e1bdeea1acb68bc584
SIZE (mattn-go-sqlite3-v1.14.7_GH0.tar.gz) = 2391718
SHA256 (miekg-dns-v1.1.31_GH0.tar.gz) = f40eb494b6b14ba8796a3d561861bb7510031f29e780cfce0319419b1423776b
SIZE (miekg-dns-v1.1.31_GH0.tar.gz) = 188593
SHA256 (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 646671c73a84a8dfb4a5a76b80c7b63549ffefa906524d45077301bc7da76600
SIZE (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 3362
SHA256 (mitchellh-go-testing-interface-v1.14.0_GH0.tar.gz) = db647bce1fbe6a40c7fadc5a674377daaf26b34eeb1b8cb7888435669ea7d40a
SIZE (mitchellh-go-testing-interface-v1.14.0_GH0.tar.gz) = 2753
SHA256 (mitchellh-mapstructure-v1.3.3_GH0.tar.gz) = 660c2e8fd3c855022b2b566756eabe904167ce5ceb29ea3ce90ad0eb76ddd802
SIZE (mitchellh-mapstructure-v1.3.3_GH0.tar.gz) = 26054
SHA256 (montanaflynn-stats-f8cd06f93c6c_GH0.tar.gz) = daac2ec32e3591d0919959dcde756608aed6bfbc168765ae155bc6fd06a38acd
SIZE (montanaflynn-stats-f8cd06f93c6c_GH0.tar.gz) = 17765
SHA256 (openark-golib-827f3ea62180_GH0.tar.gz) = 144441e595c005522773b219d12369486bcfdda49f98209e7325432f894f2096
SIZE (openark-golib-827f3ea62180_GH0.tar.gz) = 10019
SHA256 (openark-raft-fba9f909f7fe_GH0.tar.gz) = 35a08131f4d9fc8f09403d76b6015b9e7ed93ec84ab49433946d5a8ab74197d8
SIZE (openark-raft-fba9f909f7fe_GH0.tar.gz) = 68448
SHA256 (outbrain-golib-2531e5dbcc71_GH0.tar.gz) = 16ea19c0580f681541b73ce3de9459190bcf7b53e28b48f091fbc6776c4a15b0
SIZE (outbrain-golib-2531e5dbcc71_GH0.tar.gz) = 9387
SHA256 (oxtoacart-bpool-03653db5a59c_GH0.tar.gz) = b5898969c50f5677fa8ea955bd7a06b77083b56ae76607f49ae1aed0abd61b41
SIZE (oxtoacart-bpool-03653db5a59c_GH0.tar.gz) = 8478
SHA256 (patrickmn-go-cache-v2.1.0_GH0.tar.gz) = 3ab025f2f580f8818a5357db52596fef1b0ad5945816a022c8b805ba46dc93be
SIZE (patrickmn-go-cache-v2.1.0_GH0.tar.gz) = 13572
SHA256 (rcrowley-go-metrics-cf1acfcdf475_GH0.tar.gz) = e15251850bd93b7e01a191d165a06027f7d8e9022e163c1b3a7cb58794de5d0c
SIZE (rcrowley-go-metrics-cf1acfcdf475_GH0.tar.gz) = 37581
SHA256 (samuel-go-zookeeper-7117e9ea2414_GH0.tar.gz) = 00664cc91bfbb4a0569c2f575934e707a10c25d3c4914bfc32e02e29146395ab
SIZE (samuel-go-zookeeper-7117e9ea2414_GH0.tar.gz) = 40324
SHA256 (sjmudd-stopwatch-637ef30077b7_GH0.tar.gz) = 107dd13b861b5c7d011e8bf4cc27e8e7dbeeae76d5818372248aad97594b18eb
SIZE (sjmudd-stopwatch-637ef30077b7_GH0.tar.gz) = 3811
SHA256 (stretchr-testify-v1.6.1_GH0.tar.gz) = 40fd7204ab72ca9d8759f1cc3604dd17f556a0f9177f6fc05dd0cad9f06e708f
SIZE (stretchr-testify-v1.6.1_GH0.tar.gz) = 84215
@@ -0,0 +1,24 @@
--- conf/orchestrator-simple.conf.json.orig 2024-04-05 14:26:48 UTC
+++ conf/orchestrator-simple.conf.json
@@ -2,9 +2,9 @@
"#": "-----",
"#": "this is a comment. See further comment hints below.",
"#": "-----",
- "Debug": true,
- "EnableSyslog": false,
- "ListenAddress": ":3000",
+ "Debug": false,
+ "EnableSyslog": true,
+ "ListenAddress": "127.0.0.1:3000",
"MySQLTopologyUser": "orc_client_user",
"MySQLTopologyPassword": "orc_client_password",
"MySQLTopologyCredentialsConfigFile": "",
@@ -58,7 +58,7 @@
"#": "-----",
"#": "security, access control:",
"#": "-----",
- "ReadOnly": false,
+ "ReadOnly": true,
"AuthenticationMethod": "",
"HTTPAuthUser": "",
"HTTPAuthPassword": "",
56 changes: 56 additions & 0 deletions databases/percona-orchestrator/files/percona-orchestrator.in
@@ -0,0 +1,56 @@
#!/bin/sh

# PROVIDE: percona_orchestrator
# REQUIRE: LOGIN mysql
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# percona_orchestrator_enable (bool): Set to NO by default.
# Set it to YES to enable percona_orchestrator.
# percona_orchestrator_user (string): Set user that percona_orchestrator will run under
# Default is "percona".
# percona_orchestrator_group (string): Set group that percona_orchestrator will run under
# Default is "percona".
# percona_orchestrator_config (string): Set path to config file
# Default is "%%ETCDIR%%/orchestrator.cfg".
# percona_orchestrator_args (string): Set extra arguments to pass to percona_orchestrator
# Default is "".

. /etc/rc.subr

name=percona_orchestrator
rcvar=percona_orchestrator_enable

load_rc_config $name

: ${percona_orchestrator_enable:="NO"}
: ${percona_orchestrator_user:="percona"}
: ${percona_orchestrator_group:="percona"}
: ${percona_orchestrator_config:="%%ETCDIR%%/orchestrator.conf"}
: ${percona_orchestrator_args:=""}
: ${percona_orchestrator_restart_delay:="10"}


pidfile="/var/run/orchestrator/orchestrator.pid"
command="/usr/sbin/daemon"
percona_orchestrator_command="%%PREFIX%%/sbin/orchestrator"
command_args="-rP ${pidfile} -S -R ${percona_orchestrator_restart_delay} \
-T ${name} ${percona_orchestrator_command} \
-config ${percona_orchestrator_config} \
${percona_orchestrator_args} http"
required_files="${percona_orchestrator_config}"

start_precmd=percona_start_precmd

percona_start_precmd () {
local piddir
piddir=`/usr/bin/dirname "${pidfile}"`
if [ ! -d "${piddir}" ] ; then
/usr/bin/install -d -o "${percona_orchestrator_user}" -g "${percona_orchestrator_group}" "${piddir}"
fi
}

load_rc_config $name
run_rc_command "$1"
44 changes: 44 additions & 0 deletions databases/percona-orchestrator/files/pkg-message.in
@@ -0,0 +1,44 @@
[
{ type: install
message: <<EOM
#### Setup backend MySQL server

Setup a MySQL server for backend, and invoke the following:

CREATE DATABASE IF NOT EXISTS orchestrator;
CREATE USER 'orchestrator'@'127.0.0.1' IDENTIFIED BY 'orch_backend_password';
GRANT ALL PRIVILEGES ON `orchestrator`.* TO 'orchestrator'@'127.0.0.1';

Orchestrator uses a configuration file, located in:
%%ETCDIR%%/orchestrator.conf.json

Edit orchestrator.conf to match the above as follows:

...
"MySQLOrchestratorHost": "127.0.0.1",
"MySQLOrchestratorPort": 3306,
"MySQLOrchestratorDatabase": "orchestrator",
"MySQLOrchestratorUser": "orchestrator",
"MySQLOrchestratorPassword": "orch_backend_password",
...

#### Grant access to orchestrator on all your MySQL servers

CREATE USER 'orchestrator'@'orch_host' IDENTIFIED BY 'orch_topology_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO 'orchestrator'@'orch_host';
GRANT SELECT ON mysql.slave_master_info TO 'orchestrator'@'orch_host';
GRANT SELECT ON ndbinfo.processes TO 'orchestrator'@'orch_host'; -- Only for NDB Cluster

Replace `orch_host` with hostname or orchestrator machine (or do your
wildcards thing). Choose your password wisely. Modify the configuration file to
match:

"MySQLTopologyUser": "orchestrator",
"MySQLTopologyPassword": "orch_topology_password",

By default, orchestrator listens on 127.0.0.1:3000 and is configured to be
read-only. Please update the configuration file if you would like to change
this.
EOM
}
]
22 changes: 22 additions & 0 deletions databases/percona-orchestrator/pkg-descr
@@ -0,0 +1,22 @@
Orchestrator is a replication topology manager for MySQL.

Features include:

* The topology and status of the replication tree is automatically detected
and monitored.
* Either a GUI, CLI or API can be used to check the status and perform
operations.
* Supports automatic failover of the master, and the replication tree can
be fixed when servers in the tree fail - either manually or automatically.
* It is not dependent on any specific version or flavor of MySQL (MySQL,
Percona Server, MariaDB or even MaxScale binlog servers).
* Orchestrator supports many different types of topologies, from a single
master -> slave to complex multi-layered replication trees consisting of
hundreds of servers.
* Orchestrator can make topology changes and will do so based on the state
at that moment; it does not require a configuration to be defined with what
corresponds to the database topology.
* The GUI is not only there to report the status - one of the cooler things
you can do is change replication just by doing a drag and drop in the web
interface (of course you can do this and much more through the CLI and API
as well).

0 comments on commit 7a832ca

Please sign in to comment.