Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
e24602f5
Commit
e24602f5
authored
Mar 24, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repman: cleanup and optimise software release
parent
80b39d99
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
82 deletions
+66
-82
component/replication-manager/buildout.cfg
component/replication-manager/buildout.cfg
+2
-16
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+3
-3
software/repman/instance-repman.cfg.jinja2.in
software/repman/instance-repman.cfg.jinja2.in
+56
-56
software/repman/instance.cfg.in
software/repman/instance.cfg.in
+1
-0
software/repman/software.cfg
software/repman/software.cfg
+1
-4
software/repman/templates/config.toml.in
software/repman/templates/config.toml.in
+3
-3
No files found.
component/replication-manager/buildout.cfg
View file @
e24602f5
...
...
@@ -3,7 +3,7 @@ extends =
../../component/golang/buildout.cfg
parts =
repman
gowork
[gowork]
golang = ${golang1.12:location}
...
...
@@ -22,23 +22,9 @@ command = . ${gowork:env.sh} &&
go build ${gowork:buildflags} -o ${gowork:bin}/replication-manager &&
chmod -R u+w .
# export VERSION=$(git describe --abbrev=0 --tags) &&
[git.signal18.io_signal18_repman]
<= go-git-package
go.importpath = github.com/signal18/replication-manager
repository = https://github.com/signal18/replication-manager
branch = 2.1
[repman]
# revision and repository can be used to control which repman version is used
depend = ${gowork:recipe}
recipe = collective.recipe.template
# Do something useless to pass
output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
input = inline:
#!/bin/sh
${gowork:bin}/replication-manager
--monitoring-basedir=system --monitoring-sharedir=software_release/src/share --http-root=software_release/src/dashboard monitor
# --monitoring-datadir=$${directory:var}/lib --config=$${directory:etc}/config.toml --log-file=$${:logfile}
branch = 2.1
\ No newline at end of file
software/repman/buildout.hash.cfg
View file @
e24602f5
...
...
@@ -14,12 +14,12 @@
# not need these here).
[instance.cfg]
filename = instance.cfg.in
md5sum =
704e79c3e6bb0c5c8081f1438e85bba3
md5sum =
2f542e132b56e4010c30a72665c196f9
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum =
1a4f2657c4f606406024a77b1c97b6ea
md5sum =
6e58a2b75429a285c4297996e702cbf4
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
md5sum = 2f3d76fc9bd201fb32cc13972be72685
\ No newline at end of file
md5sum = 954b8c63b7a15915f21bac1858df4b8e
\ No newline at end of file
software/repman/instance-repman.cfg.jinja2.in
View file @
e24602f5
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
data = ${:var}/lib
[
instance-parameter
]
[
slap-configuration
]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
...
...
@@ -7,87 +17,80 @@ url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[instance-parameter]
<= slap-configuration
# repman monitor seems to use a fixed port
repman-port = 10005
[slap-configuration]
# apache-frontend reads from a part named [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
# Create all needed directories, depending on your needs
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
promise = ${:etc}/promise/
log = ${:var}/log
data = ${:var}/lib
[repman]
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/repman
data-dir = ${directory:var}/lib
root-dir = ${directory:srv}/repman
[rep
lication-manager-credential
]
[rep
man-password
]
recipe = slapos.cookbook:generate.password
username = admin
bytes = 12
[replication-manager]
recipe = slapos.cookbook:wrapper
# repman service is listening on:
# - global IPv6 address, and
# - fixed port
#
# NOTE because every computer partition is allocated its own global IPv6
# address, it is ok to fix the port - different hello-world instances will have
# different IPv6 addresses and they all will be accessible at the same time.
[repman-parameter]
log = ${directory:log}/repman.log
http-root = ${repman:root-dir}/dashboard
share-dir = ${repman:root-dir}/share
port = ${instance-parameter:repman-port}
ipv6 = ${instance-parameter:ipv6-random}
# full URL - for convenience
url = https://[${:ipv6}]:${:port}
logfile = ${directory:log}/repman.log
username = admin
password = ${repman-password:passwd}
[repman-config-folder]
recipe = plone.recipe.command
repman-location = {{ repman_src_location }}
command =
cd ${:repman-location}
cp -r share ${repman-parameter:share-dir}
cp -r dashboard ${repman-parameter:http-root}
[replication-manager]
recipe = slapos.cookbook:wrapper
command-line =
{{ gowork_bin }}/replication-manager
--monitoring-basedir=system
--monitoring-sharedir=software_release/src/share
--http-root=software_release/src/dashboard
--monitoring-datadir=${directory:var}/lib
--config=${directory:etc}/config.toml
--log-file=${:logfile} monitor
--monitoring-basedir=${repman:root-dir}
--monitoring-sharedir=${repman-parameter:share-dir}
--http-root=${repman-parameter:http-root}
--monitoring-datadir=${repman:data-dir}
--config=${repman-config.toml:rendered}
--log-file=${repman-parameter:log}
monitor
wrapper-path = ${directory:service}/replication-manager
# setup repman instance folder
depends =
${repman-config-folder:recipe}
[
template-jinja2-base
]
[
repman-config.toml
]
recipe = slapos.recipe.template:jinja2
template = {{ config_toml_in }}
rendered =
${directory
:etc}/config.toml
rendered =
${repman
:etc}/config.toml
extra-context =
context =
key service_ipv6 replication-manager:ipv6
key service_user replication-manager-credential:username
key service_pwd replication-manager-credential:passwd
section parameter_dict repman-parameter
[repman-listen-promise]
<= monitor-promise-base
module = check_port_listening
name = repman_service_listen.py
config-hostname = ${rep
lication-manag
er:ipv6}
config-port = ${
instance-parameter:repman-
port}
config-hostname = ${rep
man-paramet
er:ipv6}
config-port = ${
repman-parameter:
port}
[publish-connection-parameter]
<= monitor-publish
recipe = slapos.cookbook:publish
url =
${replication-manager:url
}
username = ${rep
lication-manager-credential
:username}
password = ${rep
lication-manager-credential:passw
d}
url =
url = https://[${repman-parameter:ipv6}]:${repman-parameter:port
}
username = ${rep
man-parameter
:username}
password = ${rep
man-parameter:passwor
d}
#############################
...
...
@@ -99,13 +102,10 @@ password = ${replication-manager-credential:passwd}
extends =
{{ template_monitor_cfg }}
parts =
directory
publish-connection-parameter
instance-parameter
template-jinja2-base
replication-manager
repman-listen-promise
monitor-base
publish-connection-parameter
eggs-directory = {{ eggs_directory }}
...
...
software/repman/instance.cfg.in
View file @
e24602f5
...
...
@@ -28,6 +28,7 @@ context =
# program binaries
raw bash_bin ${bash:location}/bin/bash
raw gowork_bin ${gowork:bin}
raw repman_src_location ${git.signal18.io_signal18_repman:location}
raw template_monitor_cfg ${monitor2-template:rendered}
# config files
...
...
software/repman/software.cfg
View file @
e24602f5
...
...
@@ -5,7 +5,6 @@ extends =
../../stack/monitor/buildout.cfg
../../component/replication-manager/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/git/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
...
...
@@ -13,8 +12,6 @@ parts =
slapos-cookbook
instance.cfg
mariadb
repman
repman-repository
[instance.cfg]
...
...
@@ -22,7 +19,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
[repman-repository]
[
XXX-
repman-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
location = ${buildout:directory}/src
...
...
software/repman/templates/config.toml.in
View file @
e24602f5
[Default]
api-bind = "[{{
service_ipv6
}}]"
http-bind-address = "[{{
service_ipv6
}}]"
api-bind = "[{{
parameter_dict['ipv6']
}}]"
http-bind-address = "[{{
parameter_dict['ipv6']
}}]"
monitoring-save-config = true
api-https-bind = true
api-credentials = "{{
service_user}}:{{service_pwd
}}"
api-credentials = "{{
parameter_dict['username'] }}:{{ parameter_dict['password']
}}"
[cluster1]
title = "cluster1"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment