# Add services and pipelines

After creating the main application, you need to add the components to the application. These components are known as services/microservices. A microservice is always associated with an application. To know more about how to create an application, click [here](https://docs.opsmx.com/products/opsmx-intelligent-software-delivery-platform/system-setup/applications/add-applications).&#x20;

## To add services, follow the steps given below:

1. &#x20;After clicking the Save and Next button, the following screen will appear:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2Fu7r91JRjJKuKvZOyVrgE%2F18.PNG?alt=media\&token=ef45ae2e-9154-4310-bcc9-10caca97b7c0)

2\. Enter the Service Name in the text box and click **Save**. The following options screen will appear:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FWGGn7QHmRNzZPrAfcr1Y%2F19.png?alt=media\&token=2e892c0a-fb10-485b-b4ab-24b91924ae28)

In the above image, a pipeline test\_Service has been created along with the servic&#x65;*.* Click the test\_Service pipeline to make changes to the pipeline. After clicking, the following options will appear:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FsYaLp9SR3anjEc9MYCeL%2F20.png?alt=media\&token=64c35c61-ed22-4b0b-a880-ba99ccfff54b)

**Type:** Select the type of gate using the drop-down, the options are Approval, Verification, Test Verification, and Policy. A gate is an access point that allows you to stop the pipeline to automatically go to the next stage. A gate helps you to manually intervene and verify or approve a stage of the pipeline before moving on to the next stage in the sequence. The following are the options:

### **Approval Type**&#x20;

If you select the gate type as "**Approval**", you can do the following:

* Select the connector from the drop-down. The available connectors are:
  * JIRA
  * GIT
  * AUTOPILOT
  * SONARQUBE
  * JENKINS
  * AQUAWAVE
  * APPSCAN
* Select the Account from the drop-down.
* Select the template from the drop-down.

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2F9NarpMucEbcgxpsUoCyy%2F21.png?alt=media\&token=62297e50-d779-4aad-8cd1-36238093c028)

### **Verification Type**&#x20;

If you select the gate type as "**Verification"**, you can do the following:&#x20;

* Select or add a Log Template. To know more about log templates click [here](https://docs.opsmx.com/autopilot/analysis-setup/templates/log-template).
* Select or add a Metric Template. To know more about metric templates click [here](https://docs.opsmx.com/autopilot/analysis-setup/templates/metric-template).

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2Fd1YeyUhgBInk9px83CZC%2F22.png?alt=media\&token=cfdc9a64-bbd4-4b5c-b447-7188dd628ead)

### **Test Verification Type**&#x20;

If you select the gate type as "**Type Verification**" you can only add a log template as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FYuoANvzLmA0hkOi0CqRh%2F23.png?alt=media\&token=6d90d800-df32-4e09-91b4-91989c3a32d8)

### **Policy Type**&#x20;

If you select the type "**Policy**" you will be to select the Policy from the Policy Configuration field as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2F81ZLQl3d07jrnssajD49%2F24.png?alt=media\&token=09b7a138-9351-4d1f-910f-3a29e2d14b90)

* After selecting the type some common fields appears irrespective of the type selected. They are as follows:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FpH2TXcxuGLvwHXum7UqD%2F25.PNG?alt=media\&token=5cc6e07d-b7b2-4bda-9568-42b09b8fc3b1)

* **Environment:** Any gate is associated with an environment. An environment can be a testing environment, a staging environment, or a production environment. Each environment is distinct and will have different credentials. Based on the environment the stages of a pipeline will vary. Click the drop-down and select Add Environment and then enter the name of the environment.
* **Gate Name:** Enter the name of the gate in the text box.
* Click **Save** to add the gate. You can add multiple gates to one service. Click the **Add New Gate** button as shown below:
* When you are trying to add a second gate you can set the dependency of the new gate on a previous gate. To do so, select the previous gate from the **Depends On** drop-down.
* After adding multiple gates to a service the Pipeline View will appear as shown below:

![](https://2047464521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBEa1hoX6SqpDj-ymNs%2Fuploads%2FgVAFVetCW61AMOl8ZFKM%2F26.png?alt=media\&token=d21048ca-6028-40ae-95a4-5b061040bfb1)
