# How to deploy or redeploy a pipeline

Once you’ve created your pipeline flow, the next step is to make it available by deploying it. On the Run page, you can deploy your pipeline in just a few seconds, depending on the chosen deployment size. You can deploy it to either the test or production environment.

For more details on how deployments are managed, see [Run Concepts](https://docs.digibee.com/documentation/developer-guide/development-cycle/overview/runtime).

<figure><img src="https://content.gitbook.com/content/jvO5S91EQURCEhbZOuuZ/blobs/N3tRyoZjM5WcydG8UNRo/RunPage_ENG.png" alt=""><figcaption></figcaption></figure>

## Deploying a pipeline

To deploy a pipeline:

1. Go to the **Run** page, select the desired environment in the upper-left corner, and click **Create**.
2. Select the pipeline and version. After selection, the Platform displays:
   * The associated project.
   * The instance, if it’s a multi-instance pipeline.
   * The trigger used in the pipeline and its details.
3. Select the Pipeline Engine version.
4. Choose the pipeline size. For multi-instance pipelines, also select the appropriate instance.
5. Define the number of simultaneous executions.
6. Specify the number of replicas for the deployment.
7. Click **Deploy**.
   * For **Pipeline-Based Model** users, a screen with the license consumption calculation will be displayed.
   * For **Subscription-Based Model** users, a screen with the RTU and subscription usage calculation will be displayed.
8. After deployment, you will be redirected to the project associated with the pipeline.

<figure><img src="https://content.gitbook.com/content/jvO5S91EQURCEhbZOuuZ/blobs/9EygOg0VWafieCc6WQpN/Pipeline_Deploy_Config_ENG.gif" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the pipeline has already been deployed, the current settings will automatically be applied to the new deployment. To learn more about pipeline deployment status, [read the documentation](https://docs.digibee.com/documentation/developer-guide/development-cycle/overview/deployment/pipeline-deployment-status).
{% endhint %}

## Redeploying a pipeline

After creating and deploying a pipeline flow, you may need to redeploy it. This can occur, for example, when a warning appears on the pipeline card, indicating that the current deployment is no longer valid.

To redeploy a pipeline:

1. Go to the **Run** page and locate the pipeline you want to redeploy.
2. Click the three dots and select **Redeploy**. The existing deployment details are displayed, including the project, instance (for multi-instance pipelines), and previously configured settings.
3. Update the options you want to change, such as:
   * Pipeline size
   * Number of concurrent executions
   * Number of replicas
4. Click **Redeploy**.

### Redeployment behavior&#x20;

During redeployment in Digibee, the existing pipeline instance is removed before a new one is created.

When the pipeline has a **single replica**, the availability impact is higher, and brief downtime may occur during the replacement.  When there are **multiple replicas**, the impact is reduced, since new instances are brought up while others are still running.\
\
If the runtime is down at the time of redeployment, no new replicas can be allocated and the pipeline will remain offline until the runtime recovers.&#x20;

{% hint style="warning" %}
Always check the runtime status before triggering a redeployment, and schedule redeployments outside of critical execution periods.&#x20;
{% endhint %}

## Deployment issues

When deploying or redeploying a pipeline, you may encounter errors that prevent the action from completing. For guidance, check our dedicated [**Deployment Issues**](https://app.gitbook.com/s/boT4qPJIk6PZotrxlJWL/deployment-issues) section under the [**Problem-Solving**](https://app.gitbook.com/o/5am26mhRi928xnprkZha/s/boT4qPJIk6PZotrxlJWL/) tab. Always refer to this section whenever an error occurs.
