虽然是虚拟机,我装带界面的有的黑屏有的正常,一怒,直接xshell+Centos服务器版,真刺激,舒服,纵享丝滑。。。
下载jdk1.8+,你直接用centos下open-jdk也可以,也有报错的可能
官网jdk包
链接: https://pan.baidu.com/s/1En7qcf1395rUauEaCv8kkg 提取码: 99p2
配置方法:https://blog.csdn.net/u014182745/article/details/77155427 都差不多
github下载 https://github.com/azkaban/azkaban/archive/3.72.1.tar.gz
百度网盘链接: https://pan.baidu.com/s/1tzrE8X8YO8xBUNA-Cmv2pA 提取码: xkrg
以下所有路径为我个人centos上路径,自行对应更改
上传到centos /gzkj/down下
tar -zxvf azkaban-3.72.1.tar.gz
cd azkaban-3.72.1
然后编译,网上各种教程,官网也看了,我只想搞个demo出来,说话的方式简单点。。。。
用的gradle,用过,但是不熟,最简单快速的方法
可以略过的步骤
改centos 源,https://www.cnblogs.com/gandoufu/p/9665762.html
改build.gradle中
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
不改可能贼鸡儿慢
然后就是在azkaban-3.72.1中一顿操作了
说了简单,就直接干
cd /gzkj/down/azkaban-3.72.1/azkaban-db
../gradlew build installDist
cd /gzkj/down/azkaban-3.72.1/azkaban-web-server
../gradlew build installDist
cd /gzkj/down/azkaban-3.72.1/azkaban-exec-server
../gradlew build installDist
然后转mysql 建数据库 导表(https://azkaban.readthedocs.io/en/latest/getStarted.html#getting-started-with-the-multi-executor-server)
mysql自己百度(懒省事直接先用root 后面需要再加用户)
进入mysql中 source /gzkj/down/azkaban-3.72.1/azkaban-db/build/sql/create-all-sql-0.1.0-SNAPSHOT.sql
导完表
配置keystore
keytool -keystore keystore-alias jetty -genkey -keyalg RSA
把生成的keystore复制到azkaban-web-server下,但是这玩意是不是必须的我也不知道
改配置文件
# Azkaban Personalization Settings
azkaban.name=Test
azkaban.label=My Local Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
default.timezone.id=Asia/Shanghai #时区
azkaban.jobtype.plugin.dir=plugins/jobtypes
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
user.manager.xml.file=conf/azkaban-users.xml
# Loader for projects
executor.global.properties=conf/global.properties
azkaban.project.dir=projects
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.use.ssl=false
jetty.maxThreads=25
jetty.port=8081 #web端口
jetty.ssl.port=8443
jetty.keystore=/gzkj/projects/azkaban/azkaban-web-server-0.1.0-SNAPSHOT/keystore
jetty.password=123456
jetty.keypassword=123456
jetty.trustpassword=123456
# Azkaban Executor settings
executor.port=12321
# mail settings
mail.sender=
mail.host=
# User facing web server configurations used to construct the user facing server URLs. They are useful when there is a reverse proxy between Azkaban web servers and users.
# enduser -> myazkabanhost:443 -> proxy -> localhost:8081
# when this parameters set then these parameters are used to generate email links.
# if these parameters are not set then jetty.hostname, and jetty.port(if ssl configured jetty.ssl.port) are used.
# azkaban.webserver.external_hostname=myazkabanhost.com
# azkaban.webserver.external_ssl_port=443
# azkaban.webserver.external_port=8081
job.failure.email=
job.success.email=
lockdown.create.projects=false
cache.directory=cache
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# Azkaban mysql settings by default. Users should configure their own username and password.
database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=root
mysql.password=
mysql.numconnections=100
#Multiple Executor
azkaban.use.multiple.executors=true
azkaban.executorselector.filters=StaticRemainingFlowSize,CpuStatus(注意,默认这里6g以下内存,会一直preparing,删除MinimumFreeMemory)
azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1
azkaban.executorselector.comparator.Memory=1
azkaban.executorselector.comparator.LastDispatched=1
azkaban.executorselector.comparator.CpuUsage=1
# Azkaban Personalization Settings
azkaban.name=Test
azkaban.label=My Local Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
default.timezone.id=Asia/Shanghai
azkaban.jobtype.plugin.dir=plugins/jobtypes
# Azkaban UserManager class
user.manager.class=azkaban.user.XmlUserManager
user.manager.xml.file=conf/azkaban-users.xml
# Loader for projects
executor.global.properties=conf/global.properties
azkaban.project.dir=projects
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.use.ssl=false
jetty.maxThreads=25
jetty.port=8081 #web端口
# Where the Azkaban web server is located
azkaban.webserver.url=http://localhost:8081
# mail settings
mail.sender=
mail.host=
# User facing web server configurations used to construct the user facing server URLs. They are useful when there is a reverse proxy between Azkaban web servers and users.
# enduser -> myazkabanhost:443 -> proxy -> localhost:8081
# when this parameters set then these parameters are used to generate email links.
# if these parameters are not set then jetty.hostname, and jetty.port(if ssl configured jetty.ssl.port) are used.
# azkaban.webserver.external_hostname=myazkabanhost.com
# azkaban.webserver.external_ssl_port=443
# azkaban.webserver.external_port=8081
job.failure.email=
job.success.email=
lockdown.create.projects=false
cache.directory=cache
# JMX stats
jetty.connector.stats=true
executor.connector.stats=true
# Azkaban plugin settings
azkaban.jobtype.plugin.dir=plugins/jobtypes #插件
# Azkaban mysql settings by default. Users should configure their own username and password.
database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=root
mysql.password=
mysql.numconnections=100
# Azkaban Executor settings
executor.port=12321
executor.maxThreads=50
executor.flow.threads=30
cd /gzkj/down/azkaban-3.72.1/azkaban-exec-server/build/install/azkaban-exec-server
./bin/start-exec.sh
curl -G "localhost:$(<./executor.port)/executor?action=activate" && echo #必须要运行
出现 {"status":"success"}启动成功
cd /gzkj/down/azkaban-3.72.1/azkaban-web-server/build/install/azkaban-web-server
./bin/start-web.sh
搞定,访问http://ip:8081
无法访问的话,看看端口开没,在azkaban-web-server和azkaban-exec-server下面也有 .out后缀的日志文件
用户名:azkaban
密码: azkaban
在/gzkj/down/azkaban-3.72.1/azkaban-web-server/build/install/azkaban-web-server/conf/azkaban-users.xml里面配
添加任务https://www.jianshu.com/p/c7d6bf6191e7直接看7.1 单一job示例
我是个菜鸡,只是想看一下helloworld,太tm难了,凌晨收工。。。