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 =
...
@@ -3,7 +3,7 @@ extends =
../../component/golang/buildout.cfg
../../component/golang/buildout.cfg
parts =
parts =
repman
gowork
[gowork]
[gowork]
golang = ${golang1.12:location}
golang = ${golang1.12:location}
...
@@ -22,23 +22,9 @@ command = . ${gowork:env.sh} &&
...
@@ -22,23 +22,9 @@ command = . ${gowork:env.sh} &&
go build ${gowork:buildflags} -o ${gowork:bin}/replication-manager &&
go build ${gowork:buildflags} -o ${gowork:bin}/replication-manager &&
chmod -R u+w .
chmod -R u+w .
# export VERSION=$(git describe --abbrev=0 --tags) &&
[git.signal18.io_signal18_repman]
[git.signal18.io_signal18_repman]
<= go-git-package
<= go-git-package
go.importpath = github.com/signal18/replication-manager
go.importpath = github.com/signal18/replication-manager
repository = https://github.com/signal18/replication-manager
repository = https://github.com/signal18/replication-manager
branch = 2.1
branch = 2.1
\ No newline at end of file
[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}
software/repman/buildout.hash.cfg
View file @
e24602f5
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
# not need these here).
# not need these here).
[instance.cfg]
[instance.cfg]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
704e79c3e6bb0c5c8081f1438e85bba3
md5sum =
2f542e132b56e4010c30a72665c196f9
[instance-repman.cfg]
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum =
1a4f2657c4f606406024a77b1c97b6ea
md5sum =
6e58a2b75429a285c4297996e702cbf4
[config-toml.in]
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
_update_hash_filename_ = templates/config.toml.in
md5sum = 2f3d76fc9bd201fb32cc13972be72685
md5sum = 954b8c63b7a15915f21bac1858df4b8e
\ No newline at end of file
\ 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
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
partition = ${slap-connection:partition-id}
...
@@ -7,87 +17,80 @@ url = ${slap-connection:server-url}
...
@@ -7,87 +17,80 @@ url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
cert = ${slap-connection:cert-file}
[instance-parameter]
<= slap-configuration
# repman monitor seems to use a fixed port
repman-port = 10005
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
[repman]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/repman
home = ${buildout:directory}
data-dir = ${directory:var}/lib
etc = ${:home}/etc
root-dir = ${directory:srv}/repman
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
promise = ${:etc}/promise/
log = ${:var}/log
data = ${:var}/lib
[rep
lication-manager-credential
]
[rep
man-password
]
recipe = slapos.cookbook:generate.password
recipe = slapos.cookbook:generate.password
username = admin
bytes = 12
bytes = 12
[replication-manager]
[repman-parameter]
recipe = slapos.cookbook:wrapper
log = ${directory:log}/repman.log
# repman service is listening on:
http-root = ${repman:root-dir}/dashboard
# - global IPv6 address, and
share-dir = ${repman:root-dir}/share
# - 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.
port = ${instance-parameter:repman-port}
port = ${instance-parameter:repman-port}
ipv6 = ${instance-parameter:ipv6-random}
ipv6 = ${instance-parameter:ipv6-random}
# full URL - for convenience
username = admin
url = https://[${:ipv6}]:${:port}
password = ${repman-password:passwd}
logfile = ${directory:log}/repman.log
[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 =
command-line =
{{ gowork_bin }}/replication-manager
{{ gowork_bin }}/replication-manager
--monitoring-basedir=system
--monitoring-basedir=${repman:root-dir}
--monitoring-sharedir=software_release/src/share
--monitoring-sharedir=${repman-parameter:share-dir}
--http-root=software_release/src/dashboard
--http-root=${repman-parameter:http-root}
--monitoring-datadir=${directory:var}/lib
--monitoring-datadir=${repman:data-dir}
--config=${directory:etc}/config.toml
--config=${repman-config.toml:rendered}
--log-file=${:logfile} monitor
--log-file=${repman-parameter:log}
monitor
wrapper-path = ${directory:service}/replication-manager
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
recipe = slapos.recipe.template:jinja2
template = {{ config_toml_in }}
template = {{ config_toml_in }}
rendered =
${directory
:etc}/config.toml
rendered =
${repman
:etc}/config.toml
extra-context =
extra-context =
context =
context =
key service_ipv6 replication-manager:ipv6
section parameter_dict repman-parameter
key service_user replication-manager-credential:username
key service_pwd replication-manager-credential:passwd
[repman-listen-promise]
[repman-listen-promise]
<= monitor-promise-base
<= monitor-promise-base
module = check_port_listening
module = check_port_listening
name = repman_service_listen.py
name = repman_service_listen.py
config-hostname = ${rep
lication-manag
er:ipv6}
config-hostname = ${rep
man-paramet
er:ipv6}
config-port = ${
instance-parameter:repman-
port}
config-port = ${
repman-parameter:
port}
[publish-connection-parameter]
[publish-connection-parameter]
<= monitor-publish
<= monitor-publish
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
url =
${replication-manager:url
}
url =
url = https://[${repman-parameter:ipv6}]:${repman-parameter:port
}
username = ${rep
lication-manager-credential
:username}
username = ${rep
man-parameter
:username}
password = ${rep
lication-manager-credential:passw
d}
password = ${rep
man-parameter:passwor
d}
#############################
#############################
...
@@ -99,13 +102,10 @@ password = ${replication-manager-credential:passwd}
...
@@ -99,13 +102,10 @@ password = ${replication-manager-credential:passwd}
extends =
extends =
{{ template_monitor_cfg }}
{{ template_monitor_cfg }}
parts =
parts =
directory
publish-connection-parameter
instance-parameter
template-jinja2-base
replication-manager
replication-manager
repman-listen-promise
repman-listen-promise
monitor-base
monitor-base
publish-connection-parameter
eggs-directory = {{ eggs_directory }}
eggs-directory = {{ eggs_directory }}
...
...
software/repman/instance.cfg.in
View file @
e24602f5
...
@@ -28,6 +28,7 @@ context =
...
@@ -28,6 +28,7 @@ context =
# program binaries
# program binaries
raw bash_bin ${bash:location}/bin/bash
raw bash_bin ${bash:location}/bin/bash
raw gowork_bin ${gowork:bin}
raw gowork_bin ${gowork:bin}
raw repman_src_location ${git.signal18.io_signal18_repman:location}
raw template_monitor_cfg ${monitor2-template:rendered}
raw template_monitor_cfg ${monitor2-template:rendered}
# config files
# config files
...
...
software/repman/software.cfg
View file @
e24602f5
...
@@ -5,7 +5,6 @@ extends =
...
@@ -5,7 +5,6 @@ extends =
../../stack/monitor/buildout.cfg
../../stack/monitor/buildout.cfg
../../component/replication-manager/buildout.cfg
../../component/replication-manager/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/git/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
...
@@ -13,8 +12,6 @@ parts =
...
@@ -13,8 +12,6 @@ parts =
slapos-cookbook
slapos-cookbook
instance.cfg
instance.cfg
mariadb
mariadb
repman
repman-repository
[instance.cfg]
[instance.cfg]
...
@@ -22,7 +19,7 @@ recipe = slapos.recipe.template
...
@@ -22,7 +19,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
[repman-repository]
[
XXX-
repman-repository]
recipe = slapos.recipe.build:gitclone
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
git-executable = ${git:location}/bin/git
location = ${buildout:directory}/src
location = ${buildout:directory}/src
...
...
software/repman/templates/config.toml.in
View file @
e24602f5
[Default]
[Default]
api-bind = "[{{
service_ipv6
}}]"
api-bind = "[{{
parameter_dict['ipv6']
}}]"
http-bind-address = "[{{
service_ipv6
}}]"
http-bind-address = "[{{
parameter_dict['ipv6']
}}]"
monitoring-save-config = true
monitoring-save-config = true
api-https-bind = true
api-https-bind = true
api-credentials = "{{
service_user}}:{{service_pwd
}}"
api-credentials = "{{
parameter_dict['username'] }}:{{ parameter_dict['password']
}}"
[cluster1]
[cluster1]
title = "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