Centos7下Azkaban3.73的安装部署

1、软件介绍

Azkaban Web 服务器:azkaban-web-server-3.73.1.tar.gz

Azkaban Excutor 执行服务器:azkaban-exec-server-3.73.1.tar.gz

Azkaban 初始化脚本文件:azkaban-db-3.73.1.tar.gz

2、软件下载

二进制安装包下载地址:https://download.csdn.net/download/NDF923/18860277

3、安装说明

将安装文件上传到集群,最好上传到安装 hive、sqoop、spark 的机器上,方便命令的执行。

4、安装步骤

(1)上传安装包并解压缩到指定目录

mkdir /opt/soft/azkaban/

tar -zxvf azkaban-web-server-3.73.1.tar.gz -C /opt/soft/azkaban/

tar -zxvf azkaban-exec-server-3.73.1.tar.gz -C /opt/soft/azkaban/

(2)解压数据库脚本

将azkaban-db-3.73.1.tar.gz上传到MySQL所在的服务器上并解压

tar -zxvf azkaban-db-3.73.1.tar.gz  -C /opt/scripts/

(3)创建MySQL数据库和用户

create database azkaban default character set='utf8';

CREATE USER 'azkaban'@'localhost' IDENTIFIED BY 'Hadoop_123';

CREATE USER 'azkaban'@'hadoop05' IDENTIFIED BY 'Hadoop_123';

CREATE USER 'azkaban'@'%' IDENTIFIED BY 'Hadoop_123';

GRANT ALL PRIVILEGES ON azkaban.* TO 'azkaban'@'localhost' IDENTIFIED BY 'Hadoop_123' with grant option;  

GRANT ALL PRIVILEGES ON azkaban.* TO 'azkaban'@'hadoop05' IDENTIFIED BY 'Hadoop_123' with grant option;  

GRANT ALL PRIVILEGES ON azkaban.* TO 'azkaban'@'%' IDENTIFIED BY 'Hadoop_123' with grant option;

FLUSH PRIVILEGES;

(4)初始化脚本

在mysql所在服务器执行如下脚本

source /opt/scripts/create-all-sql-3.73.1.sql

(5)生成keystore文件

cd /opt/soft/azkaban/

keytool -keystore keystore -alias jetty -genkey -keyalg RSA

输入密钥库口令:                      # Hadoop_123

再次输入新口令:                     # Hadoop_123

您的名字与姓氏是什么?

  [Unknown]:  

您的组织单位名称是什么?

  [Unknown]:  

您的组织名称是什么?

  [Unknown]:  

您所在的城市或区域名称是什么?

  [Unknown]:  

您所在的省/市/自治区名称是什么?

  [Unknown]:  

该单位的双字母国家/地区代码是什么?

  [Unknown]:  CN                    #这个一定要输入

CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN是否正确?

  [否]:  是

输入 的密钥口令

    (如果和密钥库口令相同, 按回车):       #按回车即可

#将生成的keystore文件拷贝到web-server目录下

cp keystore azkaban-web-server-3.73.1    

(6)修改时区(如果之前配置过,可跳过)

\cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

    

(7)配置azkaban web服务器

vim azkaban-web-server-3.73.1/conf/azkaban.properties

# Azkaban Personalization Settings

azkaban.name=zsTax

azkaban.label=zsTax 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=/opt/soft/azkaban/azkaban-web-server-3.73.1/conf/azkaban-users.xml

# Loader for projects

executor.global.properties=/opt/soft/azkaban/azkaban-web-server-3.73.1/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

#最大线程数

jetty.maxThreads=25

#Jetty SSL 端口

jetty.ssl.port=8443

#Jetty 端口

jetty.port=8081

#SSL 文件名

jetty.keystore=/opt/soft/azkaban/azkaban-web-server-3.73.1/keystore

#SSL 文件密码

jetty.password=Hadoop_123

#Jetty 主密码 与 keystore 文件相同

jetty.keypassword=Hadoop_123

#SSL 文件名

jetty.truststore=/opt/soft/azkaban/azkaban-web-server-3.73.1/keystore

# SSL 文件密码

