Commit 4ec4201b authored by Jérome Perrin's avatar Jérome Perrin

Testnode: Expose log folder

Profiles for erp5!948

Testnode expose the log folder for test suite, so that they can expose more logs and snapshots.

Because these can be big, we expose a new "keep-log-days" option so that we can se shorter delay for test nodes running software release tests.

Another important visible change is that testnode now automatically restart when configuration is changed.

See merge request !731
parents c2287242 b0f9ab77
...@@ -71,7 +71,7 @@ SSLProxyEngine On ...@@ -71,7 +71,7 @@ SSLProxyEngine On
DocumentRoot "%(testnode_log_directory)s" DocumentRoot "%(testnode_log_directory)s"
<Directory /> <Directory />
Options Indexes FollowSymLinks Options Indexes FollowSymLinks
IndexOptions FancyIndexing IndexOptions FancyIndexing NameWidth=* SuppressColumnSorting
Require all granted Require all granted
</Directory> </Directory>
</VirtualHost> </VirtualHost>
...@@ -86,7 +86,7 @@ Listen [%(ip)s]:%(software_access_port)s ...@@ -86,7 +86,7 @@ Listen [%(ip)s]:%(software_access_port)s
<Directory /> <Directory />
AllowOverride AuthConfig AllowOverride AuthConfig
Options FollowSymLinks Options FollowSymLinks
IndexOptions FancyIndexing IndexOptions FancyIndexing NameWidth=* SuppressColumnSorting
Require all denied Require all denied
</Directory> </Directory>
</VirtualHost> </VirtualHost>
...@@ -18,4 +18,4 @@ md5sum = 307663d73ef3ef94b02567ecd322252e ...@@ -18,4 +18,4 @@ md5sum = 307663d73ef3ef94b02567ecd322252e
[template-default] [template-default]
filename = instance-default.cfg filename = instance-default.cfg
md5sum = 3c2420de64f079b3b3231dfbff1633b5 md5sum = f2f24250a57f5c539f6638d4d368d31a
...@@ -18,7 +18,7 @@ parts = ...@@ -18,7 +18,7 @@ parts =
resiliency-exclude-file resiliency-exclude-file
shellinabox-frontend-reload shellinabox-frontend-reload
promises promises
[monitor-publish] [monitor-publish]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
url = $${shellinabox-frontend:url} url = $${shellinabox-frontend:url}
...@@ -28,7 +28,7 @@ frontend-url = $${testnode-frontend:connection-secure_access} ...@@ -28,7 +28,7 @@ frontend-url = $${testnode-frontend:connection-secure_access}
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
storage-path = $${buildout:directory}/.password storage-path = $${buildout:directory}/.password
[testnode] [testnode-bin]
recipe = slapos.cookbook:erp5testnode recipe = slapos.cookbook:erp5testnode
slapos-directory = $${directory:slapos} slapos-directory = $${directory:slapos}
working-directory = $${directory:testnode} working-directory = $${directory:testnode}
...@@ -47,6 +47,7 @@ ipv6-address = $${slap-network-information:global-ipv6} ...@@ -47,6 +47,7 @@ ipv6-address = $${slap-network-information:global-ipv6}
test-suite-master-url = $${slap-parameter:test-suite-master-url} test-suite-master-url = $${slap-parameter:test-suite-master-url}
instance-dict = $${slap-parameter:instance-dict} instance-dict = $${slap-parameter:instance-dict}
software-path-list = $${slap-parameter:software-path-list} software-path-list = $${slap-parameter:software-path-list}
keep-log-days = $${slap-parameter:keep-log-days}
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
slapos-binary = ${buildout:bin-directory}/slapos slapos-binary = ${buildout:bin-directory}/slapos
testnode = ${buildout:bin-directory}/testnode testnode = ${buildout:bin-directory}/testnode
...@@ -65,7 +66,7 @@ httpd-key-file = $${rootdirectory:etc}/httpd-private.key ...@@ -65,7 +66,7 @@ httpd-key-file = $${rootdirectory:etc}/httpd-private.key
configuration-file = $${rootdirectory:etc}/erp5testnode.cfg configuration-file = $${rootdirectory:etc}/erp5testnode.cfg
log-file = $${basedirectory:log}/erp5testnode.log log-file = $${basedirectory:log}/erp5testnode.log
wrapper = $${basedirectory:services}/erp5testnode wrapper = $${buildout:bin-directory}/erp5testnode-service
# Binaries # Binaries
apache-binary = ${apache:location}/bin/httpd apache-binary = ${apache:location}/bin/httpd
...@@ -73,6 +74,14 @@ apache-modules-dir = ${apache:location}/modules ...@@ -73,6 +74,14 @@ apache-modules-dir = ${apache:location}/modules
apache-mime-file = ${apache:location}/conf/mime.types apache-mime-file = ${apache:location}/conf/mime.types
apache-htpasswd = ${apache:location}/bin/htpasswd apache-htpasswd = ${apache:location}/bin/htpasswd
[testnode]
# wrapper over erp5testnode which restarts the service when configuration changed
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/erp5testnode
command-line = $${testnode-bin:wrapper}
hash-existing-files =
$${testnode-bin:wrapper}
$${testnode-bin:configuration-file}
[shell-environment] [shell-environment]
shell = ${bash:location}/bin/bash shell = ${bash:location}/bin/bash
...@@ -129,7 +138,7 @@ pidfile = $${basedirectory:run}/$${:_buildout_section_name_}.pid ...@@ -129,7 +138,7 @@ pidfile = $${basedirectory:run}/$${:_buildout_section_name_}.pid
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_} wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
command-line = command-line =
${bash:location}/bin/bash -c ${bash:location}/bin/bash -c
"kill -s USR1 $$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \ "kill -s USR1 $$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity" && ${coreutils:location}/bin/sleep infinity"
hash-files = hash-files =
...@@ -232,3 +241,4 @@ node-quantity = 1 ...@@ -232,3 +241,4 @@ node-quantity = 1
test-suite-master-url = test-suite-master-url =
instance-dict = instance-dict =
software-path-list = ["https://lab.nexedi.com/nexedi/slapos/raw/2063375310edea5991786083803e8bca9069ae17/software/seleniumrunner/software.cfg"] software-path-list = ["https://lab.nexedi.com/nexedi/slapos/raw/2063375310edea5991786083803e8bca9069ae17/software/seleniumrunner/software.cfg"]
keep-log-days = 15
\ No newline at end of file
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
"title": "Task Distribution URL", "title": "Task Distribution URL",
"description": "Url for the task distributor master on portal_task_distribution", "description": "Url for the task distributor master on portal_task_distribution",
"type": "string" "type": "string"
},
"keep-log-days": {
"title": "Retention of test logs",
"description": "Number of days to keep logs and snapshots",
"type": "integer",
"default": 15
} }
} }
} }
...@@ -153,7 +153,7 @@ pyparsing = 2.2.0 ...@@ -153,7 +153,7 @@ pyparsing = 2.2.0
pytz = 2016.10 pytz = 2016.10
requests = 2.13.0 requests = 2.13.0
six = 1.12.0 six = 1.12.0
slapos.cookbook = 1.0.145 slapos.cookbook = 1.0.146
slapos.core = 1.5.12 slapos.core = 1.5.12
slapos.extension.strip = 0.4 slapos.extension.strip = 0.4
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
...@@ -212,7 +212,7 @@ enum34 = 1.1.6 ...@@ -212,7 +212,7 @@ enum34 = 1.1.6
# Required by: # Required by:
# slapos.toolbox==0.94 # slapos.toolbox==0.94
erp5.util = 0.4.66 erp5.util = 0.4.67
# Required by: # Required by:
# slapos.toolbox==0.94 # slapos.toolbox==0.94
......
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