Commit 84c13c09 authored by Łukasz Nowak's avatar Łukasz Nowak

Revert "Setup and pass return information server"

This reverts commit df51573f.

Unfortunately, the test system shall not rely on IPv6 connectivity of
the VM. Other way to get data from the instance shall be explored.
parent 2f85b63a
...@@ -11,11 +11,10 @@ ...@@ -11,11 +11,10 @@
# it in text form with data-to-vm # it in text form with data-to-vm
# #
# Format of data-to-vm is shell script: # Format of data-to-vm is shell script:
# SCRIPTURL=<url>\nPOSTURL=<url>\nWAITTIME=<seconds>\nTRIES=<amount> # URL=<url>\nWAITTIME=<seconds>\nTRIES=<amount>
# #
# Expected values in configuration: # Expected values in configuration:
# * SCRIPTURL - the url of the script to download and test # * URL - the url of the script to download and test
# * POSTURL - the url to which results will be posted
# * WAITTIME - waiting time, before next try # * WAITTIME - waiting time, before next try
# * TRIES - amount of tries # * TRIES - amount of tries
...@@ -34,13 +33,8 @@ if [ -z "$LOG_FILE" ] ; then ...@@ -34,13 +33,8 @@ if [ -z "$LOG_FILE" ] ; then
exit 1 exit 1
fi fi
if [ -z "$SCRIPTURL" ] ; then if [ -z "$URL" ] ; then
echo "SCRIPTURL is missing" >> $LOG_FILE 2>&1 echo "URL is missing" >> $LOG_FILE 2>&1
exit 1
fi
if [ -z "$POSTURL" ] ; then
echo "POSTURL is missing" >> $LOG_FILE 2>&1
exit 1 exit 1
fi fi
...@@ -55,7 +49,7 @@ if [ -z "$TRIES" ] ; then ...@@ -55,7 +49,7 @@ if [ -z "$TRIES" ] ; then
fi fi
DEPLOYMENT_SCRIPT=/tmp/test-script-deployment.bash.$$ DEPLOYMENT_SCRIPT=/tmp/test-script-deployment.bash.$$
wget -O $DEPLOYMENT_SCRIPT -q $SCRIPTURL wget -O $DEPLOYMENT_SCRIPT -q $URL
if [[ ! -s "$DEPLOYMENT_SCRIPT" ]] ; then if [[ ! -s "$DEPLOYMENT_SCRIPT" ]] ; then
echo "exit 1" > $DEPLOYMENT_SCRIPT echo "exit 1" > $DEPLOYMENT_SCRIPT
...@@ -83,5 +77,5 @@ done ...@@ -83,5 +77,5 @@ done
echo "$0: Try $try. Uploading log and exiting with $result." >> $LOG_FILE 2>&1 echo "$0: Try $try. Uploading log and exiting with $result." >> $LOG_FILE 2>&1
t=`date '+%Y%m%d%H%S'` t=`date '+%Y%m%d%H%S'`
mv $LOG_FILE ${LOG_FILE}.$t mv $LOG_FILE ${LOG_FILE}.$t
curl -q -X POST --data-urlencode "path=log-file.log.$t" --data-urlencode "content@${LOG_FILE}.$t" $POSTURL curl -q -X POST --data-urlencode "path=test-script-result/log-file.log.$t" --data-urlencode "content@${LOG_FILE}.$t" http://10.0.2.100/
exit $result exit $result
...@@ -8,8 +8,6 @@ offline = true ...@@ -8,8 +8,6 @@ offline = true
parts = parts =
request-kvm request-kvm
deploy-unit-test deploy-unit-test
httpd
httpd-promise
[request-kvm] [request-kvm]
<= slap-connection <= slap-connection
...@@ -30,29 +28,13 @@ config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 } ...@@ -30,29 +28,13 @@ config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 }
# Script configuration # Script configuration
config-data-to-vm = config-data-to-vm =
SCRIPTURL={{ script_url }} URL={{ script_url }}
POSTURL=http://[${httpd:host}]:${httpd:port}/test-result/
WAITTIME={{ waittime }} WAITTIME={{ waittime }}
TRIES={{ tries }} TRIES={{ tries }}
# require HTTP server # require HTTP server
config-enable-http-server = true config-enable-http-server = true
[httpd]
recipe = slapos.cookbook:simplehttpserver
host = ${slap-network-information:global-ipv6}
port = 8080
base-path = ${directory:httpd}
wrapper = ${directory:services}/http-server
log-file = ${directory:log}/httpd.log
use-hash-url = false
[httpd-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/httpd
hostname = ${httpd:host}
port = ${httpd:port}
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory} home = ${buildout:directory}
...@@ -64,8 +46,6 @@ tmp = ${:home}/tmp/ ...@@ -64,8 +46,6 @@ tmp = ${:home}/tmp/
log = ${:var}/log/ log = ${:var}/log/
services = ${:etc}/service/ services = ${:etc}/service/
scripts = ${:etc}/run/ scripts = ${:etc}/run/
httpd = ${:srv}/httpd/
promises = ${:etc}/promise
[deploy-unit-test] [deploy-unit-test]
recipe = collective.recipe.template recipe = collective.recipe.template
......
...@@ -20,7 +20,7 @@ recipe = slapos.recipe.download ...@@ -20,7 +20,7 @@ recipe = slapos.recipe.download
ignore-existing = true ignore-existing = true
filename = in-vm-test filename = in-vm-test
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
md5sum = f8086c4d70af5afe0b3d1c00ea3ef437 md5sum = 13f10035a3008cffb55d23a7dd069861
mode = 0644 mode = 0644
download-only = true download-only = true
on-update = true on-update = true
...@@ -39,7 +39,7 @@ mode = 0644 ...@@ -39,7 +39,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
ignore-existing = true ignore-existing = true
url = ${:_profile_base_location_}/instance-cdn-test.cfg.jinja2 url = ${:_profile_base_location_}/instance-cdn-test.cfg.jinja2
md5sum = fea044e27b45707389d95b629132cdca md5sum = 8711cdffa7c40b3e1c7d9b76217a0f8a
mode = 0644 mode = 0644
download-only = true download-only = true
on-update = true on-update = true
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