mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-10 18:58:10 +02:00
Introduce filter_plugins/jvm_filters.py with jvm_max_mb/jvm_min_mb. Derive Xmx/Xms from docker mem_limit/mem_reservation using safe rules: Xmx=min(70% limit, limit-1024MB, 12288MB), floored at 1024MB; Xms=min(Xmx/2, reservation, Xmx), floored at 512MB. Parse human-readable sizes (k/m/g/t) with binary units. Wire filters into roles: set JVM_MINIMUM_MEMORY/JVM_MAXIMUM_MEMORY via filters; stop relying on host RAM. Keep env templates simple and stable. Add unit tests under tests/unit/filter_plugins/test_jvm_filters.py covering typical sizes, floors, caps, invalid inputs, and entity-name derivation. Ref: https://chatgpt.com/share/68d3b9f6-8d18-800f-aa8d-8a743ddf164d
43 lines
2.3 KiB
YAML
43 lines
2.3 KiB
YAML
# General
|
|
application_id: "web-app-confluence"
|
|
database_type: "postgres"
|
|
entity_name: "{{ application_id | get_entity_name }}"
|
|
|
|
# Container
|
|
container_port: 8090
|
|
container_hostname: "{{ domains | get_domain(application_id) }}"
|
|
|
|
# Confluence
|
|
|
|
## URLs
|
|
CONFLUENCE_URL: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
|
|
CONFLUENCE_HOSTNAME: "{{ container_hostname }}"
|
|
CONFLUENCE_HOME: "/var/atlassian/application-data/confluence"
|
|
|
|
## OIDC
|
|
CONFLUENCE_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc') }}"
|
|
CONFLUENCE_OIDC_LABEL: "{{ OIDC.BUTTON_TEXT }}"
|
|
CONFLUENCE_OIDC_CLIENT_ID: "{{ OIDC.CLIENT.ID }}"
|
|
CONFLUENCE_OIDC_CLIENT_SECRET: "{{ OIDC.CLIENT.SECRET }}"
|
|
CONFLUENCE_OIDC_ISSUER: "{{ OIDC.CLIENT.ISSUER_URL }}"
|
|
CONFLUENCE_OIDC_AUTH_URL: "{{ OIDC.CLIENT.AUTHORIZE_URL }}"
|
|
CONFLUENCE_OIDC_TOKEN_URL: "{{ OIDC.CLIENT.TOKEN_URL }}"
|
|
CONFLUENCE_OIDC_USERINFO_URL: "{{ OIDC.CLIENT.USER_INFO_URL }}"
|
|
CONFLUENCE_OIDC_LOGOUT_URL: "{{ OIDC.CLIENT.LOGOUT_URL }}"
|
|
CONFLUENCE_OIDC_JWKS_URL: "{{ OIDC.CLIENT.CERTS }}"
|
|
CONFLUENCE_OIDC_SCOPES: "openid,email,profile"
|
|
CONFLUENCE_OIDC_UNIQUE_ATTRIBUTE: "{{ OIDC.ATTRIBUTES.USERNAME }}"
|
|
|
|
## Docker
|
|
CONFLUENCE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ entity_name ~ '.version') }}"
|
|
CONFLUENCE_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ entity_name ~ '.image') }}"
|
|
CONFLUENCE_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.' ~ entity_name ~ '.name') }}"
|
|
CONFLUENCE_DATA_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
|
CONFLUENCE_CUSTOM_IMAGE: "{{ CONFLUENCE_IMAGE }}_custom"
|
|
|
|
## Performance (derive from container limits in config/main.yml)
|
|
CONFLUENCE_JVM_MAX: "{{ applications | jvm_max_mb(application_id) }}m"
|
|
CONFLUENCE_JVM_MIN: "{{ applications | jvm_min_mb(application_id) }}m"
|
|
|
|
## Options
|
|
CONFLUENCE_TRUST_STORE_ENABLED: "{{ applications | get_app_conf(application_id, 'truststore_enabled') }}" |