【Azkaban】Azkaban 3.1的安装

1.下载

git clone https://github.com/azkaban/azkaban.git

2.build

To build Azkaban packages from source, run:

./gradlew distTar
The above command builds all Azkaban packages and packages them into GZipped Tar archives. To build Zip archives, run:

./gradlew distZip
If not building for the first time, it's good to clean first:

./gradlew clean

3.复制build 后的tar包

cp /opt/azkaban/build/distributions/*.tar.gz  /opt

4.解压缩

 cd /opt
 tar zxvf azkaban-exec-server-3.1.0.tar.gz
 tar zxvf azkaban-web-server-3.1.0.tar.gz
 tar zxvf azkaban-sql-3.1.0.tar.gz

5.安装mysql

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm 
yum install mysql-community-server
systemctl status mysqld.service

6.设置mysql账号

mysql -uroot
mysql> set password for 'root'@'localhost' = password('mysql');
            Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE azkaban;
            Query OK, 1 row affected (0.01 sec)

mysql> CREATE USER 'azkaban'@'%' IDENTIFIED BY 'azkaban';
            Query OK, 0 rows affected (0.01 sec)

mysql> GRANT ALL ON azkaban.* to 'azkaban'@'localhost' IDENTIFIED BY 'azkaban';
            Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
            Query OK, 0 rows affected (0.00 sec)     

7.导入azkaban sql

mysql> use azkaban;

mysql> source /opt/azkaban-sql-3.1.0/create-all-sql-3.1.0.sql

mysql> source /opt/azkaban-sql-3.1.0/update.active_executing_flows.3.1.sql
     
mysql> source /opt/azkaban-sql-3.1.0/update.execution_flows.3.1.sql

8.配置keystore

richard@parllay:/opt/azkaban-web-server-3.1.0$ keytool -keystore keystore -alias jetty -genkey -keyalg RSA
输入密钥库口令:  
密钥库口令太短 - 至少必须为 6 个字符
输入密钥库口令:  
再次输入新口令: 
您的名字与姓氏是什么?
[Unknown]:  cao
您的组织单位名称是什么?
[Unknown]:  parllay
您的组织名称是什么?
[Unknown]:  fenghuotai
您所在的城市或区域名称是什么?
[Unknown]:  beijing
您所在的省/市/自治区名称是什么?
[Unknown]:  beijing
该单位的双字母国家/地区代码是什么?
[Unknown]:  CN
CN=cao, OU=parllay, O=fenghuotai, L=beijing, ST=beijing, C=CN是否正确?[否]:  Y

9.配置 conf/azkaban.properties

cat conf/azkaban.properties 
# 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=America/Los_Angeles

# 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

database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=azkaban
mysql.password=azkaban
mysql.numconnections=100

# Velocity dev mode
velocity.dev.mode=false

# Azkaban Jetty server properties.
jetty.maxThreads=25
jetty.ssl.port=8443
# jetty.use.ssl=false
jetty.port=8081
jetty.keystore=keystore
jetty.password=password
jetty.keypassword=keypassword
jetty.truststore=keystore
jetty.trustpassword=password
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,TLS_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= 
mail.host=
job.failure.email=
job.success.email=

lockdown.create.projects=false

cache.directory=cache

# JMX stats
jetty.connector.stats=true
executor.connector.stats=true

10.用户设置

 进入 azkaban web 服务器 conf 目录,修改 azkaban-users.xml ,增加管理员用户:
     

11.然后启动azkaban web服务器

cd /opt/azkaban-web-server-3.1.0/
bin/azkaban-web-start.sh 

12.访问验证https://localhost:8081

13.接下来配置执行端

 # Azkaban
 default.timezone.id=America/Los_Angeles

 # Azkaban JobTypes Plugins
 azkaban.jobtype.plugin.dir=plugins/jobtypes

 # Loader for projects
 executor.global.properties=conf/global.properties
 azkaban.project.dir=projects

database.type=mysql
mysql.port=3306
mysql.host=localhost
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

14.启动执行服务器

 bin/azkaban-executor-start.sh 

15.Demo

 cat > /opt/azkaban-exec-server-3.1.0/projects/foo.job
 type=command
 command=echo "Hello World"

 cat > /opt/azkaban-exec-server-3.1.0/projects/bar.job
 type=command
 dependencies=foo
 command=echo bar

 7z a foobar.zip *.job    

 foobar zip在azkaban的前端上传执行结果如下:
Azkaban Web Client.gif
【Azkaban】Azkaban 3.1的安装_第1张图片
Azkaban Web Client (1).gif

你可能感兴趣的:(【Azkaban】Azkaban 3.1的安装)