Commit 4115e409 authored by Jérome Perrin's avatar Jérome Perrin

testnode: software link proof of concept

parent 705b350b
...@@ -18,6 +18,7 @@ httpd_port = %(httpd_port)s ...@@ -18,6 +18,7 @@ httpd_port = %(httpd_port)s
httpd_software_access_port = %(httpd_software_access_port)s httpd_software_access_port = %(httpd_software_access_port)s
computer_id = %(computer_id)s computer_id = %(computer_id)s
server_url = %(server_url)s server_url = %(server_url)s
software_link = %(software_link)s
# Binaries # Binaries
git_binary = %(git_binary)s git_binary = %(git_binary)s
......
...@@ -55,6 +55,7 @@ httpd-log-directory = $${basedirectory:log} ...@@ -55,6 +55,7 @@ httpd-log-directory = $${basedirectory:log}
httpd-software-directory = $${directory:software} httpd-software-directory = $${directory:software}
httpd-cert-file = $${rootdirectory:etc}/httpd-public.crt httpd-cert-file = $${rootdirectory:etc}/httpd-public.crt
httpd-key-file = $${rootdirectory:etc}/httpd-private.key httpd-key-file = $${rootdirectory:etc}/httpd-private.key
software-link = ${software_link:output}
configuration-file = $${rootdirectory:etc}/erp5testnode.cfg configuration-file = $${rootdirectory:etc}/erp5testnode.cfg
log-file = $${basedirectory:log}/erp5testnode.log log-file = $${basedirectory:log}/erp5testnode.log
......
...@@ -8,6 +8,8 @@ extends = ...@@ -8,6 +8,8 @@ extends =
../../component/shellinabox/buildout.cfg ../../component/shellinabox/buildout.cfg
../../component/pwgen/buildout.cfg ../../component/pwgen/buildout.cfg
../../component/apache/buildout.cfg ../../component/apache/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/gcc/buildout.cfg
parts = parts =
slapos-cookbook-develop slapos-cookbook-develop
...@@ -20,6 +22,34 @@ parts = ...@@ -20,6 +22,34 @@ parts =
zip zip
git git
apache apache
software_link
[software_link]
recipe = collective.recipe.template
output = ${buildout:parts-directory}/software_link/software_link.cfg
input = inline:
[perl]
recipe =
location = ${perl:location}
[python2.7]
recipe =
location = ${python2.7:location}
# This python will be used by buildout as executable
executable = ${python2.7:executable}
[apache]
recipe =
location = ${apache:location}
[mariadb]
recipe =
location = ${mariadb:location}
[gcc]
recipe =
location = ${gcc:location}
[gcc-fortran]
recipe =
location = ${gcc-fortran:location}
[erp5-util-repository.git] [erp5-util-repository.git]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -83,7 +113,7 @@ recipe = slapos.recipe.template ...@@ -83,7 +113,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-default.cfg url = ${:_profile_base_location_}/instance-default.cfg
output = ${buildout:directory}/template-default.cfg output = ${buildout:directory}/template-default.cfg
mode = 0644 mode = 0644
md5sum = 22ffc8e212dcf2db8ad94cf0e5ac4772 md5sum = 1b45db053e3c7a65e5e802e4aadc42da
[versions] [versions]
erp5.util = erp5.util =
......
  • The idea here is that testnode builds a mariadb and create a [mariadb] section in the buildout.cfg used by the softwares that this testnode will build.

    This way, if the software built by the testnode also have a [mariadb] section, it will just use mariadb from the testnode instead of building a new one.

    Good points:

    • save compilation time and disk space
    • can solve problems of too deep paths and #!

    Bad points:

    • There is no version spec, just [mariadb]. The software built in testnode might want to use another mariadb version.
    • "Sometimes", software built in testnode will write in the testnode's software. I vaguely remember problems with perl and w3m.
  • mentioned in merge request nexedi/slapos!54 (merged)

    Toggle commit list
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