TPI.dev | Documentation | Blog
- Overview
- Quick Start
- Create a Simple Api Proxy
- Documentation
- Build Your Own JAR
- Run digiRunner in a Local Container Registry
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/digirunner-open-source
name: digirunner-open-source
services:
dgr:
image: tpisoftwareopensource/digirunner-open-source
ports:
- "31080:18080"
environment:
- TZ=Asia/Taipei
- save above configuration to
opendgr-compose.yml
- run
docker-compose -f opendgr-compose.yml up -d
at the same directory withopendgr-compose.yml
apiVersion: v1
kind: Namespace
metadata:
name: digirunner-open-source-ns
---
apiVersion: v1
kind: Service
metadata:
name: digirunner-open-source-svc
namespace: digirunner-open-source-ns
spec:
ports:
- name: tcp
nodePort: 31080
port: 18080
protocol: TCP
targetPort: 18080
selector:
app: digirunner
sessionAffinity: None
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: digirunner
name: digirunner-open-source-deploy
namespace: digirunner-open-source-ns
spec:
replicas: 1
selector:
matchLabels:
app: digirunner
template:
metadata:
labels:
app: digirunner
namespace: digirunner-open-source-ns
spec:
containers:
- env:
- name: TZ
value: Asia/Taipei
image: tpisoftwareopensource/digirunner-open-source
imagePullPolicy: Always
name: digirunner
ports:
- containerPort: 18080
name: tcp
protocol: TCP
workingDir: /opt/digirunner
- save above configuration to
digirunner-open-source.yml
- run
kubectl apply -f digirunner-open-source.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-Open-Source.git
-
Change directory:
cd digiRunner-Open-Source/
-
Run the service:
./gradlew :dgrv4_Gateway_serv:bootRun
-
Wait for the digiRunner banner to appear.
_ ____ _ _
__| | __ _| _ \ _ _ _ __ _ __ ___ _ __ __ __ || |
/ _` |/ _` | |_) | | | | '_ \| '_ \ / _ \ '__| \ \ / / || |_
| (_| | (_| | _ <| |_| | | | | | | | __/ | \ V /|__ _|
\__,_|\__, |_| \_\\__,_|_| |_|_| |_|\___|_| \_/ |_|
|___/
========== 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 :dgrv4_Gateway_serv:clean :dgrv4_Gateway_serv:bootJar
-
Locate the JAR file:
dgrv4_Gateway_serv/build/libs/digiRunner-{version}.jar
-
Run the JAR:
java -jar dgrv4_Gateway_serv/build/libs/digiRunner-{version}.jar --digiRunner.token.key-store.path=$PWD/dgrv4_Gateway_serv/keys
cd digiRunner/
docker build -t digirunner .
docker run -p 18080:18080 digirunner
Open your browser and navigate to: http://localhost:18080/dgrv4/login
You can also build your own jar using the make
command
make [task]
tasks:
license-report
: generate dependencies license report to license-report.htmlbuild-jar
: execute gradlew clean and than build, result in dgrv4_Gateway_serv/build/libs/digiRunner-v4.2.25.jarjava-run
: run digiRunner-v4.2.25.jar using java -jar commandbuild-image
: build docker imagerun-container
: run docker container