Commit f5c6253d authored by Yusei Tahara's avatar Yusei Tahara

software/metabase: Add input parameters for password complexity.

parent a2272d7d
Pipeline #26322 failed with stage
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = e0f4847f08e0062ea5a6ba492318afc7 md5sum = 0e109afd93153ecf062ad5e76bc86ea4
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"mb_password_complexity": {
"title": "Password complexity",
"description": "Check Metabase documentation for more details.",
"type": "string",
"default": "normal",
"enum": [
"weak",
"normal",
"strong",
]
},
"mb_password_length": {
"title": "Password length",
"description": "Password length",
"type": "integer",
"default": 6,
}
}
}
...@@ -25,6 +25,15 @@ fonts = ...@@ -25,6 +25,15 @@ fonts =
includes = includes =
${fontconfig:location}/etc/fonts/conf.d ${fontconfig:location}/etc/fonts/conf.d
[slap-parameter]
recipe = slapos.recipe.build
slapparameter-dict = $${slap-configuration:configuration}
home = $${buildout:directory}
init =
default_parameters = options.get('slapparameter-dict')
options['mb_password_complexity'] = default_parameters.get('mb_password_complexity', 'normal')
options['mb_password_length'] = default_parameters.get('mb_password_length', 6)
[metabase-instance] [metabase-instance]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:service}/$${:_buildout_section_name_} wrapper-path = $${directory:service}/$${:_buildout_section_name_}
...@@ -46,6 +55,8 @@ environment = ...@@ -46,6 +55,8 @@ environment =
MB_DB_USER=$${postgresql:superuser} MB_DB_USER=$${postgresql:superuser}
MB_DB_PASS=$${postgresql:password} MB_DB_PASS=$${postgresql:password}
MB_DB_HOST=$${postgresql:ipv4} MB_DB_HOST=$${postgresql:ipv4}
MB_PASSWORD_COMPLEXITY=$${slap-parameter:mb_password_complexity}
MB_PASSWORD_LENGTH=$${slap-parameter:mb_password_length}
FONTCONFIG_FILE=$${fontconfig-conf:output} FONTCONFIG_FILE=$${fontconfig-conf:output}
JAVA_ARGS=-Dorg.quartz.scheduler.instanceId=$${slap-connection:computer-id}.$${slap-connection:partition-id} -Djava.io.tmpdir="$${directory:tmp}" JAVA_ARGS=-Dorg.quartz.scheduler.instanceId=$${slap-connection:computer-id}.$${slap-connection:partition-id} -Djava.io.tmpdir="$${directory:tmp}"
hash-existing-files = hash-existing-files =
......
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