[TOC]
digiRunner is an application-layer API gateway that acts as a central hub for communication between clients and your backend services in a microservices architecture. It simplifies frontend development by providing a unified API endpoint, streamlining interactions with your distributed backend services.
- Intelligent Routing: Routes API requests efficiently to the appropriate backend service based on request content.
- Robust Security: Provides multi-layered authentication and authorization to protect your APIs from attacks.
- Real-time Monitoring: Monitors API performance with detailed data for proactive issue identification and resolution.
- Traffic Management: Ensures system stability by setting limits on API access frequency and quotas.
- Simplified Frontend Development: Provides a single API entry point, reducing development complexity.
- Enhanced System Stability: Ensures reliability through traffic control and error handling.
- Improved System Security: Offers multiple security mechanisms to safeguard your system.
- Facilitated Microservices Governance: Enables unified management and control of your microservices through API management.
- Consolidate multiple backend services into a single, easily accessible API.
- Implement robust access control to protect your APIs from unauthorized access.
- Gain insights into API usage patterns through detailed monitoring data.
- Enforce rate limiting to prevent API overload and ensure system stability.
- Transform API outputs into various formats like JSON or XML for broader client compatibility.
graph LR;
Browser-->OpenDGR;
OpenDGR-->Backend-A;
OpenDGR-->Backend-B;
choose one of the following options to launch service by container
docker run -it -d -p 31080:18080 tpisoftwareopensource/opendgrname: opendgr
services:
dgr:
image: tpisoftwareopensource/opendgr
ports:
- "31080:18080"
environment:
- TZ=Asia/Taipei
networks:
- opendgr
networks:
opendgr:
driver: bridge- save above configuration to
opendgr-compose.yml - run
docker-compose -f opendgr-compose.yml up -dat the same directory withopendgr-compose.yml
apiVersion: v1
kind: Namespace
metadata:
name: open-dgr
---
apiVersion: v1
kind: Service
metadata:
name: open-dgr-svc
namespace: open-dgr
spec:
ports:
- name: tcp
nodePort: 31080
port: 18080
protocol: TCP
targetPort: 18080
selector:
app: dgr
sessionAffinity: None
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dgr
name: open-dgr
namespace: open-dgr
spec:
replicas: 1
selector:
matchLabels:
app: dgr
template:
metadata:
labels:
app: dgr
namespace: open-dgr
spec:
containers:
- env:
- name: TZ
value: Asia/Taipei
image: tpisoftwareopensource/opendgr
imagePullPolicy: Always
name: open-dgr
ports:
- containerPort: 18080
name: tcp
protocol: TCP
workingDir: /opt/open-dgr- save above configuration to
opendgr.yml - run
kubectl apply -f opendgr.yml
- Open your browser and navigate to: http://localhost:31080/dgrv4/login
- Use the default credentials to login:
- username:
manager - password:
manager123
- username:
- OpenJDK 17+
-
Clone the repository:
git clone https://github.com/TPIsoftwareOSPO/digiRunner.git
-
Change directory:
cd digiRunner/ -
Run the service:
./gradlew :dgrv4_Gateway_serv:bootRun
-
Wait for the digiRunner banner to appear.
_______ _____ _____ _____ _____ _____ _____ /::\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /::::\ \ /::\ \ /::\ \ /::\____\ /::\ \ /::\ \ /::\ \ /::::::\ \ /::::\ \ /::::\ \ /::::| | /::::\ \ /::::\ \ /::::\ \ /::::::::\ \ /::::::\ \ /::::::\ \ /:::::| | /::::::\ \ /::::::\ \ /::::::\ \ /:::/~~\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /::::::| | /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/|::| | /:::/ \:::\ \ /:::/ \:::\ \ /:::/__\:::\ \ /:::/ / \:::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /:::/ |::| | /:::/ \:::\ \ /:::/ \:::\ \ /::::\ \:::\ \ /:::/____/ \:::\____\ /::::::\ \:::\ \ /::::::\ \:::\ \ /:::/ |::| | _____ /:::/ / \:::\ \ /:::/ / \:::\ \ /::::::\ \:::\ \ |:::| | |:::| | /:::/\:::\ \:::\____\ /:::/\:::\ \:::\ \ /:::/ |::| |/\ \ /:::/ / \:::\ ___\ /:::/ / \:::\ ___\ /:::/\:::\ \:::\____\ |:::|____| |:::| |/:::/ \:::\ \:::| |/:::/__\:::\ \:::\____\/:: / |::| /::\____\/:::/____/ \:::| |/:::/____/ ___\:::| |/:::/ \:::\ \:::| | \:::\ \ /:::/ / \::/ \:::\ /:::|____|\:::\ \:::\ \::/ /\::/ /|::| /:::/ /\:::\ \ /:::|____|\:::\ \ /\ /:::|____|\::/ |::::\ /:::|____| \:::\ \ /:::/ / \/_____/\:::\/:::/ / \:::\ \:::\ \/____/ \/____/ |::| /:::/ / \:::\ \ /:::/ / \:::\ /::\ \::/ / \/____|:::::\/:::/ / \:::\ /:::/ / \::::::/ / \:::\ \:::\ \ |::|/:::/ / \:::\ \ /:::/ / \:::\ \:::\ \/____/ |:::::::::/ / \:::\__/:::/ / \::::/ / \:::\ \:::\____\ |::::::/ / \:::\ /:::/ / \:::\ \:::\____\ |::|\::::/ / \::::::::/ / \::/____/ \:::\ \::/ / |:::::/ / \:::\ /:::/ / \:::\ /:::/ / |::| \::/____/ \::::::/ / ~~ \:::\ \/____/ |::::/ / \:::\/:::/ / \:::\/:::/ / |::| ~| \::::/ / \:::\ \ /:::/ / \::::::/ / \::::::/ / |::| | \::/____/ \:::\____\ /:::/ / \::::/ / \::::/ / \::| | ~~ \::/ / \::/ / \::/____/ \::/____/ \:| | \/____/ \/____/ ~~ \|___| ========== dgRv4 web server info ============ ... -
Open your browser and navigate to: http://localhost:18080/dgrv4/login
-
Use the default credentials to login:
- username:
manager - password:
manager123
- username:
- Change to digiRunner directory:
cd digiRunner/ - Build the JAR:
./gradlew clean :dgrv4_Gateway_serv:bootJar
- Locate the JAR file:
dgrv4_Gateway_serv/build/libs/opendgr-{version}.jar - Run the JAR:
java -jar dgrv4_Gateway_serv/build/libs/opendgr-*.jar
cd digiRunner/docker build -t opendgr .docker run -p 18080:18080 opendgrOpen your browser and navigate to: http://localhost:18080/dgrv4/login