Pre Merge pull request !319 from RoaringFlame/k8s-deployment
commit
9439ba1bdb
@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
name: minio
|
||||
name: minio
|
||||
namespace: minio
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minio
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
containers:
|
||||
- name: minio
|
||||
image: minio/minio
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: tcp
|
||||
- containerPort: 9090
|
||||
protocol: TCP
|
||||
name: console
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- minio server /data --console-address ":9090"
|
||||
env:
|
||||
- name: MINIO_ACCESS_KEY
|
||||
value: minioadmin
|
||||
- name: MINIO_SECRET_KEY
|
||||
value: minioadmin
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /minio/health/ready
|
||||
port: 9000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: minio-data
|
||||
volumes:
|
||||
- name: minio-data
|
||||
hostPath:
|
||||
path: /run/desktop/mnt/host/c/k8sVolume/minio/data
|
||||
type: Directory
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: minio
|
@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: minio
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
type: NodePort
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- port: 9000
|
||||
name: tcp
|
||||
targetPort: 9000
|
||||
- port: 9090
|
||||
name: console
|
||||
targetPort: 9090
|
||||
nodePort: 30090
|
||||
selector:
|
||||
app: minio
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitor-sa
|
@ -0,0 +1,169 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap #
|
||||
metadata:
|
||||
name: prometheus-config
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
addonmanager.kubernetes.io/mode: EnsureExists
|
||||
data:
|
||||
prometheus.yml: |
|
||||
rule_files:
|
||||
- /etc/config/rules/*.rules
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost:9090
|
||||
|
||||
- job_name: kubernetes-nodes
|
||||
scrape_interval: 30s
|
||||
static_configs:
|
||||
- targets:
|
||||
- 192.168.73.135:9100
|
||||
- 192.168.73.138:9100
|
||||
- 192.168.73.139:9100
|
||||
- 192.168.73.140:9100
|
||||
|
||||
- job_name: kubernetes-apiservers
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
relabel_configs:
|
||||
- action: keep
|
||||
regex: default;kubernetes;https
|
||||
source_labels:
|
||||
- __meta_kubernetes_namespace
|
||||
- __meta_kubernetes_service_name
|
||||
- __meta_kubernetes_endpoint_port_name
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
- job_name: kubernetes-nodes-kubelet
|
||||
kubernetes_sd_configs:
|
||||
- role: node
|
||||
relabel_configs:
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_node_label_(.+)
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
- job_name: kubernetes-nodes-cadvisor
|
||||
kubernetes_sd_configs:
|
||||
- role: node
|
||||
relabel_configs:
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_node_label_(.+)
|
||||
- target_label: __metrics_path__
|
||||
replacement: /metrics/cadvisor
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
- job_name: kubernetes-service-endpoints
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
relabel_configs:
|
||||
- action: keep
|
||||
regex: true
|
||||
source_labels:
|
||||
- __meta_kubernetes_service_annotation_prometheus_io_scrape
|
||||
- action: replace
|
||||
regex: (https?)
|
||||
source_labels:
|
||||
- __meta_kubernetes_service_annotation_prometheus_io_scheme
|
||||
target_label: __scheme__
|
||||
- action: replace
|
||||
regex: (.+)
|
||||
source_labels:
|
||||
- __meta_kubernetes_service_annotation_prometheus_io_path
|
||||
target_label: __metrics_path__
|
||||
- action: replace
|
||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
source_labels:
|
||||
- __address__
|
||||
- __meta_kubernetes_service_annotation_prometheus_io_port
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
- action: replace
|
||||
source_labels:
|
||||
- __meta_kubernetes_namespace
|
||||
target_label: kubernetes_namespace
|
||||
- action: replace
|
||||
source_labels:
|
||||
- __meta_kubernetes_service_name
|
||||
target_label: kubernetes_name
|
||||
|
||||
- job_name: kubernetes-services
|
||||
kubernetes_sd_configs:
|
||||
- role: service
|
||||
metrics_path: /probe
|
||||
params:
|
||||
module:
|
||||
- http_2xx
|
||||
relabel_configs:
|
||||
- action: keep
|
||||
regex: true
|
||||
source_labels:
|
||||
- __meta_kubernetes_service_annotation_prometheus_io_probe
|
||||
- source_labels:
|
||||
- __address__
|
||||
target_label: __param_target
|
||||
- replacement: blackbox
|
||||
target_label: __address__
|
||||
- source_labels:
|
||||
- __param_target
|
||||
target_label: instance
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
- source_labels:
|
||||
- __meta_kubernetes_namespace
|
||||
target_label: kubernetes_namespace
|
||||
- source_labels:
|
||||
- __meta_kubernetes_service_name
|
||||
target_label: kubernetes_name
|
||||
|
||||
- job_name: kubernetes-pods
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
relabel_configs:
|
||||
- action: keep
|
||||
regex: true
|
||||
source_labels:
|
||||
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
|
||||
- action: replace
|
||||
regex: (.+)
|
||||
source_labels:
|
||||
- __meta_kubernetes_pod_annotation_prometheus_io_path
|
||||
target_label: __metrics_path__
|
||||
- action: replace
|
||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
source_labels:
|
||||
- __address__
|
||||
- __meta_kubernetes_pod_annotation_prometheus_io_port
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
- action: replace
|
||||
source_labels:
|
||||
- __meta_kubernetes_namespace
|
||||
target_label: kubernetes_namespace
|
||||
- action: replace
|
||||
source_labels:
|
||||
- __meta_kubernetes_pod_name
|
||||
target_label: kubernetes_pod_name
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: ["alertmanager:80"]
|
@ -0,0 +1,5 @@
|
||||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ruoyi-mysql-secret
|
||||
namespace: kube-ruoyi
|
||||
type: Opaque #base-64加密
|
||||
data:
|
||||
mysql-root-pass: cGFzc3dvcmQ=
|
||||
mysql-user: YWRtaW4=
|
||||
mysql-password: MTIzNDU2
|
@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ruoyi-nacos-config
|
||||
namespace: kube-ruoyi
|
||||
data:
|
||||
application.properties: |
|
||||
spring.datasource.platform=mysql
|
||||
db.num=1
|
||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.user=root
|
||||
db.password=password
|
||||
nacos.naming.empty-service.auto-clean=true
|
||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.metrics.export.elastic.enabled=false
|
||||
management.metrics.export.influx.enabled=false
|
||||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||
server.tomcat.basedir=/home/ruoyi/nacos/tomcat/logs
|
||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
nacos.core.auth.system.type=nacos
|
||||
nacos.core.auth.enabled=false
|
||||
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
|
||||
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
nacos.core.auth.caching.enabled=true
|
||||
nacos.core.auth.enable.userAgentAuthWhite=false
|
||||
nacos.core.auth.server.identity.key=serverIdentity
|
||||
nacos.core.auth.server.identity.value=security
|
||||
nacos.istio.mcp.server.enabled=false
|
@ -0,0 +1,37 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ruoyi-nacos
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ruoyi-nacos
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ruoyi-nacos
|
||||
spec:
|
||||
containers:
|
||||
- name: ruoyi-nacos
|
||||
image: nacos/nacos-server
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8848
|
||||
name: client
|
||||
- containerPort: 9848
|
||||
name: client-rpc
|
||||
- containerPort: 9849
|
||||
name: raft-rpc
|
||||
env:
|
||||
- name: MODE
|
||||
value: standalone
|
||||
volumeMounts:
|
||||
- mountPath: /home/nacos/conf/application.properties
|
||||
name: nacos-conf
|
||||
subPath: application.properties
|
||||
volumes:
|
||||
- name: nacos-conf
|
||||
configMap:
|
||||
name: ruoyi-nacos-config
|
@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ruoyi-nacos
|
||||
namespace: kube-ruoyi
|
||||
labels:
|
||||
app: ruoyi-nacos
|
||||
spec:
|
||||
type: NodePort
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- port: 8848
|
||||
name: server
|
||||
targetPort: 8848
|
||||
nodePort: 30848
|
||||
- port: 9848
|
||||
name: client-rpc
|
||||
targetPort: 9848
|
||||
- port: 9849
|
||||
name: raft-rpc
|
||||
targetPort: 9849
|
||||
selector:
|
||||
app: ruoyi-nacos
|
@ -0,0 +1,37 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ruoyi-nginx-config
|
||||
namespace: kube-ruoyi
|
||||
data:
|
||||
nginx.conf: |
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
location / {
|
||||
root /home/ruoyi/projects/ruoyi-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://ruoyi-gateway:8080/;
|
||||
}
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ruoyi-nginx
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ruoyi-nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ruoyi-nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: ruoyi-nginx
|
||||
image: nginx
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx/nginx.conf
|
||||
name: nginx-conf
|
||||
subPath: nginx.conf
|
||||
- mountPath: /home/ruoyi/projects/ruoyi-ui
|
||||
name: local-path #/usr/share/nginx/html 挂载到volumes中server+path
|
||||
volumes:
|
||||
- name: nginx-conf
|
||||
configMap:
|
||||
name: ruoyi-nginx-config
|
||||
- name: local-path
|
||||
hostPath:
|
||||
path: /run/desktop/mnt/host/c/k8sVolume/dist
|
||||
type: Directory
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ruoyi-nginx
|
||||
namespace: kube-ruoyi
|
||||
labels:
|
||||
name: ruoyi-nginx
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30080
|
||||
selector:
|
||||
app: ruoyi-nginx
|
||||
|
@ -0,0 +1,58 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: redis-config
|
||||
namespace: redis
|
||||
data:
|
||||
redis.conf: |-
|
||||
maxmemory 1000mb
|
||||
maxmemory-policy allkeys-lru
|
||||
protected-mode no
|
||||
tcp-backlog 511
|
||||
daemonize no
|
||||
supervised no
|
||||
dir /data
|
||||
pidfile /data/redis_6379.pid
|
||||
port 6379
|
||||
loglevel notice
|
||||
logfile ""
|
||||
databases 16
|
||||
stop-writes-on-bgsave-error yes
|
||||
rdbcompression yes
|
||||
rdbchecksum yes
|
||||
dbfilename dump.rdb
|
||||
replica-serve-stale-data yes
|
||||
replica-read-only no
|
||||
repl-diskless-sync no
|
||||
repl-diskless-sync-delay 5
|
||||
repl-disable-tcp-nodelay no
|
||||
replica-priority 100
|
||||
lazyfree-lazy-eviction no
|
||||
lazyfree-lazy-expire no
|
||||
lazyfree-lazy-server-del no
|
||||
replica-lazy-flush no
|
||||
appendonly no
|
||||
appendfilename "appendonly.aof"
|
||||
appendfsync everysec
|
||||
no-appendfsync-on-rewrite no
|
||||
auto-aof-rewrite-percentage 100
|
||||
auto-aof-rewrite-min-size 64mb
|
||||
aof-load-truncated yes
|
||||
aof-use-rdb-preamble yes
|
||||
lua-time-limit 5000
|
||||
slowlog-log-slower-than 10000
|
||||
slowlog-max-len 128
|
||||
latency-monitor-threshold 0
|
||||
notify-keyspace-events ""
|
||||
set-max-intset-entries 512
|
||||
hll-sparse-max-bytes 3000
|
||||
stream-node-max-bytes 4096
|
||||
stream-node-max-entries 100
|
||||
activerehashing yes
|
||||
client-output-buffer-limit normal 0 0 0
|
||||
client-output-buffer-limit replica 256mb 64mb 60
|
||||
client-output-buffer-limit pubsub 32mb 8mb 60
|
||||
hz 10
|
||||
dynamic-hz yes
|
||||
aof-rewrite-incremental-fsync yes
|
||||
rdb-save-incremental-fsync yes
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: redis
|
@ -0,0 +1,98 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
app: redis
|
||||
namespace: redis
|
||||
spec:
|
||||
serviceName: redis
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
initContainers:
|
||||
- name: config
|
||||
image: redis:7.0.6
|
||||
command: [ "sh", "-c" ]
|
||||
args:
|
||||
- |
|
||||
cp /tmp/redis/redis.conf /etc/redis/redis.conf
|
||||
|
||||
echo "finding master..."
|
||||
MASTER_FDQN=`hostname -f | sed -e 's/redis-[0-9]\./redis-0./'`
|
||||
if [ "$(redis-cli -h sentinel -p 5000 ping)" != "PONG" ]; then
|
||||
echo "master not found, defaulting to redis-0"
|
||||
if [ "$(hostname)" = "redis-0" ]; then
|
||||
echo "this is redis-0, not updating config..."
|
||||
else
|
||||
echo "updating redis.conf..."
|
||||
echo "\nslaveof $MASTER_FDQN 6379" >> /etc/redis/redis.conf
|
||||
fi
|
||||
else
|
||||
echo "sentinel found, finding master"
|
||||
MASTER="$(redis-cli -h sentinel -p 5000 sentinel get-master-addr-by-name mymaster | grep -E '(^redis-\d{1,})|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})')"
|
||||
echo "master found : $MASTER, updating redis.conf"
|
||||
echo "slaveof $MASTER 6379" >> /etc/redis/redis.conf
|
||||
fi
|
||||
volumeMounts:
|
||||
- name: redis-config
|
||||
mountPath: /etc/redis/
|
||||
- name: config
|
||||
mountPath: /tmp/redis/
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7.0.6
|
||||
command: [ "redis-server" ]
|
||||
args: [ "/etc/redis/redis.conf" ]
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: redis-config
|
||||
mountPath: /etc/redis/
|
||||
resources:
|
||||
limits:
|
||||
memory: 1100Mi
|
||||
requests:
|
||||
memory: 1100Mi
|
||||
volumes:
|
||||
- name: redis-config
|
||||
emptyDir: { }
|
||||
- name: config
|
||||
configMap:
|
||||
name: redis-config
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
storageClassName: hostpath
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 500Mi
|
||||
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: redis # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: redis
|
||||
namespace: redis
|
||||
spec:
|
||||
selector:
|
||||
app: redis # The service exposes Pods with label `app=redis`
|
||||
ports:
|
||||
- name: redis-port
|
||||
port: 6379
|
||||
nodePort: 30079
|
||||
type: NodePort
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kube-ruoyi
|
@ -0,0 +1,41 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ruoyi-sentinel
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ruoyi-sentinel
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ruoyi-sentinel
|
||||
spec:
|
||||
containers:
|
||||
- name: ruoyi-sentinel
|
||||
image: bladex/sentinel-dashboard
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8858
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: JAVA_TOOL_OPTIONS
|
||||
value: "-Dserver.port=8858 -Dcsp.sentinel.dashboard.server=localhost:8858 -Dproject.name=sentinel-dashboard"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ruoyi-sentinel
|
||||
namespace: kube-ruoyi
|
||||
labels:
|
||||
name: ruoyi-sentinel
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 8858
|
||||
targetPort: 8858
|
||||
nodePort: 30858
|
||||
selector:
|
||||
app: ruoyi-sentinel
|
||||
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-auth # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-auth
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-auth
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-auth
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-auth-server
|
||||
image: ruoyi-auth:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9200 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-auth
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-auth # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-auth
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-auth # The service exposes Pods with label `app=ruoyi-auth`
|
||||
ports: # Forward incoming connections on port 9200 to the target port 9200
|
||||
- name: http
|
||||
port: 9200
|
||||
targetPort: 9200
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-gateway # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-gateway
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-gateway
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-gateway
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-gateway-server
|
||||
image: ruoyi-gateway:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-gateway
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-gateway # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-gateway
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-gateway # The service exposes Pods with label `app=ruoyi-gateway`
|
||||
ports: # Forward incoming connections on port 8080 to the target port 8080
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-file # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-file
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-file
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-file
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-file-server
|
||||
image: ruoyi-modules-file:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9300 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-file
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-file # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-file
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-file # The service exposes Pods with label `app=ruoyi-file`
|
||||
ports: # Forward incoming connections on port 9300 to the target port 9300
|
||||
- name: http
|
||||
port: 9300
|
||||
targetPort: 9300
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-gen # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-gen
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-gen
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-gen
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-gen-server
|
||||
image: ruoyi-modules-gen:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9202 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-gen
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-gen # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-gen
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-gen # The service exposes Pods with label `app=ruoyi-gen`
|
||||
ports: # Forward incoming connections on port 9202 to the target port 9202
|
||||
- name: http
|
||||
port: 9202
|
||||
targetPort: 9202
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-job # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-job
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-job
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-job
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-job-server
|
||||
image: ruoyi-modules-job:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9203 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-job
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-job # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-job
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-job # The service exposes Pods with label `app=ruoyi-job`
|
||||
ports: # Forward incoming connections on port 9203 to the target port 9203
|
||||
- name: http
|
||||
port: 9203
|
||||
targetPort: 9203
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-system # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-system
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-system
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-system
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-system-server
|
||||
image: ruoyi-modules-system:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9201 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-system
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-system # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-system
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-system # The service exposes Pods with label `app=ruoyi-system`
|
||||
ports: # Forward incoming connections on port 9201 to the target port 9201
|
||||
- name: http
|
||||
port: 9201
|
||||
targetPort: 9201
|
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-monitor # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-monitor
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-monitor
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-monitor
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-monitor-server
|
||||
image: ruoyi-visual-monitor:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9100 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-monitor
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-monitor # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-monitor
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-monitor # The service exposes Pods with label `app=ruoyi-monitor`
|
||||
ports: # Forward incoming connections on port 9100 to the target port 9100
|
||||
- name: http
|
||||
port: 9100
|
||||
targetPort: 9100
|
@ -0,0 +1,37 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
||||
sentinel:
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# 控制台地址
|
||||
dashboard: 127.0.0.1:8718
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
dataId: sentinel-ruoyi-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
rule-type: gw-flow
|
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
@ -0,0 +1,73 @@
|
||||
apiVersion: apps/v1 # API version
|
||||
kind: Deployment # Type of kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-system # Name of the kubernetes resource
|
||||
namespace: kube-ruoyi
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-system
|
||||
spec:
|
||||
replicas: 1 # No. of replicas/pods to run in this deployment
|
||||
selector:
|
||||
matchLabels: # The deployment applies to any pods matching the specified labels
|
||||
app: ruoyi-system
|
||||
template: # Template for creating the pods in this deployment
|
||||
metadata:
|
||||
labels: # Labels that will be applied to each Pod in this deployment
|
||||
app: ruoyi-system
|
||||
spec: # Spec for the containers that will be run in the Pods
|
||||
containers:
|
||||
- name: ruoyi-system-server
|
||||
image: ruoyi-modules-system:3.6.2
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9201 # The port that the container exposes
|
||||
env: # Environment variables supplied to the Pod
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: k8s
|
||||
- name: SERVER_NAME
|
||||
value: ruoyi-system
|
||||
- name: NACOS_SERVER
|
||||
value: ruoyi-nacos # nacos svc name
|
||||
- name: NACOS_PORT
|
||||
value: "8848"
|
||||
- name: NACOS_SHARED_CONFIGS
|
||||
value: application-dev.yml
|
||||
- name: JAVA_OPTS
|
||||
value: -javaagent:/javaagent/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=k8s::$(SERVER_NAME) -Dskywalking.collector.backend_service=skywalking:11800
|
||||
volumeMounts:
|
||||
- mountPath: /javaagent
|
||||
name: agent-jar
|
||||
volumes:
|
||||
- emptyDir: { }
|
||||
name: agent-jar
|
||||
initContainers:
|
||||
# 官网用脚本命令行+args的方式执行多条command语句
|
||||
- command: ['sh']
|
||||
args:
|
||||
- "-c"
|
||||
- |
|
||||
cp -r /opt/skywalking-agent /javaagent
|
||||
chown -R 65534:65534 /javaagent
|
||||
/bin/chmod -R 777 /javaagent
|
||||
image: skywalking-agent:8.14.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: skywalking-agent
|
||||
volumeMounts:
|
||||
- mountPath: /javaagent
|
||||
name: agent-jar
|
||||
---
|
||||
apiVersion: v1 # API version
|
||||
kind: Service # Type of the kubernetes resource
|
||||
metadata:
|
||||
name: ruoyi-system # Name of the kubernetes resource
|
||||
labels: # Labels that will be applied to this resource
|
||||
app: ruoyi-system
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
type: NodePort # The service will be exposed by opening a Port on each node and proxying it.
|
||||
selector:
|
||||
app: ruoyi-system # The service exposes Pods with label `app=ruoyi-system`
|
||||
ports: # Forward incoming connections on port 9201 to the target port 9201
|
||||
- name: http
|
||||
port: 9201
|
||||
targetPort: 9201
|
@ -0,0 +1,17 @@
|
||||
## cat Dcokerfile
|
||||
|
||||
FROM docker.io/library/busybox:latest AS base
|
||||
|
||||
# 使用 ADD 下载 java-agent,你也可以使用其他下载命令,或者下载到本地,再 使用 COPY或者ADD 指令添加到 镜像里
|
||||
ADD https://dlcdn.apache.org/skywalking/java-agent/9.0.0/apache-skywalking-java-agent-9.0.0.tgz /tmp/
|
||||
RUN mkdir -p /opt \
|
||||
&& tar -xzf /tmp/apache-skywalking-java-agent-9.0.0.tgz -C /opt/ \
|
||||
&& rm -rf /tmp/*
|
||||
#ADD skywalking-agent.tar.gz /opt/
|
||||
RUN mkdir -p /javaagent
|
||||
|
||||
## java-agent 使用 方法
|
||||
## https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/readme/
|
||||
## java -javaagent:/opt/skywalking-agent/skywalking-agent.jar -jar yourApp.jar
|
||||
## -javaagent:/opt/skywalking-agent/skywalking-agent.jar=agent.service_name=yourAppName,collector.backend_service=127.0.0.1:11800
|
||||
## -javaagent:/opt/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=yourAppName -Dskywalking.collector.backend_service=127.0.0.1:11800
|
@ -0,0 +1,22 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
@ -0,0 +1,37 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
||||
sentinel:
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# 控制台地址
|
||||
dashboard: 127.0.0.1:8718
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
dataId: sentinel-ruoyi-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
rule-type: gw-flow
|
@ -0,0 +1,23 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9300
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9202
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
||||
|
@ -0,0 +1,22 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9203
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
@ -0,0 +1,22 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9201
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
@ -0,0 +1,22 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9100
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ${SERVER_NAME}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: ${NACOS_SERVER}:${NACOS_PORT}
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- ${NACOS_SHARED_CONFIGS}
|
Loading…
Reference in new issue