This is a playground for experimenting with Temporal Nexus.
See handler/service.go for some sample Nexus Operations.
git clone https://github.com/prasek/nexus-playground
cd nexus-playground
brew install temporalio/brew/tcld
brew install temporal
Choose local dev or Temporal Cloud:
mkdir -p $HOME/nexus-demo/certs
tcld gen ca --org temporal -d 1y --ca-cert $HOME/nexus-demo/certs/ca.pem --ca-key $HOME/nexus-demo/certs/ca.key
edit setEnv.sh and set the following to match your config:
export TEMPORAL_ACCOUNT="12345"
# Certs path for namespace creation and workers
export TEMPORAL_TLS_CERT="$HOME/nexus-demo/certs/ca.pem"
export TEMPORAL_TLS_KEY="$HOME/nexus-demo/certs/ca.key"
# Namespace without account suffix
export TEMPORAL_NAMESPACE_CALLER_BASE="my-caller-namespace"
export TEMPORAL_NAMESPACE_HANDLER_BASE="my-target-namespace"
export TEMPORAL_NAMESPACE_REGION="us-east-1"
# Nexus endpoint name that will be used
export NEXUS_ENDPOINT="my-nexus-endpoint"
./cloud-namespaces.sh
./cloud-init.sh
Handler worker:
./cloud-run.sh handler
Caller
./cloud-run.sh caller
https://cloud.temporal.io/nexus
Done.
Alternatively, create a local environment with the instructions below.
./local-dev-server.sh
In the output, find the UI address, for example:
+ temporal server start-dev --dynamic-config-value system.enableNexus=true --http-port 7243
CLI 1.1.0 (Server 1.25.0, UI 2.30.3)
Server: localhost:7233
UI: http://localhost:8233
Metrics: http://localhost:60411/metrics
cd docker
docker-compose up
The UI address for this docker-compose.yml is: http://localhost:8080
Note: when shutting down use the --volumes
flag to get clean state:
docker-compose down --volumes
Create namespaces and a Nexus endpoint:
./local-init.sh
Handler worker:
./local-run.sh handler
Caller worker:
./local-run.sh caller
See getting started and follow the instructions there.
Done.