Skip to content

Installation

Jean-Baptiste Bianchi edited this page Aug 28, 2024 · 8 revisions

This guide provides step-by-step instructions for setting up Synapse on your local machine or in a cloud environment. Synapse can be deployed using Docker, Kubernetes, or directly on your system using the provided .NET binaries.

Installation Methods

Docker Compose

The Docker Compose method allows you to run all Synapse components as Docker containers.

Prerequisites:

Steps:

  1. Download the Docker Compose file:

    wget https://raw.githubusercontent.com/serverlessworkflow/synapse/main/deployments/docker-compose/docker-compose.yml
  2. Start the Synapse services:

    docker-compose up

This will start the Synapse services as defined in the docker-compose.yml file. The API server and other components will be accessible according to the configuration in this file.

Development Installation with Docker Compose

For development purposes, if you wish to build the Docker images yourself, follow these steps:

Prerequisites:
  • Docker: Ensure that Docker is installed on your system.
  • Git: You need Git to clone the repository.
Steps:
  1. Clone the Synapse Repository:

    git clone https://github.com/serverlessworkflow/synapse.git
  2. Navigate to the Docker Compose directory:

    cd synapse/deployments/docker-compose
  3. Build the Docker images:

    docker-compose -f docker-compose.build.yml build
  4. Start the Synapse services:

    docker-compose -f docker-compose.build.yml up

Kubernetes

Deploying Synapse in a Kubernetes cluster provides a robust solution for production environments.

Prerequisites:

  • Kubernetes: Ensure you have access to a Kubernetes cluster.

  • Helm: Helm must be installed to manage Kubernetes applications. You can install Helm using the following command:

    curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Steps:

  1. Download the Synapse Helm charts:

    If you're not using a Helm repository hosted via GitHub Pages, you can manually download the Helm charts from the Synapse repository.

    wget https://github.com/serverlessworkflow/synapse/releases/download/<version>/helm-charts-<version>.tgz
  2. Install the Helm charts:

    Once you have the Helm chart tarball, you can install Synapse using Helm with the downloaded chart file.

    helm install synapse ./helm-charts-<version>.tgz

    You can customize the installation by passing additional configuration values using the --values (or -f) flag. For example:

    helm install synapse ./helm-charts-<version>.tgz --values custom-values.yaml

    Create a custom-values.yaml file if you need to override default values in the chart.

  3. Verify the installation:

    Check the status of the Synapse pods to ensure they are running correctly. This command lists the pods in the default namespace, or you can specify the namespace if Synapse was installed in a different one.

    kubectl get pods -n default

    Replace default with the appropriate namespace if Synapse was installed in a different namespace.

This will deploy Synapse components within your Kubernetes cluster. You can customize the installation using Helm values.


Running with .NET Binaries

Running Synapse directly with .NET binaries allows you to run the services without Docker or Kubernetes.

Prerequisites:

Steps:

  1. Download the latest release:

    Visit the Synapse releases page and download the appropriate binaries for your system.

  2. Extract the binaries:

    tar -xzf synapse-<version>.tar.gz
    cd synapse-<version>
  3. Run the Synapse API Server:

    dotnet Synapse.Api.Server.dll
  4. Run other components as needed:

    You can start other components (e.g., Operator, Correlator) similarly by running their respective .dll files:

    dotnet Synapse.Operator.dll

Using the synctl CLI

The synctl CLI allows you to interact with the Synapse API from the command line.

Prerequisites:

Steps:

  1. Make the binary executable:

    chmod +x synctl
  2. Set up the Synapse API server:

    synctl config set-api default -server=http://localhost:8080

You can now use synctl to create, manage, and run workflows.


Next Steps

Troubleshooting

If you encounter any issues during installation, check the troubleshooting guide or visit the discussions page for help from the community.