diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg index 5c54463a73fa62309fdc988c4eca9ef2ac6e4733..711d2fbbf0b07b59a80d911e93aad63ebc14ec4a 100644 --- a/software/slaprunner/instance-runner.cfg +++ b/software/slaprunner/instance-runner.cfg @@ -20,32 +20,27 @@ offline = true # Create all needed directories -[rootdirectory] +[directory] recipe = slapos.cookbook:mkdirectory etc = $${buildout:directory}/etc/ var = $${buildout:directory}/var/ srv = $${buildout:directory}/srv/ bin = $${buildout:directory}/bin/ -[directory] -recipe = slapos.cookbook:mkdirectory -sshkeys = $${rootdirectory:srv}/sshkeys -services = $${rootdirectory:etc}/service/ -scripts = $${rootdirectory:etc}/run/ -ssh = $${rootdirectory:etc}/ssh/ - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log/ -run = $${rootdirectory:var}/run/ -backup = $${rootdirectory:srv}/backup/ -promises = $${rootdirectory:etc}/promise/ -test = $${rootdirectory:etc}/test/ +sshkeys = $${:srv}/sshkeys +services = $${:etc}/service/ +scripts = $${:etc}/run/ +ssh = $${:etc}/ssh/ +log = $${:var}/log/ +run = $${:var}/run/ +backup = $${:srv}/backup/ +promises = $${:etc}/promise/ +test = $${:etc}/test/ [runnerdirectory] recipe = slapos.cookbook:mkdirectory -home = $${rootdirectory:srv}/runner/ -test = $${rootdirectory:srv}/test/ +home = $${directory:srv}/runner/ +test = $${directory:srv}/test/ project = $${:home}/project software-root = $${:home}/software instance-root = $${:home}/instance @@ -56,7 +51,7 @@ instance-test = $${:test}/instance #Create password recovery code for slaprunner [recovery-code] recipe = slapos.cookbook:generate.password -storage-path = $${rootdirectory:etc}/.rcode +storage-path = $${directory:etc}/.rcode bytes = 4 # Deploy cloud9 and slaprunner @@ -64,7 +59,7 @@ bytes = 4 recipe = slapos.cookbook:cloud9 ip = $${slap-network-information:global-ipv6} port = 30000 -wrapper = $${basedirectory:services}/cloud9 +wrapper = $${directory:services}/cloud9 working-directory = $${runnerdirectory:home} git-binary = ${git:location}/bin/git node-binary = ${nodejs:location}/bin/node @@ -78,14 +73,14 @@ slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp slapproxy = ${buildout:directory}/bin/slapproxy supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl git-binary = ${git:location}/bin/git -slapos.cfg = $${rootdirectory:etc}/slapos.cfg +slapos.cfg = $${directory:etc}/slapos.cfg working-directory = $${runnerdirectory:home} project-directory = $${runnerdirectory:project} software-directory = $${runnerdirectory:software-root} instance-directory = $${runnerdirectory:instance-root} -etc_dir = $${rootdirectory:etc} -log_dir = $${basedirectory:log} -run_dir = $${basedirectory:run} +etc_dir = $${directory:etc} +log_dir = $${directory:log} +run_dir = $${directory:run} ssh_client = $${sshkeys-dropbear:wrapper} public_key = $${sshkeys-dropbear:public-key} private_key = $${sshkeys-dropbear:private-key} @@ -95,33 +90,34 @@ proxy_port = 50000 runner_port = 50000 partition-amount = $${slap-parameter:instance-amount} cloud9-url = $${cloud9:access-url} -wrapper = $${basedirectory:services}/slaprunner +wrapper = $${directory:services}/slaprunner debug = $${slap-parameter:debug} -# Deploy dropbear (minimalist ssh server) -[sshkeys-directory] -recipe = slapos.cookbook:mkdirectory -requests = $${directory:sshkeys}/requests/ -keys = $${directory:sshkeys}/keys/ - [test-runner] <= slaprunner recipe = slapos.cookbook:slaprunner.test slaprunnertest = ${buildout:directory}/bin/slaprunnertest -slapos.cfg = $${rootdirectory:etc}/slapos-test.cfg +slapos.cfg = $${directory:etc}/slapos-test.cfg working-directory = $${runnerdirectory:test} project-directory = $${runnerdirectory:project-test} software-directory = $${runnerdirectory:software-test} instance-directory = $${runnerdirectory:instance-test} proxy_port = 8602 -wrapper = $${rootdirectory:bin}/runTestSuite -etc_dir = $${basedirectory:test} +wrapper = $${directory:bin}/runTestSuite +etc_dir = $${directory:test} + + +# Deploy dropbear (minimalist SSH server) +[sshkeys-directory] +recipe = slapos.cookbook:mkdirectory +requests = $${directory:sshkeys}/requests/ +keys = $${directory:sshkeys}/keys/ [sshkeys-authority] recipe = slapos.cookbook:sshkeys_authority request-directory = $${sshkeys-directory:requests} keys-directory = $${sshkeys-directory:keys} -wrapper = $${basedirectory:services}/sshkeys_authority +wrapper = $${directory:services}/sshkeys_authority keygen-binary = ${dropbear:location}/bin/dropbearkey [dropbear-server] @@ -129,7 +125,7 @@ recipe = slapos.cookbook:dropbear host = $${slap-network-information:global-ipv6} port = 2222 home = $${directory:ssh} -wrapper = $${rootdirectory:bin}/raw_sshd +wrapper = $${directory:bin}/raw_sshd shell = /bin/bash rsa-keyfile = $${directory:ssh}/server_key.rsa dropbear-binary = ${dropbear:location}/sbin/dropbear @@ -142,7 +138,7 @@ type = rsa executable = $${dropbear-server:wrapper} public-key = $${dropbear-server:rsa-keyfile}.pub private-key = $${dropbear-server:rsa-keyfile} -wrapper = $${basedirectory:services}/sshd +wrapper = $${directory:services}/sshd [dropbear-server-add-authorized-key] <= dropbear-server @@ -176,33 +172,33 @@ password_recovery_code = $${recovery-code:passwd} # Deploy promises scripts [slaprunner-promise] recipe = slapos.cookbook:check_port_listening -path = $${basedirectory:promises}/slaprunner +path = $${directory:promises}/slaprunner hostname = $${slaprunner:ipv6} port = $${slaprunner:runner_port} [slaprunner-frontend-promise] recipe = slapos.cookbook:check_url_available -path = $${basedirectory:promises}/slaprunner_frontend +path = $${directory:promises}/slaprunner_frontend url = $${request-frontend:connection-site_url} dash_path = ${dash:location}/bin/dash curl_path = ${curl:location}/bin/curl [cloud9-promise] recipe = slapos.cookbook:check_url_available -path = $${basedirectory:promises}/cloud9 +path = $${directory:promises}/cloud9 url = http://$${cloud9:ip}:$${cloud9:port} dash_path = ${dash:location}/bin/dash curl_path = ${curl:location}/bin/curl [dropbear-promise] recipe = slapos.cookbook:check_port_listening -path = $${basedirectory:promises}/dropbear +path = $${directory:promises}/dropbear hostname = $${dropbear-server:host} port = $${dropbear-server:port} [symlinks] recipe = cns.recipe.symlink -symlink_target = $${rootdirectory:bin} +symlink_target = $${directory:bin} symlink_base = ${buildout:directory}/bin [slap-parameter] diff --git a/software/slaprunner/software.cfg b/software/slaprunner/software.cfg index 38d5982c37de9bcf7cf2460db2d45e2ced146207..0f01f258cefe66a077fdb7df3222b223330b612d 100644 --- a/software/slaprunner/software.cfg +++ b/software/slaprunner/software.cfg @@ -25,7 +25,7 @@ md5sum = 5307e4200f044ae57b504ad68444491c recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-runner.cfg output = ${buildout:directory}/template-runner.cfg -md5sum = 27c4ed33cd5c0a422f11e03e0821c3e7 +md5sum = 38fbe93425a745728afcafbdce89f101 mode = 0644 [eggs]