二进制部署k8s集群v1.23.9版本-21-安装LTS任务调度
21.1、准备镜像
192.168.1.200服务器操作
lts-jobtracker镜像
docker pull harbor.qgutech.com/qx-apaas/lts-jobtracker:v1
docker tag 8f1e3d395515 harbor.qgutech.com/middleware/lts-jobtracker:v1
docker push harbor.qgutech.com/middleware/lts-jobtracker:v1
lts-admin镜像
docker pull harbor.qgutech.com/qx-apaas/lts-admin:v1
docker tag 40ab7ed88643 harbor.qgutech.com/middleware/lts-admin:v1
docker push harbor.qgutech.com/middleware/lts-admin:v1
21.2、准备配置文件并创建共享目录
192.168.1.200操作
mkdir -p /data/nfs-volume/lts/conf/
mkdir -p /data/nfs-volume/lts/logs
cd /data/nfs-volume/lts/conf/
vim lts-admin.cfg
console.username=admin
console.password=qixiao@lts123!@#
contextPath=/qts
port=38081
registryAddress=redis://redis-lts:36379
clusterName=qixiao_lowcode
configs.zk.client=zkclient
configs.jdbc.url=jdbc:mysql://mysql:3306/qixiao-apaas-qts
configs.jdbc.username=qixiao
configs.jdbc.password=qixiao123!@#
jdbc.datasource.provider=mysql
lts.monitorAgent.enable=true
jobT.job.logger=mysql
jobT.job.queue=mysql
vim jobtracker.cfg
registryAddress=redis://redis-lts:36379
listenPort=3502
clusterName=qixiao_lowcode
configs.job.logger=mysql
configs.zk.client=zkclient
configs.job.queue=mysql
bindIp=192.168.1.201
configs.jdbc.url=jdbc:mysql://mysql:3306/qixiao-apaas-qts
configs.jdbc.username=qixiao
configs.jdbc.password=qixiao123!@#
configs.mongo.addresses=127.0.0.1:27017
configs.mongo.database=lts
vim lts-monitor.cfg
registryAddress=redis://redis-lts:36379
clusterName=qixiao_lowcode
configs.job.logger=mysql
configs.zk.client=zkclient
configs.job.queue=mysql
configs.jdbc.url=jdbc:mysql://mysql:3306/qixiao-apaas-qts
configs.jdbc.username=qixiao
configs.jdbc.password=qixiao123!@#
bindIp=192.168.1.201
configs.mongo.addresses=127.0.0.1:27017
configs.mongo.database=lts
jdbc.datasource.provider=mysql
21.3、准备资源配置清单
mkdir -p /data/k8s-yaml/lts-jobtracker
mkdir -p /data/k8s-yaml/lts-admin
cd /data/k8s-yaml/lts-jobtracker
vim dp.yaml
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
name: lts-jobtracker
name: lts-jobtracker
namespace: middleware
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 7
selector:
matchLabels:
name: lts-jobtracker
template:
metadata:
labels:
app: lts-jobtracker
name: lts-jobtracker
spec:
containers:
- name: lts-jobtracker
image: harbor.qgutech.com/middleware/lts-jobtracker:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3502
hostPort: 3502
protocol: TCP
volumeMounts:
- name: jobtracker-config
mountPath: /lts/conf/zoo
- name: jobtracker-logs
mountPath: /lts/logs
imagePullSecrets:
- name: harbor
volumes:
- nfs:
server: hfqg1-200
path: /data/nfs-volume/lts/conf
name: jobtracker-config
- nfs:
server: hfqg1-200
path: /data/nfs-volume/lts/logs
name: jobtracker-logs
vim svc.yaml
apiVersion: v1
kind: Service
metadata:
name: lts-jobtracker
namespace: middleware
spec:
ports:
- name: jobtracker
port: 3502
targetPort: 3502
protocol: TCP
selector:
app: lts-jobtracker`
cd /data/k8s-yaml/lts-admin
vim dp.yaml
`kind: Deployment
apiVersion: apps/v1
metadata:
labels:
name: lts-admin
name: lts-admin
namespace: middleware
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 7
selector:
matchLabels:
name: lts-admin
template:
metadata:
labels:
app: lts-admin
name: lts-admin
spec:
containers:
- name: lts-admin
image: harbor.qgutech.com/middleware/lts-admin:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 38081
hostPort: 38081
protocol: TCP
volumeMounts:
- name: admin-config
mountPath: /lts/conf
- name: admin-logs
mountPath: /lts/logs
imagePullSecrets:
- name: harbor
volumes:
- nfs:
server: hfqg1-200
path: /data/nfs-volume/lts/conf
name: admin-config
- nfs:
server: hfqg1-200
path: /data/nfs-volume/lts/logs
name: admin-logs
vim svc.yaml
apiVersion: v1
kind: Service
metadata:
name: lts-admin
namespace: middleware
spec:
ports:
- name: admin
port: 38081
targetPort: 38081
protocol: TCP
selector:
app: lts-admin
vim ingress.yaml
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: lts-admin
namespace: middleware
spec:
rules:
- host: qts-test.qgutech.com
http:
paths:- path: /
pathType: Prefix
backend:
service:
name: lts-admin
port:
number: 38081
- path: /
21.4、应用资源配置清单
192.168.1.201操作
kubectl apply -f http://k8s-yaml.qgutech.com/lts-jobtracker/dp.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/lts-jobtracker/svc.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/lts-admin/dp.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/lts-admin/svc.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/lts-admin/ingress.yaml
21.5、界面访问
http://qts-test.qgutech.com
至此,LTS任务调度系统安装完成,谢谢观看,如果需要配置文件及安装包,可在评论区评论。
本文来自博客园,作者:霸都运维,转载请注明原文链接:https://www.cnblogs.com/wangjie20200529/p/16741503.html