All Projects → oktadeveloper → Jhipster Microservices Example

oktadeveloper / Jhipster Microservices Example

Licence: apache-2.0
JHipster Microservices Example using Spring Cloud, Spring Boot, Angular, Docker, and Kubernetes

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jhipster Microservices Example

Sample Spring Microservices Kubernetes
sample spring boot application that uses some features provided by spring cloud kubernetes, spring cloud ribbon and zuul proxy deployed on Kubernetes
Stars: ✭ 123 (+23%)
Mutual labels:  spring-boot, spring-cloud, minikube
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-26%)
Mutual labels:  spring-boot, spring-cloud, jhipster
Jhipster5 Demo
Get Started with JHipster 5 Tutorial and Example
Stars: ✭ 80 (-20%)
Mutual labels:  webpack, spring-boot, jhipster
Java Microservices Examples
Java Microservices: Spring Boot, Spring Cloud, JHipster, Spring Cloud Config, and Spring Cloud Gateway
Stars: ✭ 194 (+94%)
Mutual labels:  spring-boot, spring-cloud, jhipster
Jhipster4 Demo
Blog demo app with JHipster 4
Stars: ✭ 180 (+80%)
Mutual labels:  webpack, spring-boot, jhipster
Generator Jhipster
JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
Stars: ✭ 19,162 (+19062%)
Mutual labels:  webpack, spring-boot, jhipster
21 Points
❤️ 21-Points Health is an app you can use to monitor your health.
Stars: ✭ 244 (+144%)
Mutual labels:  webpack, spring-boot, jhipster
Great Big Example Application
A full-stack example app built with JHipster, Spring Boot, Kotlin, Angular 4, ngrx, and Webpack
Stars: ✭ 899 (+799%)
Mutual labels:  webpack, spring-boot, jhipster
Spring Vue Sample
Stars: ✭ 69 (-31%)
Mutual labels:  webpack, spring-boot
Web Development Interview With Java
Java 开发相关技术栈(大中厂)高频面试问题收录。
Stars: ✭ 69 (-31%)
Mutual labels:  spring-boot, spring-cloud
Sample Boot Micro
Spring Cloud + Gradle Multi Project + Java8
Stars: ✭ 72 (-28%)
Mutual labels:  spring-boot, spring-cloud
Microservices Example
Example of a microservices architecture on the modern stack of Java technologies
Stars: ✭ 66 (-34%)
Mutual labels:  spring-boot, spring-cloud
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-37%)
Mutual labels:  spring-boot, spring-cloud
Microservices Design Patterns
Microservice Architecture using multiple languages
Stars: ✭ 62 (-38%)
Mutual labels:  google-cloud, spring-boot
Fxshop
基于SpringBoot+SpringCloud微服务的商城项目(demo版 不可用于生产)
Stars: ✭ 82 (-18%)
Mutual labels:  spring-boot, spring-cloud
Spring Cloud Study
开源书《跟我学Spring Cloud》的配套代码。讨论QQ群:731548893
Stars: ✭ 1,036 (+936%)
Mutual labels:  spring-boot, spring-cloud
Cas
Apereo CAS - Enterprise Single Sign On for all earthlings and beyond.
Stars: ✭ 9,154 (+9054%)
Mutual labels:  spring-boot, spring-cloud
Genesis
Spring cloud Example
Stars: ✭ 83 (-17%)
Mutual labels:  spring-boot, spring-cloud
Febs Cloud
基于Spring Cloud Hoxton.RELEASE、Spring Cloud OAuth2 & Spring Cloud Alibaba & Element 微服务权限系统,开箱即用。预览地址:https://cloud.mrbird.cn
Stars: ✭ 1,295 (+1195%)
Mutual labels:  spring-boot, spring-cloud
Java Spring Web
OpenTracing Spring Web instrumentation
Stars: ✭ 89 (-11%)
Mutual labels:  spring-boot, spring-cloud

JHipster Microservices Example

A microservice architecture created with JHipster. Uses Spring Cloud, Spring Boot, Angular, and MongoDB for a simple blog/store applications.

Please read Develop and Deploy Microservices with JHipster to see how this example was created.

Prerequisites: Java 8, Node.js 6.11, Yarn, and Docker.

