rancher 离线安装powrjob
Last updated on November 20, 2024 am
🧙 Questions
离线安装powerjob
☄️ Ideas
资源下载
导入镜像
需要资源找我要
scp /Users/ispong/OneDrive/Downloads/docker/powerjob-3.2.2-amd64.tar root@47.92.37.247:/tmp
docker load -i /tmp/powerjob-3.2.2-amd64.tar
docker tag 7fabfd09d6f6 isxcode:8443/library/powerjob:3.2.2
docker push isxcode:8443/library/powerjob:3.2.2
创建目录
mkdir -p /data/powerjob
创建powerjob数据库
CREATE USER IF NOT EXISTS 'ispong'@'%' Identified BY 'ispong123';
CREATE DATABASE IF NOT EXISTS powerjob DEFAULT CHARSET utf8mb4;
GRANT ALL PRIVILEGES ON powerjob.* TO 'ispong'@'%';
Flush Privileges;
编辑配置文件
mkdir -p /data/powerjob/config/
vim /data/powerjob/config/application-daily.properties
oms.env=DAILY
logging.config=classpath:logback-dev.xml
####### 外部数据库配置(需要用户更改为自己的数据库配置) #######
# ispong :) 一般使用mysql做数据持久化
spring.datasource.core.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.core.jdbc-url=jdbc:mysql://172.23.39.226:30102/powerjob?useUnicode=true&characterEncoding=UTF-8
spring.datasource.core.username=ispong
spring.datasource.core.password=ispong123
spring.datasource.core.hikari.maximum-pool-size=20
spring.datasource.core.hikari.minimum-idle=5
####### mongoDB配置,非核心依赖,可移除 #######
# spring.data.mongodb.uri=mongodb://jacdba:jac2021@192.168.16.80:27017/powerjob-daily
####### 邮件配置(启用邮件报警则需要) #######
#spring.mail.host=smtp.163.com
#spring.mail.username=zqq
#spring.mail.password=qqz
#spring.mail.properties.mail.smtp.auth=true
#spring.mail.properties.mail.smtp.starttls.enable=true
#spring.mail.properties.mail.smtp.starttls.required=true
####### 资源清理配置 #######
oms.instanceinfo.retention=1
oms.container.retention.local=1
oms.container.retention.remote=-1
####### 缓存配置 #######
oms.instance.metadata.cache.size=1024
创建department
Container Name: isxcode-powerjob
Image: docker.io/library/powerjob:3.2.2
Pull Policy: IfNotPresent
Pull Secrets: local-harbor
变量
Variable Name: PARAMS
Value:--spring.config.additional-location=/config/
端口号
Service Type: Node Port
Name: powerjob-port
Private Container Port: 7700
Protocol: TCP
Listening: 30117
Service Type: Node Port
Name: powerjob-port-1
Private Container Port: 10086
Protocol: TCP
Listening: 30118
挂载磁盘
Mount Point -> Sub Path in Volume
/config -> config
访问
修改job字段的长度
Note:
powerjob的传参长度默认是200 可能不够用,我们需要设置为5000
alter table powerjob.job_info modify job_params varchar(5000) null;
🔗 Links
rancher 离线安装powrjob
https://ispong.isxcode.com/kubernetes/rancher/rancher 离线安装powrjob/