Commit 40ff9f11 authored by Julien Muchembled's avatar Julien Muchembled

Stop using slapos.cookbook:softwaretype for ERP5 instanciation

parent 87df1770
...@@ -171,7 +171,7 @@ context = ...@@ -171,7 +171,7 @@ context =
[template-mariadb] [template-mariadb]
< = download-base < = download-base
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 8d9ad98bde1ed97012a0a8e52339c12c md5sum = a0cd428ebbc6fc1d842156e93d9196be
link-binary = link-binary =
${coreutils:location}/bin/basename ${coreutils:location}/bin/basename
${coreutils:location}/bin/cat ${coreutils:location}/bin/cat
...@@ -186,12 +186,12 @@ link-binary = ...@@ -186,12 +186,12 @@ link-binary =
[template-kumofs] [template-kumofs]
< = download-base < = download-base
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
md5sum = 0dd51fb85ced7e77d4a8544115f90f8e md5sum = 90cfea3b4b38a5a1682e016eb82b391c
[template-cloudooo] [template-cloudooo]
< = download-base < = download-base
filename = instance-cloudoo.cfg.in filename = instance-cloudoo.cfg.in
md5sum = 5791aa6ae33944ccba4c04c91e666aae md5sum = 9622cc0a21b6caf9c9beb5efea3e1998
[template-zope-conf] [template-zope-conf]
< = download-base < = download-base
...@@ -213,7 +213,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0 ...@@ -213,7 +213,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
md5sum = fee9240473690a8a5c7add2f8d350338 md5sum = c54e4918aacce2c0099384509801a2e7
extra-context = extra-context =
key mariadb_link_binary template-mariadb:link-binary key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary key zope_link_binary template-zope:link-binary
...@@ -269,22 +269,22 @@ extra-context = ...@@ -269,22 +269,22 @@ extra-context =
[template-erp5] [template-erp5]
< = download-base < = download-base
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = d58fcae1380f208954362ff2a439bb41 md5sum = 7ee011ae179a07f6d272d140e743d80d
[template-neo] [template-neo]
< = download-base < = download-base
filename = instance-neo.cfg.in filename = instance-neo.cfg.in
md5sum = 1499c42d196f6627efb904f7e4d48b1b md5sum = 7735d535aa34dfdc18a776b80bc0ca3d
[template-zeo] [template-zeo]
< = download-base < = download-base
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = 8453652206eac7b165c86cf236b87cbf md5sum = 4d2207931975e580d04d0b0506034564
[template-zope] [template-zope]
< = download-base < = download-base
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 0469c25e4a5fdaa9e0ab12feeb8d214d md5sum = 25190a7110bd108bae81c484e729e35c
link-binary = link-binary =
${coreutils:location}/bin/basename ${coreutils:location}/bin/basename
${coreutils:location}/bin/cat ${coreutils:location}/bin/cat
...@@ -311,7 +311,7 @@ link-binary = ...@@ -311,7 +311,7 @@ link-binary =
[template-balancer] [template-balancer]
< = download-base < = download-base
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 9c9741c4db7e46f3cd13c0b2f392fd5d md5sum = 16967b0dd693aaba611eb4eb6522a831
[template-logrotate-base] [template-logrotate-base]
< = template-jinja2-base < = template-jinja2-base
......
...@@ -154,6 +154,5 @@ parts += ...@@ -154,6 +154,5 @@ parts +=
{{ part_list | join('\n ') }} {{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %} {% endif %}
...@@ -10,7 +10,6 @@ parts = ...@@ -10,7 +10,6 @@ parts =
{% if use_ipv6 %}promise-tunnel{% endif %} {% if use_ipv6 %}promise-tunnel{% endif %}
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information] [publish-cloudooo-connection-information]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
...@@ -24,7 +23,7 @@ url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/ ...@@ -24,7 +23,7 @@ url = cloudooo://${cloudooo-instance:ip}:${cloudooo-instance:port}/
recipe = slapos.cookbook:generic.cloudooo recipe = slapos.cookbook:generic.cloudooo
# Network options # Network options
ip = ${slap-network-information:local-ipv4} ip = {{ (ipv4_set | list)[0] }}
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%} {% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
port = {{ tcpv4_port }} port = {{ tcpv4_port }}
openoffice-port = {{ tcpv4_port + 1 }} openoffice-port = {{ tcpv4_port + 1 }}
......
...@@ -185,5 +185,4 @@ recipe = slapos.cookbook:publish.serialised ...@@ -185,5 +185,4 @@ recipe = slapos.cookbook:publish.serialised
parts = publish parts = publish
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %} {% endif %}
...@@ -15,7 +15,6 @@ parts = ...@@ -15,7 +15,6 @@ parts =
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-kumofs-connection-information] [publish-kumofs-connection-information]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
...@@ -30,10 +29,10 @@ recipe = slapos.cookbook:generic.kumofs ...@@ -30,10 +29,10 @@ recipe = slapos.cookbook:generic.kumofs
# Network options # Network options
{% if use_ipv6 -%} {% if use_ipv6 -%}
ip = ${slap-network-information:global-ipv6} ip = {{ (ipv6_set | list)[0] }}
address-family = inet6 address-family = inet6
{% else -%} {% else -%}
ip = ${slap-network-information:local-ipv4} ip = {{ (ipv4_set | list)[0] }}
address-family = inet4 address-family = inet4
{% endif -%} {% endif -%}
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%} {% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
......
...@@ -232,5 +232,4 @@ parts = ...@@ -232,5 +232,4 @@ parts =
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %} {% endif %}
...@@ -17,5 +17,4 @@ parts += ...@@ -17,5 +17,4 @@ parts +=
publish publish
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %} {% endif %}
...@@ -215,6 +215,4 @@ parts += ...@@ -215,6 +215,4 @@ parts +=
publish publish
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% endif %} {% endif %}
...@@ -297,7 +297,6 @@ bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }} ...@@ -297,7 +297,6 @@ bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }}
[buildout] [buildout]
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
extends = extends =
{{ parameter_dict['instance-logrotate-cfg'] }} {{ parameter_dict['instance-logrotate-cfg'] }}
parts += parts +=
......
...@@ -4,7 +4,6 @@ parts = ...@@ -4,7 +4,6 @@ parts =
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
...@@ -188,7 +187,23 @@ extra-context = ...@@ -188,7 +187,23 @@ extra-context =
raw software_type mariadb raw software_type mariadb
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.recipe.build
script =
import subprocess, sys
software_type = self.buildout["slap-configuration"]["slap-software-type"]
# XXX-Antoine: We gotta find a better way to do this. I tried to check
# out how slapgrid-cp was running buildout. But it is worse than that.
args = sys.argv[:]
args += map("slap-connection:%%s=%%s".__mod__,
self.buildout["slap-connection"].iteritems())
args += ("buildout:directory=${buildout:directory}",
"buildout:installed=.installed-${:_buildout_section_name_}.cfg",
'-oc', self.options[software_type])
subprocess.check_call(args)
update_script = ${:script}
slapos_promise =
slapos_update_promise = ${:slapos_promise}
default = ${dynamic-template-erp5:rendered} default = ${dynamic-template-erp5:rendered}
# BBB # BBB
cluster = ${dynamic-template-erp5-cluster:rendered} cluster = ${dynamic-template-erp5-cluster:rendered}
...@@ -203,12 +218,3 @@ balancer = ${dynamic-template-balancer:rendered} ...@@ -203,12 +218,3 @@ balancer = ${dynamic-template-balancer:rendered}
zodb-neo = ${dynamic-template-neo:rendered} zodb-neo = ${dynamic-template-neo:rendered}
zodb-zeo = ${dynamic-template-zeo:rendered} zodb-zeo = ${dynamic-template-zeo:rendered}
zope = ${dynamic-template-zope:rendered} zope = ${dynamic-template-zope:rendered}
[slap-connection]
# part to migrate to new - separated words
computer-id = ${slap_connection:computer_id}
partition-id = ${slap_connection:partition_id}
server-url = ${slap_connection:server_url}
software-release-url = ${slap_connection:software_release_url}
key-file = ${slap_connection:key_file}
cert-file = ${slap_connection:cert_file}
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