NOTE: If you're not on Mac or Windows, you may need to install Docker Compose as well.

Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage and secure users and roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/jhipster-microservices-example.git
cd jhipster-microservices-example
  1. Start the registry by running ./mvnw -Pprod in the registry directory.

  2. Install dependencies in the blog directory, build the UI, and run the Spring Boot app.

    yarn
    ./mvnw 
    
  3. Start MongoDB using Docker Compose in the store directory.

    docker-compose -f src/main/docker/mongodb.yml up
    
  4. Install dependencies in the store directory, build the UI, and run the Spring Boot app.

    yarn
    ./mvnw 
    

You should be able to see the blog app at http://localhost:8080 and edit products (from the store app)

Run with Docker Compose

You can use Docker Compose to start everything if you don't want to start applications manually with Maven.

  1. Make sure Docker is running.

  2. Build Docker images for the blog and store applications by running the following command in both directories.

    ./mvnw package -Pprod docker:build
    
  3. Open a terminal, navigate to the docker directory of this project, and run the following command. If you have a lot of RAM on your machine, you might want to adjust Docker's default setting (2 GB).

    docker-compose up -d
    

    TIP: Remove -d from the end of the command above if you want to see logs from all containers in the current window.

  4. Use Kitematic to view the ports and logs for the services deployed.

To create activity in JHipster Console's charts, you run the Gatling tests in the blog and store projects.

./mvnw gatling:execute

To remove all Docker containers, run the following commands or do it manually using Kitematic.

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

To find what's running on a port on macOS, use sudo lsof -i :9092 # checks port 9092.

Run with Kubernetes and Minikube

  1. Install kubectl, VirtualBox, and Minikube.

  2. Start Minikube using minikube start.

  3. To be able to work with the docker daemon, make sure Docker is running, then run the following command in your terminal:

    eval $(minikube docker-env)
    
  4. Create Docker images of the blog and store applications:

    ./mvnw package -Pprod docker:build
    
  5. Navigate to the kubernetes directory in your terminal and re-generate the files so they match your Docker repository name.

    jhipster kubernetes
    

    Follow the instructions for tagging and pushing the Docker images.

    docker image tag blog {yourRepoName}/blog
    docker push {yourRepoName}/blog
    docker image tag store {yourRepoName}/store
    docker push {yourRepoName}/store
    
  6. Use kubectl to deploy to Minikube.

    kubectl apply -f registry
    kubectl apply -f blog
    kubectl apply -f store
    

    The deployment process can take several minutes to complete. Run minikube dashboard to see the deployed containers. You can also run kubectl get po -o wide --watch to see the status of each pod.

  7. Run minikube service blog to view the blog application. You should be able to login and add blogs, entries, and products.

To remove all deployed containers, run the following command:

kubectl delete deployment --all

To stop Minikube, run minikube stop.

NOTE: If you run minikube delete and have trouble running minikube start afterward, run rm -rf ~/.minikube. See this issue for more information.

Google Cloud

  1. Create a Google Cloud project at console.cloud.google.com.

  2. Navigate to https://console.cloud.google.com/kubernetes/list to initialize the Container Engine for your project.

  3. Install Google Cloud SDK and set project using:

    gcloud config set project <project-name>
    
  4. Create a cluster:

    gcloud container clusters create <cluster-name> --machine-type=n1-standard-2 --scopes cloud-platform --zone us-west1-a
    

    To see a list of possible zones, run gcloud compute zones list.

  5. Push the blog and store docker images to Docker Hub. You will need to create an account and run docker login to push your images. The images can be run from any directory.

    docker image tag blog mraible/blog
    docker push mraible/blog
    docker image tag store mraible/store
    docker push mraible/store
    
  6. Run kubectl commands to deploy.

    kubectl apply -f registry
    kubectl apply -f blog
    kubectl apply -f store
    
  7. Use port-forwarding to see the registry app locally.

    kubectl port-forward jhipster-registry-0 8761:8761
    
  8. Run kubectl svc blog to view the blog application on Google Cloud.

  9. Scale microservice apps as needed with kubectl:

    kubectl scale --replicas=3 deployment/store
    

To see a screencast of this process, watch this YouTube video.

AWS

If you know how to deploy this architecture to AWS, I'd love to hear about it! I tried in anger, but ultimately failed.

Links

This example uses JHipster, and awesome project that allows you to generate a microservices architecture with Spring Boot. See Develop a Microservices Architecture with OAuth 2.0 and JHipster for an example that uses OAuth and Okta.

Help

Please post any questions as comments on the [email protected] if would like to create a support ticket.

License

Apache 2.0, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].