# Develop and Deploy Microservices with JHipster

**URL:** <https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764>\
**Category:** Developer Blog Comments\
**Created:** [November 21, 2017, 5:35pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764 "2017-11-21T17:35:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [November 21, 2017, 5:35pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/1 "2017-11-21T17:35:16Z")

</div>

[Develop and Deploy Microservices with JHipster](https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster)

This tutorial shows you how to build microservices with JHipster. You’ll generate a gateway (powered by Netflix Zuul and the JHipster Gateway), a microservice (that talks to MongoDB), and use Docker Compose to run it all. Then you’ll deploy it to Google Cloud using Kubernetes.

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [January 5, 2018, 3:19am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/2 "2018-01-05T03:19:55Z")

</div>

**delkant**

Great article!   
I have a question, is it possible to manage entities on the microservice app (not the gateway) using JDL? and then do the same in the gateway with jdl. How will the gateway know that the backend component is in another project like in the case of the store and only do the UI part? Because when you run the generation with jdl in the blog app (gateway) even the backend code was generated. Is there like a parameter for jdl or something to avoid server or client code generation and just point to other projects for the already existing code?

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [January 8, 2018, 9:46pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/3 "2018-01-08T21:46:31Z")

</div>

**Matt Raible**

Thanks, I’m glad you liked it! If you run `yo jhipster:import-jdl` on your microservice app, it will only generate the server-side code. Then you can run `yo jhipster:entity $name` on your gateway app and it’ll prompt you for the location of your microservice app and import the existing entities.

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [January 13, 2018, 8:28am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/4 "2018-01-13T08:28:05Z")

</div>

**Andre Kapp**

Good morning Matt

Have you made any progress with the deployment to AWS?  
I saw this discussion, but it seems to have died…  
[https://groups.google.com/f…](https://groups.google.com/forum/m/#!msg/jhipster-dev/NNA3TScENVE/WmbG2Qt_AwAJ "https://groups.google.com/forum/m/#!msg/jhipster-dev/NNA3TScENVE/WmbG2Qt\_AwAJ")

I’m running my JHipster microservices on GoogleCloud as well. Use the Google Pub/Sub for inter-service comms. It also allows me to run a SpringBoot app in the clients office where they run a local install of Pastel. I can then trigger invoice generation, etc from the Cloud env.  
The only problem is that it is super sensitive with mvn versions. Upgraded the app and now all messaging stops again. Was trying AWS, but also ran into some of the problems you have mentioned.

Regards  
Andre

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [January 14, 2018, 7:03pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/5 "2018-01-14T19:03:10Z")

</div>

**Matt Raible**

Hello Andre: I have not made any progress on deploying JHipster to AWS. I hope to revisit it soon. In the meantime, I’d recommend checking out [Chris Anatalio’s LinkedIn Learning course on JHipster](https://twitter.com/CAnatalio/status/949342098204971008 "https://twitter.com/CAnatalio/status/949342098204971008"). It says it covers AWS. Please report back if you’re successful!

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [March 5, 2018, 8:05pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/6 "2018-03-05T20:05:53Z")

</div>

**Mark Schreiber**

While working my way through this tutorial I got stuck at the [https://developer.okta.com/…](https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster#build-for-production "https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster#build-for-production") step. When I attempt ./mvnw -Pprod package I get an error which seems to be a problem with one of the node modules.

Node version = v8.9.4  
Yarn version = 1.3.2  
Yo version = 2.0.1  
JHipster version = 4.14.0

[INFO] $ node --max\_old\_space\_size=4096 node\_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --profile  
[INFO] MergetJsonsWebpackPlugin compilation started…  
[INFO] MergetJsonsWebpackPlugin compilation completed…  
[ERROR] buffer.js:202  
[ERROR] throw new TypeError(kFromErrorMsg);  
[ERROR] ^  
[ERROR]   
[ERROR] TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.  
[ERROR] at Function.Buffer.from (buffer.js:202:9)  
[ERROR] at new Buffer (buffer.js:158:17)  
[ERROR] at writeOut (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/lib/Compiler.js:334:17)  
[ERROR] at require.forEach (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/lib/Compiler.js:345:12)  
[ERROR] at /Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/node\_modules/async/dist/async.js:3096:16  
[ERROR] at eachOfArrayLike (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/node\_modules/async/dist/async.js:1055:9)  
[ERROR] at eachOf (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/node\_modules/async/dist/async.js:1103:5)  
[ERROR] at Object.eachLimit (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/node\_modules/async/dist/async.js:3158:5)  
[ERROR] at emitFiles (/Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/webpack/lib/Compiler.js:315:21)  
[ERROR] at /Users/mschreiber/develop/jhipster-microservices-example/blog/node\_modules/mkdirp/index.js:30:20  
[ERROR] at FSReqWrap.oncomplete (fs.js:135:15)  
[ERROR] error Command failed with exit code 1.  
[INFO] info Visit [https://yarnpkg.com/en/docs…](https://yarnpkg.com/en/docs/cli/run "https://yarnpkg.com/en/docs/cli/run") for documentation about this command.  
[ERROR] error Command failed with exit code 1.  
[INFO] info Visit [https://yarnpkg.com/en/docs…](https://yarnpkg.com/en/docs/cli/run "https://yarnpkg.com/en/docs/cli/run") for documentation about this command.  
[ERROR] error Command failed with exit code 1.  
[INFO] info Visit [https://yarnpkg.com/en/docs…](https://yarnpkg.com/en/docs/cli/run "https://yarnpkg.com/en/docs/cli/run") for documentation about this command.  
[INFO] ------------------------------------------------------------------------  
[INFO] BUILD FAILURE  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 58.200 s  
[INFO] Finished at: 2018-03-05T14:58:21-05:00  
[INFO] Final Memory: 42M/374M  
[INFO] ------------------------------------------------------------------------

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [December 7, 2019, 7:46am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/7 "2019-12-07T07:46:08Z")

</div>

**Mahender Singh**

Getting error when connecting store microservice from blog UI :   
Access Control: allowing access for /services/store/api/product, as no access control policy has been set up for service: store

Enter: org.jhipster.blog.repository.CustomAuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=2019-12-07T07:42:44.463866Z, principal=anonymousUser, type=AUTHORIZATION\_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]  
2019-12-07 13:12:44.464 DEBUG 64437 — [XNIO-1 task-5] o.j.blog.aop.logging.LoggingAspect : Exit: org.jhipster.blog.repository.CustomAuditEventRepository.add() with result = null  
2019-12-07 13:12:44.474 WARN 64437 — [XNIO-1 task-5] o.z.problem.spring.common.AdviceTraits : Unauthorized: Full authentication is required to access this resource  
2019-12-07 13:12:44.507 WARN 64437 — [XNIO-1 task-5] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource]

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [December 7, 2019, 7:46pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/8 "2019-12-07T19:46:37Z")

</div>

**Matt Raible**

This tutorial was written for JHipster 4. If you’re using JHipster 4, it should work. If you’re using JHipster 6, you might want to check out [Java Microservices with Spring Cloud Config and JHipster](https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config "https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config").

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [July 21, 2020, 2:53am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/9 "2020-07-21T02:53:49Z")

</div>

**onlinetutor find**

[online database diagram](https://onlinetutorfind.com/ "https://onlinetutorfind.com/")

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [October 8, 2021, 7:59am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/10 "2021-10-08T07:59:39Z")

</div>

**drasko kosovic**

Hi Matt,  
Great article! ,  
I was able to deploy microservis app to Google Cloud following the instructions in your example. However, publishing on Google cloud expensive for me. Since it is expensive for me I think my only solution is deploy on Heroku. , I tried that according to the instructions from [jhipster.tech](http://jhipster.tech "jhipster.tech") web site to publish a geteway with a postgres database, I created a jhipster register on heroka and successfully deploy a microservice on Heroku, but I can’t deploy geteway app, I just can’t log in, which probably means no base. If you have any idea where I could find an example like this but on Heroku it would mean a lot to me.  
Thank you in advance  
Drasko

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [October 8, 2021, 8:30am UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/11 "2021-10-08T08:30:37Z")

</div>

**Deepu K Sasidharan**

Does the gateway show up in the registry? You said you can’t login, so does it mean the gateway was deployed but you can’t login to it? Also we would need more information regarding the app itself.

---

<div class="post-metadata">

**Author:** ![drasko](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@drasko](https://devforum.okta.com/u/drasko)\
**Post date:** [October 28, 2021, 5:54pm UTC](https://devforum.okta.com/t/develop-and-deploy-microservices-with-jhipster/16764/12 "2021-10-28T17:54:03Z")

</div>

Hi Deepu,  
Thank you for paying attention to my question. As for the first question: “Does the gateway show up in the registry?” the answer is Yes or Status DOWN. When I typed, "  
heroku logs --tail "  
I received a notification: "org.postgresql.util.PSQLException: Connection to localhost: 5432 refused. Check that the hostname and port are correct  
and that the postmaster is accepting TCP / IP connections. "  
In a local environment (./ mvnw -Pprod) the gateway application works well.  
If you have time you can check on my Heroku account:  
user: [drasko.kosovic@gmail.com](mailto:drasko.kosovic@gmail.com),  
password: Trepca1959 @.  
My Jhipster registry application on Herok is:  
“[https://mn-registracija.herokuapp.com/](https://mn-registracija.herokuapp.com/)”  
My Gateway application on hero is: “[https://jhipster-heroku-test-gateway.herokuapp.com/](https://jhipster-heroku-test-gateway.herokuapp.com/)”,  
Also to note that with the microservis app deploy is ok Status U  
Thank you in advance this means a lot to me.  
Drasko
