The Temporal Workflow Helper is a utility designed to facilitate the submission of data to Temporal using the new Temporal Command-Line Interface (Temporal CLI). It streamlines the process of sending data to Temporal, making it easier to interact with Temporal workflows and activities.
Before using this tool, make sure you have the following environment variables set up:
PORT
: The port number to communicate with Temporal. (e.g.,3778
)TEMPORAL_MAIN_PROCESS
: Specify the main process or entry point for your Temporal workflows. Should betemporal
for localhost or/root/.temporalio/bin/temporal
, if you're using Docker.TEMPORAL_EXTERNAL_NETWORK
: Docker only. Especify your temporal network.CONFIG_TEMPORAL_PATH
: Path to.config.temporal
. It's optional, only needed when the config file is not in the root folder.
And set your .config.temporal
file to set your environments with the right parameters.
[
{
"environment": "prod", // Your environment slug
"namespace": "test_namespace", // Context namespace to this environment
"address": "temporal:7233", // Address to your Temporal Server
"ui": "http://localhost:8080" // Address to you Temporal UI
}
]
Use docker-compose
+ Makefile
to facilitate your experience. Run the command bellow to build and initiate your Helper:
make build
To install the Temporal Workflow Helper, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/gustavocarneiroa/temporal_tctl.git
-
Navigate to the project directory:
cd temporal_tctl
-
Install the necessary dependencies:
npm install
-
Install Temporal CLI:
- Bash:
curl -sSf https://temporal.download/cli.sh | sh echo export PATH="\$PATH:/root/.temporalio/bin" >> ~/.bashrc
- ZSH:
curl -sSf https://temporal.download/cli.sh | sh echo export PATH="\$PATH:/root/.temporalio/bin" >> ~/.zshrc
Once you have installed the Temporal Workflow Helper, you can use it as follows:
-
Set the required environment variables (
PORT
,TEMPORAL_MAIN_PROCESS
,TEMPORAL_EXTERNAL_NETWORK
and/orCONFIG_TEMPORAL_PATH
) in your environment or in a.env
file. You can copy the main strucuture usingcp .env.example .env
. -
Set an object with a configuration array of each of yours Temporal Servers connections in a
.config.temporal
file. You can copy the main structure usingcp .config.example.temporal .config.temporal
-
Run the TCTL Temporal Helper :
- Localhost:
node .
- Docker:
#if builded make up #else make build
-
Access your localhost with your setted
PORT
(e.g, https://localhost:3333) -
Submit data from the helper UI.
We welcome contributions to the TCTL Temporal Helper project. Feel free to fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the Temporal community for their support and contributions to this project.