• Alain Takoudjou's avatar
    rewrite stack lamp and make it works with php7 · 3d473964
    Alain Takoudjou authored
    Stack LAMP was not used for years so it was completely outdated was not working anymore.
    The stack was rewritten to make it works with php7.3
    Use mariadb from stack/erp5 because we won't code again all feature done there for mariadb, initialization and backup to have it up-to-date.
    Delete old files which are not used anymore
    Remove integrated resilience scripts, resilience will works with webrunner which is more stable today.
    3d473964
instance.cfg.in 3.51 KB
[buildout]

parts =
  switch_softwaretype

eggs-directory = {{ buildout_egg_directory }}
develop-eggs-directory = {{ buildout_develop_directory }}
offline = true

[switch_softwaretype]
#recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-lamp:rendered
RootSoftwareInstance = ${:default}
mariadb = dynamic-template-mariadb:rendered
apache = dynamic-template-apache-php:rendered

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}

[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
mode = 0644
extra-context =
context =
  key develop_eggs_directory buildout:develop-eggs-directory
  key eggs_directory buildout:eggs-directory
  key ipv4 slap-configuration:ipv4
  key ipv6 slap-configuration:ipv6
  key slapparameter_dict slap-configuration:configuration
  key computer_id slap-configuration:computer
  raw template_monitor {{ template_monitor }}
  raw openssl_location {{ openssl_location }}
  raw logrotate_cfg {{ logrotate_cfg }}
  ${:extra-context}


[dynamic-template-lamp-parameters]


[dynamic-template-lamp]
<= jinja2-template-base
template = {{ template_lamp }}
filename = template-lamp.cfg
extra-context =
  section parameter_dict dynamic-template-lamp-parameters

[dynamic-template-apache-php-parameters]
application-location = {{ application_location }}
application-part-list = {{ application_deployment_part_list }}
template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }}
apache-php-location = {{ apache_php_location }}
template-php-ini = {{ template_php_ini }}

# XXX no failure if `custom_application_template` is empty
[application-parameters]
custom-application-template = {{ custom_application_template }}

[dynamic-template-apache-php]
<= jinja2-template-base
template = {{ template_apache_php }}
filename = template-apache-php.cfg
extra-context =
  key custom_application_template application-parameters:custom-application-template
  section parameter_dict dynamic-template-apache-php-parameters

[dynamic-template-mariadb-parameters]
bash = {{ bash_location }}
coreutils-location = {{ coreutils_location }}
dash-location = {{ dash_location }}
findutils-location = {{ findutils_location }}
gzip-location = {{ gzip_location }}
mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
mariadb-slow-query-report-script = {{ mariadb_slow_query_report_script }}
mariadb-start-clone-from-backup = {{ mariadb_start_clone_from_backup }}
promise-check-slow-queries-digest-result = {{ bin_directory }}/check-slow-queries-digest-result
percona-tools-location = {{ percona_toolkit_location }}
unixodbc-location = {{ unixodbc_location }}
check-computer-memory-binary = {{ bin_directory }}/check-computer-memory
bin-directory = {{ bin_directory }}

[dynamic-template-mariadb]
<= jinja2-template-base
template = {{ template_mariadb }}
filename = instance-mariadb.cfg
extra-context =
    key ipv4_set slap-configuration:ipv4
    key ipv6_set slap-configuration:ipv6
    raw bin_directory {{ bin_directory }}
    section parameter_dict dynamic-template-mariadb-parameters