jetty.trustpassword=Hadoop_123

# Azkaban Executor settings

#执行服务器端口

executor.port=12321

# mail settings

# 邮件设置(可选项)

[email protected] #发送邮箱

mail.host=smtp.163.com #发送邮箱 smtp 地址

mail.user=xxxxxxxx #此处要和sender的值一样,否则会报错

mail.password=********** #邮箱密码

[email protected] #任务失败时发送邮件的地址(此项配置不生效,不知为何)

[email protected] #任务成功时发送邮件的地址(此项配置不生效,不知为何)

lockdown.create.projects=false

cache.directory=cache #缓存目录

# 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

# 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=192.168.1.201

mysql.database=azkaban

mysql.user=azkaban

mysql.password=Hadoop_123

mysql.numconnections=100

#Multiple Executor

azkaban.use.multiple.executors=true

#如果内存不够6G,要将MinimumFreeMemory删掉,否则回报:[Azkaban] Unable to get scheduled flow triggers

#azkaban.executorselector.filters=StaticRemainingFlowSize,MinimumFreeMemory,CpuStatus

azkaban.executorselector.filters=StaticRemainingFlowSize,CpuStatus

azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1

azkaban.executorselector.comparator.Memory=1

azkaban.executorselector.comparator.LastDispatched=1

azkaban.executorselector.comparator.CpuUsage=1

(8)配置azkaban executor服务器

vim azkaban-exec-server-3.73.1/conf/azkaban.properties

# Azkaban Personalization Settings

azkaban.name=zsTax

azkaban.label=zsTax Azkaban

azkaban.color=#FF3601

azkaban.default.servlet.path=/index

web.resource.dir=web/

default.timezone.id=Asia/Shanghai

# Loader for projects

azkaban.jobtype.plugin.dir=/opt/soft/azkaban/azkaban-exec-server-3.73.1/plugins/jobtypes

executor.global.properties=/opt/soft/azkaban/azkaban-exec-server-3.73.1/conf/global.properties

azkaban.project.dir=projects

# Velocity dev mode

# Azkaban Executor settings

#执行服务器端口

executor.port=12321

executor.maxThreads=50

executor.flow.threads=30

# Azkaban mysql settings by default. Users should configure their own username and password.

database.type=mysql

mysql.port=3306

mysql.host=192.168.1.201

mysql.database=azkaban

mysql.user=azkaban

mysql.password=Hadoop_123

mysql.numconnections=100

5、启动

(1)启动并激活executor服务器

启动:

cd azkaban-exec-server-3.73.1/

./bin/start-exec.sh

激活(每次重启executor服务器都需要激活):

curl http://hadoop05:12321/executor?action=activate

(2)启动web服务器

cd azkaban-web-server-3.73.1/

./bin/start-web.sh

(3)访问webUI

https://hadoop05:8443/index

6、邮件配置

(1)在azkaban任务包,即所有.job文件的根目录下创建一个以.properties为扩展名的文件,(如notifyEmil.properties名字无所谓)将此文件一同打包多个邮箱可以用逗号隔开。

内容如下:

#多个邮箱可以用逗号隔开 

#失败提醒

[email protected],[email protected]

#成功提醒人

[email protected],[email protected]

#执行(总是)提醒人

[email protected],[email protected]

(2)在.job文件中添加提醒人邮件地址

type=command

command= echo 'test'

failure.emails=***@****.cn

success.emails=***@****.cn

notify.emails =***@****.cn

(3)在web界面上配置

azkaban启动后,创建好所需要的project(.job文件无需设置)进入project–>Execute Flow–>Notification,配置邮件提醒(只生效一次)

Centos7下Azkaban3.73的安装部署_第1张图片

 

注意:

1)每次重启azkaban都要先启动executor服务器,并激活,然后再启动web服务器

2)启动azkaban的Linux用户建议使用有操作集群权限的用户,比如:使用ambari搭建的集群,就用hdfs用户启动azkaban,否则执行sqoop、hive、spark等定时任务时,会报权限不足的错误

你可能感兴趣的:(大数据,项目部署与配置,大数据,centos,定时任务)