GitHub
The 10x Engine employs a GitOps approach to configuration management, offering a secure, version-controlled solution across distributed environments.
The @github launch macro enables the engine to pull YAML config, JavaScript, text/geo lookup, and Symbol library files from GitHub at startup.
The engine can poll the remote branch for changes at a specified interval (e.g., 5min), allowing distributed 10x apps to synchronize and reload updated configurations.
Pulled files are extracted to a temporary directory (archives are automatically unpacked).
k8s
When deploying 10x apps to k8s, the provided Helm charts can use init containers to pull configuration from GitHub, enabling container immutability.
To learn more see deploying apps.
Config
To specify a @GitHub launch macro via a YAML config file:
include:
tenx: run
- source: github
options:
# 'enabled' controls whether to enable this pull config
enabled: true
# 'token' specifies an access token for accessing the Github repo.
# To learn more see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
token: $=TenXEnv.get("GH_TOKEN")
# 'repo' specifies the GitHub user/repo name from which to pull files
repo: my-user/my-repo
# 'branch' on 'repo' (if null, use repo default branch)
branch: main
# 'paths' specifies Glob patterns within 'repo' to pull and extract to a temp folder.
paths:
- config/*.yaml # https://doc.log10x.com/config/yaml
- symbols/*.10x.tar # https://doc.log10x.com/run/symbol
- lookups/*.csv # https://doc.log10x.com/api/js/#TenXLookup
- scripts/*.js # https://doc.log10x.com/api/js/
# 'syncInterval' specifies an interval by which to poll the remote branch for updates, set null for none.
syncInterval: 5min
CLI
You can specify a @github launch macro via the CLI
as a JSON object by bash-escaping its contents.
For example: