Skip to content

zakaria-shahen/firstMicroservicearchitecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

first Microservice architecture

Project Repository

Services/Servers

  1. config-server
  2. gateway-server
  3. eureka_server_discovery
  4. first_microservice
  5. second_microservice
  6. keycloak
  7. dev_vault
  8. first_microservice_database
  9. elasticsearch
  10. kibana
  11. logstash
  12. zipkin
  13. kafka-server
  14. zookeeper
  15. redis-server

How to Run

  1. clone projects

        git clone https://github.com/zakaria-shahen/firstMicroservicearchitecture
        cd firstMicroservicearchitecture
        git clone https://github.com/zakaria-shahen/firstmicroservice
        git clone https://github.com/zakaria-shahen/firstspringconfigurationserver
        git clone https://github.com/zakaria-shahen/firstSpringeurekaserverDiscovery
        git clone https://github.com/zakaria-shahen/fristSpringCloudGateway
        git clone https://github.com/zakaria-shahen/secondMicroservice
  2. build images

        cd firstmicroservice 
        ./mvnw clean spring-boot:build-image -DskipTests
        cd ../firstspringconfigurationserver
        ./mvnw clean spring-boot:build-image -DskipTests
        cd ../firstSpringEurekaServerDiscovery
        ./mvnw clean spring-boot:build-image -DskipTests
        cd ../FristSpringCloudGateway
        ./mvnw clean spring-boot:build-image -DskipTests
        cd ../SecondMicroservice
        ./mvnw clean spring-boot:build-image -DskipTests
  3. Run docker-compose

      docker-compose up
  4. add keycloak to host

    • windows
      • path: C:\Windows\System32\drivers\etc
      • add 127.0.0.1 keycloak to host file
  5. Vault Config

    • run in vault container terminal
        vault login token=myroot
        vault kv put secret/firstmicroservice  test.vault="Hello, Vault"

Services links

NOTE: not use IDEA to run config server with vault ref but use cli with spring-boot:run

./mvnw spring-boot:run

Redeploy one service

Terminal

```shell
 ./mvnw install spring-boot:repackage -DskipTests &&
 docker-compose up --build --no-deps --force-recreate  -Vd  --no-log-prefix <service_name> 
```

IDEA

Add New Run Configuration:

  • install spring-boot:repackage -DskipTests docker_compose_with_idea

NOTE: if run with Eureka client in your localhost (pc) without docker and your host (pc) installed docker-desktop.. problem may occur.. link

About

firstMicroservicearchitecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published