# Deployments

Quickly measure how fast your teams are deploying and delivering value to customers by setting up deployments on Haystack. To configure deployments, follow the below steps

1\. Head to Deployment Settings

Head to [deployments](https://dash.usehaystack.io/hub/deployments) settings by

* clicking gear icon on first sidebar
* clicking Deployments on second sidebar

<figure><img src="https://downloads.intercomcdn.com/i/o/954575182/2b9623ada582d53c4bdeb759/3059e8fcfa68c4dd52678176296aa43a.png" alt=""><figcaption></figcaption></figure>

2\. Click on "New Service"

![](https://downloads.intercomcdn.com/i/o/923751789/38d3e459dd4e73c084d094ca/Screenshot+2024-01-03+at+7.05.05%E2%80%AFPM.png)

3\. Provide a name and description for your service

<figure><img src="https://downloads.intercomcdn.com/i/o/923752011/4627be251b3de1749d02e8bb/Screenshot+2024-01-03+at+7.05.21%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

4\. Create an environment for Deployment

Typically companies have 2 environments

* staging environment
* production environment

You'd want to set both of these separate to measure them accurately

<figure><img src="https://downloads.intercomcdn.com/i/o/924693727/7078bd1deb6fffb141160e06/Screenshot+2024-01-04+at+5.59.54%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

5\. Setup how to identify each deployment

Haystack can identify deployments based on different identifiers

1. Commit - tags each commit as a deployment
2. Pull Request - tags each pull request as a deployment
3. GitLab Deployments - tags GitLab deployments as a deployment

<figure><img src="https://downloads.intercomcdn.com/i/o/954577206/4bdbd77ccaf0331576701663/Zappy+App+Screenshot+(2).png" alt=""><figcaption></figcaption></figure>

Each option allows you to have conditional where clauses. You can filter by anything from Author, Title, Tag, Repository and more.

<figure><img src="https://downloads.intercomcdn.com/i/o/954578117/3ffa4bf7f19632a72af64597/Z.png" alt=""><figcaption></figcaption></figure>

Typically we suggest our customers to use tag your deployments using Git tags and then use that to identify deployments on Haystack

Best practices for deployment identifier

{% hint style="info" %}
If you are settings up deployment processes, we suggest tagging each deployment commit with `{env}` and `{version}` information. Ex: `prod-v1.2.3`.

The main reasons are

1. Commits are source of truth on what production runs.
2. Commits are easily revertible to old version
3. Commit tags live together with your code. Finally, a source of truth.
4. Easy to standardize across teams, projects, repositories.
5. No data lock-in. Haystack doesn't own the data, you do!
6. Easily integrated with CI tools like Jenkins, Github Actions, Circle CI, etc.
7. Complete control. You control when, how, and what system tags your releases.

As long as the whole organization is using Git, it can be standardized across all teams regardless of the tools they use.
{% endhint %}

6\. Confirm the deployments are setup correctly using the preview & save

Gain confidence on your settings by clicking the "8 deployments" link.

<figure><img src="https://downloads.intercomcdn.com/i/o/924697933/9343dc0310d14fe75d971394/Screenshot+2024-01-04+at+6.01.27%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

7\. Track deployments

You will now be able to track your teams deployments over time from both your teams[ metrics page](https://dash.usehaystack.io/hub/team/metrics) or [reports page](https://dash.usehaystack.io/hub/reports)

<figure><img src="https://downloads.intercomcdn.com/i/o/923755149/3e223c06b15f8e7484e1606d/Screenshot+2024-01-03+at+7.09.03%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>
