NOTE: This should be considered an experimental project.
This is Cosm's modification of Temporal, a workflow orchestrator.
This distribution uses go.temporal.io/server/temporal
as a Go module,
and injects configuration through environment variables (via Viper), instead of through
configuration file.
The target platform is Kubernetes for Temporal services and Postgres for default and visibility datastores (advanced visibility not yet supported), this repository hosts basic manifests in the kubernetes directory.
Environment variables use the pattern TEMPORAL_$SECTION_$ITEM
, like TEMPORAL_PUBLICCLIENT_HOST
.
See config for more options.
Ensure kubectl
and kustomize
are available on your machine.
You will also need the tctl
and temporal-sql-tool
binaries on your path:
- Clone https://github.com/temporalio/temporal
- In this directory:
make update-tctl
make temporal-sql-tool
andln -s ./temporal-sql-tool $GOBIN/temporal-sql-tool
or move the compiled binary to your $PATH.
- In this directory:
- Create the necessary Postgres databases and users (see postgres.yaml for an example script) and set the variables required in dev-migrations.sh.
- Run migrations
- Deploy to Kubernetes
kubectl apply -f kubernetes/namespace.yaml
kustomize build kubernetes/ | kubectl apply -f -
- Create Temporal namespaces (
tctl namespace register
fordefault
)
This distribution is built via goreleaser
and GitHub Actions when a new tag is created.
This tag adheres to the following conventions:
$TEMPORAL_VERSION-$DISTRIBUTION_BUILD_NUMBER
, for example:v1.18.0-0
- Only code changes should create a new tag. Changes to manifests do not require a rebuild of the distribution.
To upgrade, update the go.temporal.io/server
version in go.mod
and run go mod tidy
to refresh the lockfile.
Then push to main, and create a new tag like above, and push that.
On tag, GitHub Actions will build and publish artifacts described in .goreleaser.yaml:
In general, local development uses the Makefile and standard go
tooling.
You will need a Postgres instance with the databases, users and migrations described above.