Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
103
Merge Requests
103
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
7865ba89
Commit
7865ba89
authored
Apr 13, 2023
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/lamp: make the stack more configurable
parent
e3a2eb2e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
27 deletions
+36
-27
stack/lamp/apache.conf.in
stack/lamp/apache.conf.in
+4
-1
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+3
-0
stack/lamp/buildout.hash.cfg
stack/lamp/buildout.hash.cfg
+4
-4
stack/lamp/instance-apache-php.cfg.in
stack/lamp/instance-apache-php.cfg.in
+22
-1
stack/lamp/instance-lamp.cfg.jinja2.in
stack/lamp/instance-lamp.cfg.jinja2.in
+2
-21
stack/lamp/instance.cfg.in
stack/lamp/instance.cfg.in
+1
-0
No files found.
stack/lamp/apache.conf.in
View file @
7865ba89
...
@@ -82,4 +82,7 @@ LoadModule rewrite_module modules/mod_rewrite.so
...
@@ -82,4 +82,7 @@ LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule headers_module modules/mod_headers.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule filter_module modules/mod_filter.so
LoadModule filter_module modules/mod_filter.so
LoadModule php_module modules/libphp.so
LoadModule php{{ '_module modules/libphp' if parameter_dict['enable-php8'] else '7_module modules/libphp7' }}.so
{% for module in parameter_dict['php-module-list'].split('\n') -%}
LoadModule {{ module.strip() }}
{% endfor -%}
stack/lamp/buildout.cfg
View file @
7865ba89
...
@@ -64,6 +64,8 @@ part-list =
...
@@ -64,6 +64,8 @@ part-list =
# database information
# database information
db-name = lamp
db-name = lamp
db-user = lamp
db-user = lamp
# Publish default lamp slave frontend url
default-frontend = True
#----------------
#----------------
#-- Instance-level buildout profiles.
#-- Instance-level buildout profiles.
...
@@ -115,6 +117,7 @@ context =
...
@@ -115,6 +117,7 @@ context =
key custom_application_template custom-application-deployment:path
key custom_application_template custom-application-deployment:path
key db_name custom-application-deployment:db-name
key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user
key db_user custom-application-deployment:db-user
key default_frontend custom-application-deployment:default-frontend
key lamp_apache_httpd template-apache-httpd:target
key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php]
[instance-apache-php]
...
...
stack/lamp/buildout.hash.cfg
View file @
7865ba89
...
@@ -14,19 +14,19 @@
...
@@ -14,19 +14,19 @@
# not need these here).
# not need these here).
[lamp-instance]
[lamp-instance]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
5b0d577a3105d9dceff8bec95a37a411
md5sum =
0fa7f628756b7ba10b651fe5549def89
[instance-apache-php]
[instance-apache-php]
filename = instance-apache-php.cfg.in
filename = instance-apache-php.cfg.in
md5sum =
0ddf9b4615d330813d87ac1d1a6f6cee
md5sum =
dc50394f5ae5642551cda266e3597a16
[instance-lamp]
[instance-lamp]
filename = instance-lamp.cfg.jinja2.in
filename = instance-lamp.cfg.jinja2.in
md5sum =
347ddf1516bf2ddb5f6fb23539382847
md5sum =
de1f450a80547d12334b712016138078
[template-apache.conf]
[template-apache.conf]
filename = apache.conf.in
filename = apache.conf.in
md5sum =
e49410f0a4bf28993a56bb28aff0a6f0
md5sum =
fe63dd5039428f4ee451bef98ccfaa2e
[template-php.ini]
[template-php.ini]
filename = php.ini.in
filename = php.ini.in
...
...
stack/lamp/instance-apache-php.cfg.in
View file @
7865ba89
...
@@ -154,7 +154,7 @@ context =
...
@@ -154,7 +154,7 @@ context =
[apache-php-conf]
[apache-php-conf]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
url = {{ parameter_dict['template-apache-conf'] }}
url = {{ parameter_dict['template-apache-conf'] }}
output = ${directory:etc}/apache.conf
graceful
output = ${directory:etc}/apache.conf
context =
context =
section parameter_dict apache-php-configuration
section parameter_dict apache-php-configuration
extensions = jinja2.ext.do
extensions = jinja2.ext.do
...
@@ -233,6 +233,27 @@ command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
...
@@ -233,6 +233,27 @@ command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
<= monitor-publish
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
recipe = slapos.cookbook:publish.serialised
backend-url = ${apache-php-configuration:url}
backend-url = ${apache-php-configuration:url}
{% if parameter_dict['publish-frontend'] -%}
url = ${lamp-frontend-promise:url}
{% endif -%}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Instance Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = ${apache-php-configuration:url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
#----------------
#----------------
...
...
stack/lamp/instance-lamp.cfg.jinja2.in
View file @
7865ba89
...
@@ -30,11 +30,13 @@ config-{{ key }} = {{ dumps(value) }}
...
@@ -30,11 +30,13 @@ config-{{ key }} = {{ dumps(value) }}
config-monitor-passwd = ${monitor-instance-parameter:password}
config-monitor-passwd = ${monitor-instance-parameter:password}
config-database-list = ${request-mariadb:connection-database-list}
config-database-list = ${request-mariadb:connection-database-list}
return =
return =
url
backend-url
backend-url
monitor-base-url
monitor-base-url
{% do part_list.append('request-apache') -%}
{% do part_list.append('request-apache') -%}
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do publish_dict.__setitem__('url', '${request-apache:connection-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
[request-mariadb]
[request-mariadb]
...
@@ -59,27 +61,6 @@ return =
...
@@ -59,27 +61,6 @@ return =
{% do publish_dict.__setitem__('mariadb-url-list', '${request-mariadb:connection-database-list}') -%}
{% do publish_dict.__setitem__('mariadb-url-list', '${request-mariadb:connection-database-list}') -%}
{% do monitor_base_url_dict.__setitem__('mariadb', '${request-mariadb:connection-monitor-base-url}') -%}
{% do monitor_base_url_dict.__setitem__('mariadb', '${request-mariadb:connection-monitor-base-url}') -%}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Instance Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = ${request-apache:connection-backend-url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
config-custom-domain = {{ slapparameter_dict.get('custom-domain', '') }}
{% do publish_dict.__setitem__('url', '${lamp-frontend-promise:url}') -%}
[publish-early]
[publish-early]
recipe = slapos.cookbook:publish-early
recipe = slapos.cookbook:publish-early
-init =
-init =
...
...
stack/lamp/instance.cfg.in
View file @
7865ba89
...
@@ -68,6 +68,7 @@ template-apache-conf = {{ template_apache_conf }}
...
@@ -68,6 +68,7 @@ template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }}
apache-location = {{ apache_location }}
apache-php-location = {{ apache_php_location }}
apache-php-location = {{ apache_php_location }}
template-php-ini = {{ template_php_ini }}
template-php-ini = {{ template_php_ini }}
publish-frontend = !py!{{ default_frontend }}
# XXX no failure if `custom_application_template` is empty
# XXX no failure if `custom_application_template` is empty
[application-parameters]
[application-parameters]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment