Azkaban搭建 3.44版本

1.创建元数据库

为Azkaban创建一个数据库:

# Example database creation command, although the db name doesn't need to be 'azkaban'

mysql> CREATE DATABASE azkaban;

 为Azkaban创建一个数据库用户:

# Example database creation command. The user name doesn't need to be 'azkaban'

mysql> CREATE USER 'username'@'%' IDENTIFIED BY 'password';

为用户赋予Azkaban数据库的增删查改的权限:

# Replace db, username with the ones created by the previous steps.

mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON .* to ''@'%' WITH GRANT OPTION;

sudo /sbin/service mysqld restart

编译源码:

# Build Azkaban

./gradlew build

# Clean the build

./gradlew clean

# Build and install distributions

./gradlew installDist

# Run tests

./gradlew test

# Build without running tests

./gradlew build -x test

命令执行完成后,会在各个模块的azkaban*/build/distributions目录下生成编译好的安装包,这里生成了tar.gz和zip类型的压缩包

mv /server/azkaban-3.44.0/azkaban-web-server/build/distributions/azkaban-web-server-0.1.0-SNAPSHOT.tar.gz /server

mv /server/azkaban-3.44.0/azkaban-exec-server/build/distributions/azkaban-exec-server-0.1.0-SNAPSHOT.tar.gz /server

解压缩tar包:tar -zxvf *

将azkaban sql表结构导入mysql

mysql> use azkaban;

mysql> source /opt/azkaban-db-3.32.0-7-gcdfb2c8/create-all-sql-3.32.0-7-gcdfb2c8.sql

2.配置keystore

azkaban-web-server-3.1.0$ keytool -keystore keystore -alias jetty -genkey -keyalg RSA

输入密钥库口令: 

密钥库口令太短 - 至少必须为 6 个字符

输入密钥库口令: 

再次输入新口令:

您的名字与姓氏是什么?

[Unknown]:  firstName

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

[Unknown]:  companyName

您的组织名称是什么?

[Unknown]:  groupName

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

[Unknown]:  beijing

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

[Unknown]:  beijing

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

[Unknown]:  CN

CN= firstName, OU= companyName, O= groupName, L=beijing, ST=beijing, C=CN是否正确?[否]:  Y

以上配置完成之后会在当前目录生成一个keystore文件。以下配置会用到。

解压tar包:会生成几个文件夹:

drwxr-xr-x 2 tinyv tinyv 4096 Mar 7 11:05 azkaban-db-3.44.0

drwxr-xr-x 7 tinyv tinyv 4096 Mar 13 15:32 azkaban-exec-server-3.44.0

drwxr-xr-x 8 tinyv tinyv 4096 Mar  7 11:05 azkaban-solo-server-3.44.0

drwxr-xr-x 6 tinyv tinyv 4096 May  8 10:51 azkaban-web-server-3.44.0

drwxr-xr-x 2 tinyv tinyv 4096 Mar  7 11:16 package

关于azkaban-web-server-3.44.0目录修改

将keystore 考贝到 azkaban web服务器根目录中.

cd /server/azkaban-3.44.0/azkaban-web-server-3.44.0

cp keystore azkaban/webserver

vi /server/azkaban-3.44.0/azkaban-web-server-3.44.0/conf/azkaban.properties

注意配置的默认时区是:default.timezone.id=America/Los_Angeles 修改为:default.timezone.id=Asia/Shanghai

下边是完整的azkaban.properties相关配置,其中有些是默认的

azkaban.name=Test

azkaban.label=My Local Azkaban

azkaban.color=#FF3601

azkaban.default.servlet.path=/index

web.resource.dir=/server/azkaban-3.44.0/azkaban-web-server-3.44.0/web/

default.timezone.id=America/Los_Angeles

# Azkaban UserManager class

user.manager.class=azkaban.user.XmlUserManager

user.manager.xml.file=/server/azkaban-3.44.0/azkaban-web-server-3.44.0/conf/azkaban-users.xml

# Loader for projects

executor.global.properties=/server/azkaban-3.44.0/azkaban-web-server-3.44.0/conf/global.properties

azkaban.project.dir=projects

database.type=mysql

mysql.port=3306

mysql.host=10.2.26.23

mysql.database=azkaban

mysql.user=azkaban

mysql.password=azkaban

mysql.numconnections=100

# Velocity dev mode

velocity.dev.mode=false

# Azkaban Jetty server properties.

#jetty.use.ssl=false

jetty.maxThreads=25

jetty.port=8081

jetty.ssl.port=8443

jetty.keystore=keystore

jetty.password=azkaban

jetty.keypassword=azkaban

jetty.truststore=keystore

jetty.trustpassword=azkaban

jetty.excludeCipherSuites=SSL_RSA_WITH_DES_CBC_SHA,SSL_DHE_RSA_WITH_DES_CBC_SHA,SSL_DHE_DSS_WITH_DES_CBC_SHA,SSL_RSA_EXPORT_WITH_RC4_40_MD5,SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,T

LS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA

# Azkaban Executor settings

executor.port=12321

# mail settings

mail.sender=hblfyla@163.com

mail.host=smtp.163.com

mail.user=hblfyla@163.com

mail.password=xiaoao0316

#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=/server/azkaban-3.44.0/azkaban-web-server-3.44.0/plugins/jobtypes


用户相关配置:



关于azkaban-exec-server-3.44.0目录修改

vi /server/azkaban-3.44.0/azkaban-exec-server-3.44.0/conf/azkaban.properties

default.timezone.id=America/Los_Angeles

# Azkaban JobTypes Plugins

azkaban.jobtype.plugin.dir=/server/azkaban-3.44.0/azkaban-exec-server-3.44.0/plugins/jobtypes

# Loader for projects

executor.global.properties=/server/azkaban-3.44.0/azkaban-exec-server-3.44.0/conf/global.properties

azkaban.project.dir=projects

database.type=mysql

mysql.port=3306

mysql.host=10.2.26.23

mysql.database=azkaban

mysql.user=azkaban

mysql.password=azkaban

mysql.numconnections=100

# Azkaban Executor settings

executor.maxThreads=50

executor.port=12321

executor.flow.threads=30

# JMX stats

jetty.connector.stats=true

executor.connector.stats=true

# uncomment to enable inmemory stats for azkaban

#executor.metric.reports=true

#executor.metric.milisecinterval.default=60000



3.启动相关服务

web服务器,在azkaban web服务器目录下执行启动命令,bin/azkaban-web-start.sh

注:在web服务器根目录运行

执行服务器,在执行服务器目录下执行启动命令,bin/azkaban-executor-start.sh ./

注:只能要执行服务器根目录运行

启动完成后,在浏览器(建议使用谷歌浏览器)中输入https://服务器IP地址:8443 ,即可访问azkaban服务了.在登录中输入刚才新的户用名及密码,点击 login.

推荐阅读更多精彩内容