Hadoop离线_azkaban的安装部署

1246-谭同学

发表文章数:140

热门标签

,
首页 » 大数据 » 正文


1.azkaban的编译

1.环境需求:jdk版本要用1.8
2.编译命令

cd /export/softwares/
wget https://github.com/azkaban/azkaban/archive/azkaban-3.51.0.tar.gz
tar -zxvf azkaban-3.51.0.tar.gz -C ../servers/

cd /export/servers/azkaban-3.51.0/
yum -y install git
yum -y install gcc-c++
./gradlew build installDist -x test

3.编译完成后需要在目录/export/servers/azkaban-3.51.0/azkaban-exec-server/build/distributions拿到需要的三个安装包:
azkaban-exec-server-0.1.0-SNAPSHOT.tar.gz
azkaban-solo-server-0.1.0-SNAPSHOT.tar.gz
azkaban-web-server-0.1.0-SNAPSHOT.tar.gz
4.在/export/servers/azkaban-3.51.0/az-exec-util/src/main/c下拿到需要的C文件:
execute-as-user.c
5.在/export/servers/azkaban-3.51.0/azkaban-db/build/install/azkaban-db下拿到需要的数据库脚本:
create-all-sql-0.1.0-SNAPSHOT.sql

2.azkaban单服务模式安装与使用


1.解压安装包
cd /export/softwares/ 把azkaban-solo-server-0.1.0-SNAPSHOT.tar.gz安装包上传到该目录
解压安装包
tar -zxvf azkaban-solo-server-0.1.0-SNAPSHOT.tar.gz -C ../servers

2.修改两个配置文件
cd /export/servers/azkaban-solo-server-0.1.0-SNAPSHOT/conf
vim azkaban.properties
只需要把时区修改得和linux的时区相同

default.timezone.id=Asia/Shanghai 

cd /export/servers/azkaban-solo-server-0.1.0-SNAPSHOT/plugins/jobtypes
vim commonprivate.properties

# set exeute-as-user
execute.as.user=false
memCheck.enabled=false		// 添加这一行,防止内存检查

3.启动solo-server
cd /export/servers/azkaban-solo-server-0.1.0-SNAPSHOT
bin/start-solo.sh

4.浏览器页面访问
访问地址:http://192.168.0.30:8081/
登录界面,登录用户名和密码都是azkaban
Hadoop离线_azkaban的安装部署

3.azkaban两个服务模式安装与使用

1.数据库准备
mysql -uroot -p进入mysql
执行以下命令:
CREATE DATABASE azkaban; 创建azkaban数据库
CREATE USER 'azkaban'@'%' IDENTIFIED BY 'azkaban';创建azkaban用户
GRANT all privileges ON azkaban.* to 'azkaban'@'%' identified by 'azkaban' WITH GRANT OPTION; 授予远程权限
flush privileges;刷新权限
use azkaban;
source /export/softwares/create-all-sql-0.1.0-SNAPSHOT.sql;

2.把需要的安装包上传到/export/softwares/,并解压
cd /export/softwares/
tar -zxvf azkaban-exec-server-0.1.0-SNAPSHOT.tar.gz -C ../servers/
mv azkaban-exec-server-0.1.0-SNAPSHOT/ azkaban-exec-server-3.51.0
tar -zxvf azkaban-web-server-0.1.0-SNAPSHOT.tar.gz -C ../servers/
mv azkaban-web-server-0.1.0-SNAPSHOT/ azkaban-web-server-3.51.0

3.安装SSL安全认证
安装ssl安全认证,允许我们使用https的方式访问我们的azkaban的web服务
cd /export/servers/azkaban-web-server-3.51.0
keytool -keystore keystore -alias jetty -genkey -keyalg RSA
密码一直输入azkaban

4.azkaban web server安装
修改azkaban-web-server的配置文件
cd /export/servers/azkaban-web-server-3.51.0/conf
vim azkaban.properties

