Commit 0c9629fd authored by Rafael Monnerat's avatar Rafael Monnerat

monitor: Autogenerate monitor and disable cgi (not required for now)

parent 92abcff9
#!{{ extra_eggs_interpreter }}
print "OK"
...@@ -60,5 +60,28 @@ rendered = $${monitor-directory:server-log}/dygraph-combined.js ...@@ -60,5 +60,28 @@ rendered = $${monitor-directory:server-log}/dygraph-combined.js
mode = 0644 mode = 0644
context = context =
[pwgen]
recipe = slapos.cookbook:generate.password
user = admin
bytes = 16
[pwgen32]
recipe = slapos.cookbook:generate.password
user = admin
bytes = 16
[htpasswd-generate]
recipe = plone.recipe.command
output = $${monitor-parameters:htaccess-file}
long_passwd = $${pwgen:passwd}$${pwgen32:passwd}
update-command = $${:command}
command =
echo ${apache:location}/bin/htpasswd $${:output} $${pwgen:user} $${:long_passwd}
${apache:location}/bin/htpasswd -cb $${:output} $${pwgen:user} $${:long_passwd}
[monitor-directory] [monitor-directory]
server-log = $${:private-directory}/server-log server-log = $${:private-directory}/server-log
[monitor-parameters]
url = https://$${pwgen:user}:$${htpasswd-generate:long_passwd}@[$${slap-parameters:ipv6-random}]:$${:port}
...@@ -15,9 +15,14 @@ parts = ...@@ -15,9 +15,14 @@ parts =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = df01574007b7e9a05cf9a4eabe07e78c md5sum = 68e146558156c0702344c83876b4daf8
mode = 0644 mode = 0644
# stupify index for now
[index]
url = ${:_profile_base_location_}/${:filename}
md5sum = 99ad2a7a9dbdae35e3d9aef352c4f0d5
[rsync-logs-script] [rsync-logs-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/rsync-logs.sh.in url = ${:_profile_base_location_}/rsync-logs.sh.in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment