fix: add Elasticsearch visibility and modernize TLS samples#147
fix: add Elasticsearch visibility and modernize TLS samples#147chaptersix wants to merge 7 commits intomainfrom
Conversation
The tls-full sample failed to start with recent Temporal server versions because it lacked an Elasticsearch visibility store, which is now required. Changes to both tls-simple and tls-full: - Replace auto-setup image with server + admin-tools setup pattern - Add Elasticsearch service for advanced visibility - Add health checks and proper dependency ordering - Add create-namespace service using shared compose scripts - Update docker-compose to docker compose (v2) - Update READMEs for modern CLI usage Changes specific to tls-full: - Convert config_template.yaml from dockerize syntax to sprig env() syntax with # enable-template directive - Add TEMPORAL_SERVER_CONFIG_FILE_PATH for custom template loading - Remove obsolete kafka and unused DB backend sections - Add dynamicconfig/development-cass.yaml CI: - Add .github/workflows/tls.yaml to test both TLS samples - Runs on all pull requests Closes #100
Remove dead/unused sections: cassandra visibility datastore (ES is always used), ENABLE_ES conditional, metrics, dcRedirectionPolicy, archival, internal-frontend service, and hardcode ports that were never overridden. Also remove unused cassandra auth and TLS fields.
The Temporal server container runs as non-root, so mounted cert files need world-readable permissions. Also strips config_template.yaml down to only TLS-relevant sections.
Remove path filtering on pull_request so all jobs run on every PR. Merge tls.yaml jobs into compose.yaml and delete the separate file.
The system worker was failing to connect to frontend because frontend requires mTLS but the worker was connecting over plaintext. Add systemWorker TLS config using the internode cert, which frontend already trusts. Also remove the dynamicconfig directory and config since the server falls back to a noop client when none is configured, and document how the config diverges from the default development-cass-es.yaml.
stuart-wells
left a comment
There was a problem hiding this comment.
Was going to work on a smaller-scale cleanup PR but this covers all of that and more. Just a couple small comments.
| To preview the rendered config inside the container: | ||
|
|
||
| ```bash | ||
| docker compose exec temporal temporal-server --config-file /etc/temporal/config/config_template.yaml render-config |
There was a problem hiding this comment.
I couldn't get this to run successfully as-is, the server came up but render-config wasn't working.
From poking around with Claude and validating myself: the legacy loader is getting called, and doesn't use the --config-file directive so it's only looking for base.yaml, env.yaml, or env_az.yaml from what I can tell: temporal:loader.go. This probably should be a fix to respect --config-file in render-config, but for now this could be side-stepped by having the config_template.yaml mount at development.yaml in the docker-compose?
|
|
||
| Environment variables are set up to provide the `development` and `accounting` containers with access to namespaces with the respective names. | ||
| (You'll have to create them first with `tctl namespace register`.) | ||
| The `default` namespace is created automatically on startup. |
There was a problem hiding this comment.
Any value in still mentioning temporal operator namespace create -n <namespace> to provide the info of the deleted line?
Summary
Fixes the tls-full and tls-simple samples which fail to start with recent Temporal server versions. Modernizes both to follow the same patterns as the compose examples.
auto-setupimage withserver+admin-toolssetup patternconfig_template.yamlfrom dockerize syntax to sprigenv()with# enable-templatedirective, strip to TLS-relevant config onlysystemWorkerTLS config so the internal system worker can connect to frontend over mTLSdynamicconfigdirectory (server uses a noop client when none is configured)config_template.yamldiverges from the defaultdevelopment-cass-es.yaml, including a commented-outinternal-frontendalternativecreate-namespaceservice using shared compose scriptscompose.yamldocker composeandtemporalCLICloses #100
Test plan
compose.yamlworkflow runs all compose + TLS jobs on this PR