-
Notifications
You must be signed in to change notification settings - Fork 8
Configure local develop env to use Temporal auto-setup for configurability #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,16 @@ | ||
| # Use temporalio/auto-setup tags: https://hub.docker.com/r/temporalio/auto-setup/tags | ||
| TEMPORAL_A_VERSION=1.29.4 | ||
| TEMPORAL_B_VERSION=1.22.7 | ||
|
Comment on lines
+2
to
+3
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. example values - but these can connect ! (didn't validate a full replica) |
||
|
|
||
| # Use temporalio/admin-tools tags: https://hub.docker.com/r/temporalio/admin-tools/tags | ||
| # In general : use max(TEMPORAL_A_VERSION, TEMPORAL_B_VERSION) | ||
| TEMPORAL_CLI_VERSION=1.29.4 | ||
|
|
||
| # Infrastructure versions | ||
| # TODO: currently shared by both servers, this could be independent. | ||
| POSTGRESQL_VERSION=16 | ||
| ELASTICSEARCH_VERSION=7.17.27 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In future - could make this more configurable. I think I'm avoiding making this too comprehensive. We'll need a more-robust test harness for validating version connectivity - and I don't think docker compose and shell scripts are the solution for that. As a followup, I'll look into adding a testcontainers harness which iterates through Temporal Server versions (and later backend configurations) to validate different functionality (connectivity, unidirectional replica, bidirectional replica, etc) |
||
|
|
||
| # External Ports (exposed via localhost) | ||
| TEMPORAL_A_EXTERNAL_PORT=4000 | ||
| TEMPORAL_B_EXTERNAL_PORT=5000 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| services: | ||
| postgres-a: | ||
| image: postgres:${POSTGRESQL_VERSION} | ||
| environment: | ||
| POSTGRES_USER: temporal | ||
| POSTGRES_PASSWORD: temporal | ||
| networks: | ||
| - develop | ||
| healthcheck: | ||
| test: [CMD, pg_isready, -U, temporal] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 10 | ||
|
|
||
| elasticsearch-a: | ||
| image: elasticsearch:${ELASTICSEARCH_VERSION} | ||
| environment: | ||
| discovery.type: single-node | ||
| xpack.security.enabled: "false" | ||
| ES_JAVA_OPTS: "-Xms256m -Xmx256m" | ||
| networks: | ||
| - develop | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - "curl -s http://localhost:9200/_cluster/health | grep -qv '\"status\":\"red\"'" | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 12 | ||
|
|
||
| temporal-a: | ||
| image: temporalio/auto-setup:${TEMPORAL_A_VERSION} | ||
| environment: | ||
| DB: postgres12 | ||
| DB_PORT: 5432 | ||
| POSTGRES_SEEDS: postgres-a | ||
| POSTGRES_USER: temporal | ||
| POSTGRES_PWD: temporal | ||
| ENABLE_ES: "true" | ||
| ES_SEEDS: elasticsearch-a | ||
| ES_PORT: 9200 | ||
| ES_VERSION: v7 | ||
| VISIBILITY_TYPE: elasticsearch | ||
| ports: | ||
| - "${TEMPORAL_A_EXTERNAL_PORT}:${TEMPORAL_INTERNAL_PORT}" | ||
| - "${TEMPORAL_A_UI_EXTERNAL_PORT}:${TEMPORAL_UI_INTERNAL_PORT}" | ||
| networks: | ||
| - develop | ||
| depends_on: | ||
| postgres-a: | ||
| condition: service_healthy | ||
| elasticsearch-a: | ||
| condition: service_healthy | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - "temporal operator cluster health --address $(hostname -i):${TEMPORAL_INTERNAL_PORT}" | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 30 | ||
| start_period: 30s |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| services: | ||
| postgres-b: | ||
| image: postgres:${POSTGRESQL_VERSION} | ||
| environment: | ||
| POSTGRES_USER: temporal | ||
| POSTGRES_PASSWORD: temporal | ||
| networks: | ||
| - develop | ||
| healthcheck: | ||
| test: [CMD, pg_isready, -U, temporal] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 10 | ||
|
|
||
| elasticsearch-b: | ||
| image: elasticsearch:${ELASTICSEARCH_VERSION} | ||
| environment: | ||
| discovery.type: single-node | ||
| xpack.security.enabled: "false" | ||
| ES_JAVA_OPTS: "-Xms256m -Xmx256m" | ||
| networks: | ||
| - develop | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - "curl -s http://localhost:9200/_cluster/health | grep -qv '\"status\":\"red\"'" | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 12 | ||
|
|
||
| temporal-b: | ||
| image: temporalio/auto-setup:${TEMPORAL_B_VERSION} | ||
| environment: | ||
| DB: postgres12 | ||
| DB_PORT: 5432 | ||
| POSTGRES_SEEDS: postgres-b | ||
| POSTGRES_USER: temporal | ||
| POSTGRES_PWD: temporal | ||
| ENABLE_ES: "true" | ||
| ES_SEEDS: elasticsearch-b | ||
| ES_PORT: 9200 | ||
| ES_VERSION: v7 | ||
| VISIBILITY_TYPE: elasticsearch | ||
| ports: | ||
| - "${TEMPORAL_B_EXTERNAL_PORT}:${TEMPORAL_INTERNAL_PORT}" | ||
| - "${TEMPORAL_B_UI_EXTERNAL_PORT}:${TEMPORAL_UI_INTERNAL_PORT}" | ||
| networks: | ||
| - develop | ||
| depends_on: | ||
| postgres-b: | ||
| condition: service_healthy | ||
| elasticsearch-b: | ||
| condition: service_healthy | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - "temporal operator cluster health --address $(hostname -i):${TEMPORAL_INTERNAL_PORT}" | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 30 | ||
| start_period: 30s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serverVersion|server_versionFor Temporal Server compatibility.