{"id":20307481,"url":"https://github.com/oktadev/jhipster-microservices-example","last_synced_at":"2025-08-20T18:34:26.445Z","repository":{"id":38734468,"uuid":"90096766","full_name":"oktadev/jhipster-microservices-example","owner":"oktadev","description":"JHipster Microservices Example using Spring Cloud, Spring Boot, Angular, Docker, and Kubernetes","archived":false,"fork":false,"pushed_at":"2023-01-12T10:23:05.000Z","size":32598,"stargazers_count":127,"open_issues_count":3,"forks_count":82,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-12-08T22:03:52.235Z","etag":null,"topics":["angular","docker","google-cloud","jhipster","jhipster-microservices","kubernetes","minikube","spring-boot","spring-cloud","webpack"],"latest_commit_sha":null,"homepage":"https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oktadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-03T01:53:47.000Z","updated_at":"2024-11-21T09:23:08.000Z","dependencies_parsed_at":"2023-02-09T11:15:33.295Z","dependency_job_id":null,"html_url":"https://github.com/oktadev/jhipster-microservices-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fjhipster-microservices-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fjhipster-microservices-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fjhipster-microservices-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fjhipster-microservices-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oktadev","download_url":"https://codeload.github.com/oktadev/jhipster-microservices-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445927,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","docker","google-cloud","jhipster","jhipster-microservices","kubernetes","minikube","spring-boot","spring-cloud","webpack"],"created_at":"2024-11-14T17:17:51.770Z","updated_at":"2024-12-19T14:08:27.209Z","avatar_url":"https://github.com/oktadev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JHipster Microservices Example\n\n\u003e A microservice architecture created with JHipster. Uses Spring Cloud, Spring Boot, Angular, and MongoDB for a simple blog/store applications. \n\nPlease read [Develop and Deploy Microservices with JHipster](https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster) to see how this example was created.\n\n**Prerequisites:** [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), [Node.js](https://nodejs.org/) 6.11, [Yarn](https://yarnpkg.com/lang/en/docs/install/), and [Docker](https://docs.docker.com/engine/installation/).\n\n**NOTE:** If you're not on Mac or Windows, you may need to [install Docker Compose](https://docs.docker.com/compose/install/) as well.\n\n\u003e [Okta](https://developer.okta.com/) 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.\n\n* [Getting Started](#getting-started)\n* [Links](#links)\n* [Help](#help)\n* [License](#license)\n\n## Getting Started\n\nTo install this example application, run the following commands:\n\n```bash\ngit clone https://github.com/oktadeveloper/jhipster-microservices-example.git\ncd jhipster-microservices-example\n```\n\n1. Start the registry by running `./mvnw -Pprod` in the `registry` directory.\n2. Install dependencies in the `blog` directory, build the UI, and run the Spring Boot app.\n \n    ```\n    yarn\n    ./mvnw \n    ``` \n    \n3. Start MongoDB using Docker Compose in the `store` directory.\n    \n    ```bash\n    docker-compose -f src/main/docker/mongodb.yml up\n    ```\n    \n4. Install dependencies in the `store` directory, build the UI, and run the Spring Boot app.\n \n    ```\n    yarn\n    ./mvnw \n    ``` \n    \nYou should be able to see the `blog` app at \u003chttp://localhost:8080\u003e and edit products (from the `store` app)\n\n### Run with Docker Compose\n\nYou can use Docker Compose to start everything if you don't want to start applications manually with Maven.\n\n1. Make sure Docker is running.\n2. Build Docker images for the `blog` and `store` applications by running the following command in both directories.\n\n    ```\n    ./mvnw package -Pprod docker:build\n    ```\n    \n3. Open a terminal, navigate to the `docker` directory of this project, and run the following command. If you have a lot\nof RAM on your machine, you might want to adjust Docker's default setting (2 GB).\n\n    ```\n    docker-compose up -d\n    ````\n    \n    TIP: Remove `-d` from the end of the command above if you want to see logs from all containers in the current window.\n    \n4. Use [Kitematic](https://kitematic.com/) to view the ports and logs for the services deployed.\n\nTo create activity in JHipster Console's charts, you run the Gatling tests in the `blog` and `store` projects.\n\n```bash\n./mvnw gatling:execute\n```\n\nTo remove all Docker containers, run the following commands or do it manually using Kitematic.\n\n```bash\ndocker stop $(docker ps -a -q)\ndocker rm $(docker ps -a -q)\n```\n\nTo find what's running on a port on macOS, use `sudo lsof -i :9092 # checks port 9092`.\n\n### Run with Kubernetes and Minikube\n\n1. Install [kubectl](https://kubernetes.io/docs/tasks/kubectl/install/), [VirtualBox](https://www.virtualbox.org/wiki/Downloads), and [Minikube](https://github.com/kubernetes/minikube/releases).\n2. Start Minikube using `minikube start`.\n3. To be able to work with the docker daemon, make sure Docker is running, then run the following command in your terminal:\n\n    ```bash\n    eval $(minikube docker-env)\n    ```\n\n4. Create Docker images of the `blog` and `store` applications:\n\n   ```bash\n   ./mvnw package -Pprod docker:build\n   ```\n\n5. Navigate to the `kubernetes` directory in your terminal and re-generate the files so they match your Docker repository name.\n\n   ```\n   jhipster kubernetes\n   ```\n   \n   Follow the instructions for tagging and pushing the Docker images.\n\n   ```bash\n   docker image tag blog {yourRepoName}/blog\n   docker push {yourRepoName}/blog\n   docker image tag store {yourRepoName}/store\n   docker push {yourRepoName}/store\n   ```\n   \n6. Use `kubectl` to deploy to Minikube. \n\n    ```\n    kubectl apply -f registry\n    kubectl apply -f blog\n    kubectl apply -f store\n    ```\n    \n    The deployment process can take several minutes to complete. Run `minikube dashboard` to see the deployed containers.\n    You can also run `kubectl get po -o wide --watch` to see the status of each pod.\n\n6. Run `minikube service blog` to view the blog application. You should be able to login and add blogs, entries, and products.\n\nTo remove all deployed containers, run the following command:\n\n    kubectl delete deployment --all\n    \nTo stop Minikube, run `minikube stop`.\n\n**NOTE:** If you run `minikube delete` and have trouble running `minikube start` afterward, run `rm -rf ~/.minikube`. \nSee [this issue](https://github.com/kubernetes/minikube/issues/290) for more information.\n\n### Google Cloud\n\n1. Create a Google Cloud project at [console.cloud.google.com](https://console.cloud.google.com/).\n2. Navigate to \u003chttps://console.cloud.google.com/kubernetes/list\u003e to initialize the Container Engine for your project. \n3. Install [Google Cloud SDK](https://cloud.google.com/sdk/) and set project using:\n  \n       gcloud config set project \u003cproject-name\u003e\n\n4. Create a cluster:\n  \n       gcloud container clusters create \u003ccluster-name\u003e --machine-type=n1-standard-2 --scopes cloud-platform --zone us-west1-a\n       \n   To see a list of possible zones, run `gcloud compute zones list`.\n   \n5. Push the `blog` and `store` docker images to [Docker Hub](https://hub.docker.com/). You will need to create an account \nand run `docker login` to push your images. The images can be run from any directory.\n\n    ```bash\n    docker image tag blog mraible/blog\n    docker push mraible/blog\n    docker image tag store mraible/store\n    docker push mraible/store\n    ```\n\n6. Run `kubectl` commands to deploy.\n\n    ```bash\n    kubectl apply -f registry\n    kubectl apply -f blog\n    kubectl apply -f store\n    ```\n\n7. Use port-forwarding to see the registry app locally.\n\n       kubectl port-forward jhipster-registry-0 8761:8761\n    \n8. Run `kubectl svc blog` to view the blog application on Google Cloud.\n\n9. Scale microservice apps as needed with `kubectl`:\n\n       kubectl scale --replicas=3 deployment/store\n    \nTo see a screencast of this process, [watch this YouTube video](https://youtu.be/dgVQOYEwleA).\n\n### AWS\n\nIf you know how to deploy this architecture to AWS, I'd love to hear about it! I [tried in anger](https://groups.google.com/forum/#!msg/jhipster-dev/NNA3TScENVE/WmbG2Qt_AwAJ), but ultimately failed.\n\n## Links\n\nThis example uses [JHipster](https://www.jhipster.tech), and awesome project that allows you to generate a microservices architecture with [Spring Boot](https://projects.spring.io/spring-boot/). See [Develop a Microservices Architecture with OAuth 2.0 and JHipster](https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth) for an example that uses OAuth and Okta.\n\n## Help\n\nPlease post any questions as comments on the [blog post](https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth), or visit our [Okta Developer Forums](https://devforum.okta.com/). You can also email developers@okta.com if would like to create a support ticket.\n\n## License\n\nApache 2.0, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fjhipster-microservices-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foktadev%2Fjhipster-microservices-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fjhipster-microservices-example/lists"}