Giter Site home page Giter Site logo

rakk / spring-cloud-training Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 11.0 299 KB

Example code used for Spring-Cloud training.

Java 31.06% HTML 2.54% Shell 37.44% Batchfile 28.96%
spring-cloud spring-cloud-netflix microservices java java-9 discovery-service spring-cloud-config spring-cloud-training oauth2 zuul-server

spring-cloud-training's Introduction

Spring Cloud Training

This project is used for training of Spring-Cloud training.

Configuration for project is located in rakk/spring-cloud-training-configuration repository.

Table of Contents

Overview

This project contains spring-boot based services:

  • core service:
    • lending-service - business service responsible for taking loan
    • securities-service - backend business service responsible for debt management
  • entry point
    • lending-ui - spring-boot based UI for
    • ui - nodejs based (very simple) web app, uses core services as backend
    • routing-service - routing/proxy server based on zuul server
  • tools:
    • discovery-service - discovery service based on Netflix Eureka server
    • config-server - delivers configuration for all services, by default uses rakk/spring-cloud-training-configuration repository
    • admin-service - administrative tool, allows us to view logs, change configuration on the fly etc.
    • tracing-service - tracing for distributed system

Branches

During the training we will use branches:

  • live-coding-communication (starting point for the live coding)
  • live-coding-routing
  • live-coding-security
  • live-coding-final (code after live coding)

Installation process

Install Java JDK 8/9 and Node 8.9.4

Project can be build by maven wrapper so maven installation can be skipped.

Build and run project

Windows

Download source code

cd %Homepath%\Desktop
git clone https://github.com/rakk/spring-cloud-training
git clone https://github.com/rakk/spring-cloud-training-configuration

This might take a while...

Checkout all live-coding branches

cd %Homepath%\Desktop\spring-cloud-training
git checkout -b live-coding-routing origin/live-coding-routing
git checkout -b live-coding-security origin/live-coding-security
git checkout -b live-coding-final origin/live-coding-final

git checkout -b live-coding-communication origin/live-coding-communication

Build source code

cd %Homepath%\Desktop\spring-cloud-training && mvnw clean package

This might take a while...

Run java projects

1. Run discovery-service

cd %Homepath%\Desktop\spring-cloud-training\discovery-service && mvnw spring-boot:run

and open in browser port: 9021 => http://localhost:9021

2. Run config-service

cd %Homepath%\Desktop\spring-cloud-training\config-service && mvnw spring-boot:run

and open in browser port: 9020 => http://localhost:9020/lending-service/develop

3. Run tracing-service

cd %Homepath%\Desktop\spring-cloud-training\tracing-service && mvnw spring-boot:run

and open in browser port: 9022 => http://localhost:9022

4. Run admin-service

cd %Homepath%\Desktop\spring-cloud-training\admin-service && mvnw spring-boot:run

and open in browser port: 9024 => http://localhost:9024

5. Make sure that config-service and discovery-service are running

Rest of core projects requires both config-service and discovery-service. It is important to be sure that they are up and running.

6. Run oauth2-security-server

master branch only

cd %Homepath%\Desktop\spring-cloud-training\oauth2-security-server && mvnw spring-boot:run

and open in browser port: 9030 => http://localhost:9030/uaa/login

7. Run securities-service

cd %Homepath%\Desktop\spring-cloud-training\securities-service && mvnw spring-boot:run

and open in browser port: 9001 => http://localhost:9001/info

8. Run lending-service

cd %Homepath%\Desktop\spring-cloud-training\lending-service && mvnw spring-boot:run

and open in browser port: 9000 => http://localhost:9000/info

9. Run lending-ui

cd %Homepath%\Desktop\spring-cloud-training\lending-ui && mvnw spring-boot:run

and open in browser port: 9002 => http://localhost:9002

10. Run routing-service

cd %Homepath%\Desktop\spring-cloud-training\routing-service && mvnw spring-boot:run

and open in browser port: 9090 => http://localhost:9090/routes

11. Install http-server

npm install http-server -g

12. Run Web NODE 1

cd %Homepath%\Desktop\spring-cloud-training\ui && http-server

and open in browser port: 8080 => http://localhost:8080

13. Run Web NODE 2

cd %Homepath%\Desktop\spring-cloud-training\ui && http-server -p 8090

and open in browser port: 8090 => http://localhost:8090

Linux or Mac OS

Download source code

cd ~/Desktop
git clone https://github.com/rakk/spring-cloud-training
git clone https://github.com/rakk/spring-cloud-training-configuration

This might take a while...

Checkout all live-coding branches

cd ~/Desktop/spring-cloud-training
git checkout -b live-coding-routing origin/live-coding-routing
git checkout -b live-coding-security origin/live-coding-security
git checkout -b live-coding-final origin/live-coding-final

git checkout -b live-coding-communication origin/live-coding-communication

Build source code

cd ~/Desktop/spring-cloud-training && ./mvnw clean package

This might take a while...

Run java projects

1. Run discovery-service

cd ~/Desktop/spring-cloud-training/discovery-service && ./mvnw spring-boot:run

and open in browser port: 9021 => http://localhost:9021

2. Run config-service

cd ~/Desktop/spring-cloud-training/config-service && ./mvnw spring-boot:run

and open in browser port: 9020 => http://localhost:9020/lending-service/develop

3. Run tracing-service

cd ~/Desktop/spring-cloud-training/tracing-service && ./mvnw spring-boot:run

and open in browser port: 9022 => http://localhost:9022

4. Run admin-service

cd ~/Desktop/spring-cloud-training/admin-service && ./mvnw spring-boot:run

and open in browser port: 9024 => http://localhost:9024

5. Make sure that config-service and discovery-service are running

Rest of core projects requires both config-service and discovery-service. It is important to be sure that they are working fine.

6. Run oauth2-security-server

master branch only

cd ~/Desktop/spring-cloud-training/oauth2-security-server && ./mvnw spring-boot:run

and open in browser port: 9030 => http://localhost:9030/uaa/login

7. Run securities-service

cd ~/Desktop/spring-cloud-training/securities-service && ./mvnw spring-boot:run

and open in browser port: 9001 => http://localhost:9001/info

8. Run lending-service

cd ~/Desktop/spring-cloud-training/lending-service && ./mvnw spring-boot:run

and open in browser port: 9000 => http://localhost:9000/info

9. Run lending-ui

cd ~/Desktop/spring-cloud-training/lending-ui && ./mvnw spring-boot:run

and open in browser port: 9002 => http://localhost:9002

10. Run routing-service

cd ~/Desktop/spring-cloud-training/routing-service && ./mvnw spring-boot:run

and open in browser port: 9090 => http://localhost:9090/routes

11. Install http-server

npm install http-server -g

12. Run Web NODE 1

cd ~/Desktop/spring-cloud-training/ui && http-server

and open in browser port: 8080 => http://localhost:8080

13. Run Web NODE 2

cd ~/Desktop/spring-cloud-training/ui && http-server -p 8090

and open in browser port: 8090 => http://localhost:8090

Credentials

Local OAuth Server (master branch)

❗ Local OAuth Server is only on master branch ❗

Predefined OAuth test users created for this app:

  • admin - has role ADMIN
    • login: admin
    • password: admin
  • user - has role USER
    • login: user
    • password:password

Facebook

❗ Credentials needed on live-coding-security and live-coding-final branches ❗

spring-cloud-training's People

Contributors

devkwondo avatar mzzigft avatar przemyslawjuszkiewicz avatar rakk avatar sadfsdf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

spring-cloud-training's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.