Skip to content

Commit

Permalink
IWF-206: Upgrade Temporal SDKs in iWF SDKs test envs
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel27m committed Oct 18, 2024
1 parent 2c77770 commit 42cfe26
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 53 deletions.
4 changes: 2 additions & 2 deletions iwf/tests/iwf-service-env/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ CASSANDRA_VERSION=3.11.9
ELASTICSEARCH_VERSION=7.16.2
MYSQL_VERSION=8
POSTGRESQL_VERSION=13
TEMPORAL_VERSION=1.20.1
TEMPORAL_UI_VERSION=2.10.1
TEMPORAL_VERSION=1.25
TEMPORAL_UI_VERSION=2.31.2
30 changes: 13 additions & 17 deletions iwf/tests/iwf-service-env/docker-compose-init.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/bin/bash

# use new version of tctl so that we can skip the prompt
tctl config set version next


checkExists () {
# see https://github.com/temporalio/temporal/issues/4160
if tctl search-attribute list | grep -q "$1"; then
if temporal operator search-attribute list | grep -q "$1"; then
return 0
else
return 1
Expand All @@ -16,31 +12,31 @@ fi
echo "now trying to register iWF system search attributes..."
for run in {1..120}; do
sleep 1
tctl search-attribute create -name IwfWorkflowType -type Keyword -y
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
sleep 0.1
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
sleep 0.1
tctl search-attribute create -name IwfGlobalWorkflowVersion -type Int -y
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
sleep 0.1
tctl search-attribute create -name IwfExecutingStateIds -type Keyword -y
temporal operator search-attribute create --name CustomKeywordField --type Keyword
sleep 0.1
tctl search-attribute create -name CustomKeywordField -type Keyword -y
temporal operator search-attribute create --name CustomIntField --type Int
sleep 0.1
tctl search-attribute create -name CustomIntField -type Int -y
temporal operator search-attribute create --name CustomBoolField --type Bool
sleep 0.1
tctl search-attribute create -name CustomBoolField -type Bool -y
temporal operator search-attribute create --name CustomDoubleField --type Double
sleep 0.1
tctl search-attribute create -name CustomDoubleField -type Double -y
temporal operator search-attribute create --name CustomDatetimeField --type Datetime
sleep 0.1
tctl search-attribute create -name CustomDatetimeField -type Datetime -y
temporal operator search-attribute create --name CustomStringField --type Text
sleep 0.1
tctl search-attribute create -name CustomStringField -type text -y

if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField" ] ; then
if checkExists "IwfWorkflowType" && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField"; then
echo "All search attributes are registered"
break
fi

done

tctl namespace register default

tail -f /dev/null
tail -f /dev/null
69 changes: 35 additions & 34 deletions iwf/tests/iwf-service-env/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,80 @@ services:
elasticsearch:
container_name: temporal-elasticsearch-iwf
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms256m -Xmx256m
- xpack.security.enabled=false
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms256m -Xmx256m
- xpack.security.enabled=false
image: elasticsearch:${ELASTICSEARCH_VERSION}
networks:
- temporal-network
- temporal-network
expose:
- 9200
- 9200
postgresql:
container_name: temporal-postgresql-iwf
environment:
POSTGRES_PASSWORD: temporal
POSTGRES_USER: temporal
image: postgres:${POSTGRESQL_VERSION}
networks:
- temporal-network
- temporal-network
expose:
- 5432
- 5432
temporal:
container_name: temporal-iwf
depends_on:
- postgresql
- elasticsearch
- postgresql
- elasticsearch
environment:
- DB=postgresql
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
- ENABLE_ES=true
- ES_SEEDS=elasticsearch
- ES_VERSION=v7
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
- ENABLE_ES=true
- ES_SEEDS=elasticsearch
- ES_VERSION=v7
image: temporalio/auto-setup:${TEMPORAL_VERSION}
networks:
- temporal-network
- temporal-network
ports:
- 7233:7233
- 7233:7233
labels:
kompose.volume.type: configMap
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:
container_name: temporal-admin-tools-iwf
depends_on:
- temporal
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:${TEMPORAL_VERSION}
networks:
- temporal-network
- temporal-network
stdin_open: true
tty: true
volumes:
- ./docker-compose-init.sh:/etc/temporal/init.sh
- ./docker-compose-init.sh:/etc/temporal/init.sh
entrypoint: sh -c "/etc/temporal/init.sh"
iwf-server:
container_name: iwf-server
image: iworkflowio/iwf-server:latest #NOTE: you can change to version tag like v1.0.0-RC6
environment:
- AUTO_FIX_WORKER_URL=172.17.0.1 # this will let iwf-server automatically replace all iwfWorkerUrls of "localhost" or "127.0.0.1" with "host.docker.internal"
- AUTO_FIX_WORKER_URL=172.17.0.1 # this will let iwf-server automatically replace all iwfWorkerUrls of "localhost" or "127.0.0.1" with "host.docker.internal"
networks:
- temporal-network
- temporal-network
ports:
- 8801:8801
- 8801:8801
depends_on:
- temporal
- temporal
extra_hosts:
- "host.docker.internal:host-gateway"
- "host.docker.internal:host-gateway"
networks:
temporal-network:
driver: bridge
Expand Down

0 comments on commit 42cfe26

Please sign in to comment.