jhipster gateway and microservice - microservices

I need to run my gateway and microservice in local without docker. Is this possible?
I created two projects: gateway and microservice. How can I run in local without docker?

If you want to do this, you'll need to download the JHipster Registry. Then run it with java -jar jhipster-registry-*.war. Then start your gateway and microservice apps as you normally would (with Maven/Gradle, or your IDE).

Related

Is it possible to run Spring Cloud Gateway on an external application server?

I want to create a war file of Spring Cloud Gateway Project (version 2.1.2.RELEASE) and deploy it on a container which supports reactive, is it possible? which application server is suggested?
AFAIK this is possible, but I wouldn't recommended it. If you package your application as a runnable jar it will ship with an embedded application server so it can run everywhere.

Is it possible to deploy multiple Spring Boot applications to a server?

We can create restful API in spring boot jar file?
1)can we split multiple jar file in Apache server?
2) if we split multiple jar file how will identify which jar contain correct rest APIs
How spring boot jar file will work in server?
For Development Environment
You can configure ports via application.properties or via system properties.
Or with option to jvm --server.port=8081
So, there is no problem to run a few APIs on single machine with different ports.
You don't need Apache Server. Spring Boot has it's own embedded for you. So, you can easily use it.
Let's say you have two APIs.
localhost:8081 (Checkout Service)
localhost:8082 (Payment Service)
Hostname and port - it's your identification for each service.
When you trying to search something in Google.
You browser - it's a client.
And Google's servers - it's a server.
The same here. Checkout Service trying to delegate some job to Payment Service. So, Checkout Service - it's a client. And this client should know the address of Payment Service.
For Production Environment
You should think twice, how you will monitor performance, manage scalability and so on.

Will AWS work with Spring Boot and React?

I'm trying out local development with Spring Boot and React where I run mvn spring-boot:run (this runs on http://localhost:8080) for the Spring server, then I run npm start (this runs on http://localhost:3000) for the React client. My knowledge is that React is the front facing component that clients will talk to and then Spring will be what React interacts with for back-end operations.
Will a setup like this work similarly in a AWS setup like AWS Elastic Beanstalk? I am confused because most of what I read up involves passing the .jar or .war to AWS to run Spring but how would a setup work for when React is the front facing component?
-Thanks!
You could deploy your Spring Boot Uber Jar to AWS Beanstalk then run an npm build to create your React bundled application and deploy that to AWS S3. You will need to change some app settings to point to the correct (Beanstalk) server and make sure your AWS S3 settings are correct. There are examples within AWS documentation.

Is it possible to run JHipster Microservices locally that are managed with JHipster Registry in the cloud?

When I run JHipster Registry in the cloud (ex: Heroku) and runs without problems and I can access correctly through the URL (ex: my-jhipster-registry.herokuapp.com). I could use this JHipster Registry to manage JHipster Microservices (gateways or applications) that are not in the cloud? If this is possible, how?
This doubt arises from the need to NOT have install JHipster Registry locally (on my laptop) during development and read the official guide running in the cloud.
Scenario expected during development:
JHipster Registry in cloud (Heroku)
JHipster Microservices in local (laptop)
I thank you for your time and help!
Yes it should work as long as your services can connect to your registry and they expose IP addresses that can be reached by other services (a service running in the cloud will not be able to connect to a service running on your laptop).
You may need a real certificate on registry that match your domain name for using https.

eureka: how to register existing servers

I am using a spring-cloud discovery service in my docker-compose. All spring-boot services that are under my control register themselves on startup via "EnableDiscoveryClient".
But I have other services in my docker-compose that I run from their dockerhub images. How can I register them as well (database, ldap, ...)
Is there a way to configure eureka to look for defined components (pull) instead of the client "push"?
You would have to implement a Sidecar app and most-likely create a Docker image using a database, ldap image from the dockerhub as the starting point.
I published a blog post about this exact topic: Microservices Sidecar pattern implementation using Postgres, Spring Cloud Netflix and Docker

Resources