Customization
Each service can be fully customized to reflect specific needs, thanks to the following super-map variable:
dalet_flex_services_custom: {}
Once defined in your platform specifics, the default service map is merged with yours and any change you make will supersed the default ones. This allows for settings specific per-service memory settings, changing log level, passing specific command-line arguments and whatnots.
Each service can be fine-tuned following the given parameters:
SERVICE_NAME: # string, used as service identifier
type: TYPE # string, used for pre-defined service composition templating. One of:
# custom: Flex services requiring their own template (FSP, publish).
# enterprise: Master and Job enterprise services.
# instream: InStream scheduler services, next to Flex.
# nginx: NGinx Proxy (warning: ports cannot be overriden).
# nodejs: Standard Flex services based on Node.JS.
# springboot: Standard Flex services based on Java SpringBoot.
# system: No templating. Only used to store system applications settings.
group: string # Ansible inventory group name where the service is meant to be deployed
ports: DICT # A map of key/value ports definitions the service is binding
KEY: PORT_NUMBER # Key/Value portmap, e.g. api: 8080, metrics: 9000
memory: # Service container memory limits, based on platform's chosen memory profile
legacy: string # Memory limit for 'legacy' profile, e.g. 1024m
standard: string # Memory limit for 'standard' profile, e.g. 1024m
high: string # Memory limit for 'high' profile, e.g. 1024m
registry: string # optional, URI to a service-specific registry to pull container image from
volumes: ARRAY # optional, list of extra volumes required to be mounted within runtime container
- host_volume: string # filesystem path on host to be mounted in service's container
container_volume: string # mount point in service's container to mount host volume to
links: ARRAY(string) # optional, list of container services to be linked together from network perspective
heap: # optional (when applicable, e.g. Java services)
legacy: string # Memory heap setting for 'legacy' profile, e.g. 2g
standard: string # Memory heap setting for 'standard' profile, e.g. 2g
high: string # Memory heap setting for 'high' profile, e.g. 2g
jemalloc: bool # optional, whether to use jemalloc memory allocator (default: false)
loglevel: string # optional, enforce service log level to a specific threshold (default: none)
debug: bool # optional, whether to enable debugging information (default: false)
environment: DICT # optional, a map of environment variables to be passed to service container
KEY: string # Key/Value environment variable name and value, e.g. HOME: /root
args: string # optional, extra command line arguments to be passed to service container
version: string # optional, pinned container image version to override release's default
lb: # optional, configuration settings when service is exposed through load-balancer
hosts: ARRAY(string) # optional, list of domain prefix to be used as matching ACL (e.g. SERVICE.acme.com)
paths: ARRAY(string) # optional, list of URL path to be used as matching ACL (e.g. /workflow/)
healthcheck_path: string # optional, URL path to specific endpoint to be queried by load-balancer for check
http_check_code: int # optional, expected backend HTTP code for healthchecks (defaults to 200)
stickiness: bool # optional, instruct load-balancer to use session cookies to alwasy route
requests from a given client to the same backend (when healthy). Defaults to false.
Should you have your own extra services, they can be added to the custom map as well, provided they fit the format described above.
Supposing you have a specific version of a given service, pulled from you very own registry, requiring to be started with specific command-line arguments, this can be achieved through:
dalet_flex_services_custom:
flex-whatever-service:
registry: acme.com/flex
version: x.y.z
args: 'my own command-line'
the rest of service's parameters being the default ones.