# Azkaban Personalization Settings
azkaban.name=Azkaban
azkaban.label=My Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
default.timezone.id=Asia/Shanghai
# 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=true
jetty.maxThreads=25
jetty.port=8081

jetty.ssl.port=8443
jetty.keystore=/export/servers/azkaban-web-server-3.51.0/keystore
jetty.password=azkaban
jetty.keypassword=azkaban
jetty.truststore=/export/servers/azkaban-web-server-3.51.0/keystore
jetty.trustpassword=azkaban


# Azkaban Executor settings
# 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=node03
mysql.database=azkaban
mysql.user=azkaban
mysql.password=azkaban
mysql.numconnections=100
#Multiple Executor
azkaban.use.multiple.executors=true
#azkaban.executorselector.filters=StaticRemainingFlowSize,MinimumFreeMemory,CpuStatus
azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1
azkaban.executorselector.comparator.Memory=1
azkaban.executorselector.comparator.LastDispatched=1
azkaban.executorselector.comparator.CpuUsage=1

azkaban.activeexecutor.refresh.milisecinterval=10000
azkaban.queueprocessing.enabled=true
azkaban.activeexecutor.refresh.flowinterval=10
azkaban.executorinfo.refresh.maxThreads=10

5.azkaban executor server安装
修改azkaban-exex-server配置文件
cd /export/servers/azkaban-exec-server-3.51.0/conf
vim azkaban.properties</font>

# Azkaban Personalization Settings
azkaban.name=Azkaban
azkaban.label=My Azkaban
azkaban.color=#FF3601
azkaban.default.servlet.path=/index
web.resource.dir=web/
default.timezone.id=Asia/Shanghai
# 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=true
jetty.maxThreads=25
jetty.port=8081
jetty.keystore=/export/servers/azkaban-web-server-3.51.0/keystore
jetty.password=azkaban
jetty.keypassword=azkaban
jetty.truststore=/export/servers/azkaban-web-server-3.51.0/keystore
jetty.trustpassword=azkaban
# Where the Azkaban web server is located
azkaban.webserver.url=http://node03:8443
# 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=node03
mysql.database=azkaban
mysql.user=azkaban
mysql.password=azkaban
mysql.numconnections=100
# Azkaban Executor settings
executor.maxThreads=50
executor.flow.threads=30

6.添加插件
cp /export/softwares/execute-as-user.c /export/servers/azkaban-exec-server-3.51.0/plugins/jobtypes/ 把上传的c文件拷贝到指定目录下
yum -y install gcc-c++ 如果提示gcc command not found,那么就在线安装gcc+c++即可
执行以下命令生成execute-as-user
cd /export/servers/azkaban-exec-server-3.51.0/plugins/jobtypes
gcc execute-as-user.c -o execute-as-user
chown root execute-as-user
chmod 6050 execute-as-user

7.修改配置文件
cd /export/servers/azkaban-exec-server-3.51.0/plugins/jobtypes
vim commonprivate.properties

execute.as.user=false
memCheck.enabled=false
azkaban.native.lib=/export/servers/azkaban-exec-server-3.51.0/plugins/jobtypes

8.启动服务
cd /export/servers/azkaban-exec-server-3.51.0
bin/start-exec.sh启动exec server
curl -G "node03:$(<./executor.port)/executor?action=activate" && echo 激活exec server
cd /export/servers/azkaban-web-server-3.51.0/
bin/start-web.sh 启动web server

未经允许不得转载:作者:1246-谭同学, 转载或复制请以 超链接形式 并注明出处 拜师资源博客
原文地址:《Hadoop离线_azkaban的安装部署》 发布于2021-02-09

分享到:
赞(0) 打赏

评论 抢沙发

评论前必须登录!

  注册



长按图片转发给朋友

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

Vieu3.3主题
专业打造轻量级个人企业风格博客主题!专注于前端开发,全站响应式布局自适应模板。

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录

Q Q 登 录
微 博 登 录