# Microservices deployment

**URL:** <https://discuss.circleci.com/t/microservices-deployment/14528>\
**Category:** Deployments\
**Tags:** workflow\
**Created:** [July 20, 2017, 6:50am UTC](https://discuss.circleci.com/t/microservices-deployment/14528 "2017-07-20T06:50:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![siliconsenthil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/siliconsenthil/32/16616_2.png) [@siliconsenthil](https://discuss.circleci.com/u/siliconsenthil)\
**Post date:** [July 20, 2017, 6:50am UTC](https://discuss.circleci.com/t/microservices-deployment/14528/1 "2017-07-20T06:50:43Z")

</div>

We have few services that talk to each other. Whenever a commit happens in one of the services, we wanna

- Run unit tests of the service
- Build the service
- Deploy the service in QA environment
- Run the integration tests which test the functionality as a whole across services
- Deploy to staging.

There’re requirements like

- Queue the deployment to QA env, if there’s integration-tests running

It’s somewhat similar to [http://arojgeorge.ghost.io/content/images/2014/Aug/Pipeline-dependency.png](http://arojgeorge.ghost.io/content/images/2014/Aug/Pipeline-dependency.png)

With circle-ci we have workflows. But that’s tied to one repository.

What is the best way or workaround to achieve the pipeline which is generic across multiple repos I’m talking about? Thoughts?

---

<div class="post-metadata">

**Author:** ![dtzar](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dtzar/32/7419_2.png) [@dtzar](https://discuss.circleci.com/u/dtzar)\
**Post date:** [July 20, 2017, 3:01pm UTC](https://discuss.circleci.com/t/microservices-deployment/14528/2 "2017-07-20T15:01:20Z")

</div>

You could do the following:

1. Have each one of your microservices in their own workflow which does unit tests, build service, deploy to QA, THEN kick off the workflow below using this: [https://circleci.com/docs/2.0/api-job-trigger/#starting-jobs-with-the-api](https://circleci.com/docs/2.0/api-job-trigger/#starting-jobs-with-the-api)
2. Have ONE separate workflow for the acceptance/QA environment which runs the integration tests and then deploys to staging, etc.

General best practice of microservices is each of them should be independently deployable, so IF you used the above workflow you’d have to do some additional hacking to push the microservice which submitted the code update in step 1 to production.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/microservices-deployment/14528/3 "2018-06-18T11:41:20Z")

</div>

Closed on June 18, 2018, 11:41am UTC


