azkaban安裝

Xlucas發表於2017-12-12

環境
1、centos 6.5
2、java 1.8

安裝
1、先下載 azkaban
https://github.com/azkaban/azkaban
下載原始碼
[root@master ~]# git clone https://github.com/azkaban/azkaban.git

2、編譯

開始build azkaban
#壓縮為zip包:
[root@master azkaban-master]# ./gradlew distZip
#或者壓縮為tar包
./gradlew distTar
最後出現了BUILD SUCCESSFUL 表示編譯成功了
> Task :azkaban-solo-server:compileJava
Note: /root/azkaban/azkaban-solo-server/src/main/java/azkaban/soloserver/AzkabanSingleServer.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Download https://repo1.maven.org/maven2/com/h2database/h2/1.4.193/h2-1.4.193.pom
Download https://repo1.maven.org/maven2/com/h2database/h2/1.4.193/h2-1.4.193.jar

BUILD SUCCESSFUL in 19m 54s

3、安裝
建立一個路徑 /opt/azkaban/
將下面2個包拷貝到這個路徑下面
cp azkaban-exec-server/build/distributions/azkaban-exec-server-3.39.0-11-ged24703.zip /opt/azkaban/
cp azkaban-web-server/build/distributions/azkaban-web-server-3.39.0-11-ged24703.zip /opt/azkaban/

3、1、建立Azkaban資料庫
create database azkaban;
初始化資料庫
mysql> source /root/azkaban/azkaban-db/build/sql/create-all-sql-3.39.0-11-ged24703.sql

安裝web
3、2、先將目錄重新命名一下
[root@master azkaban]# mv azkaban-exec-server-3.39.0-11-ged24703 azkaban-exec-server-3.39.0-11
[root@master azkaban]# ll
total 34932
drwxr-xr-x. 4 root root 4096 Dec 11 01:21 azkaban-exec-server-3.39.0-11
-rw-r–r–. 1 root root 15726709 Dec 11 23:37 azkaban-exec-server-3.39.0-11-ged24703.zip
drwxr-xr-x. 5 root root 4096 Dec 11 01:19 azkaban-web-server-3.39.0-11-ged24703
-rw-r–r–. 1 root root 20033443 Dec 11 23:38 azkaban-web-server-3.39.0-11-ged24703.zip
[root@master azkaban]# mv azkaban-web-server-3.39.0-11-ged24703 azkaban-web-server-3.39.0-11
[root@master azkaban]# ll
total 34932
drwxr-xr-x. 4 root root 4096 Dec 11 01:21 azkaban-exec-server-3.39.0-11
-rw-r–r–. 1 root root 15726709 Dec 11 23:37 azkaban-exec-server-3.39.0-11-ged24703.zip
drwxr-xr-x. 5 root root 4096 Dec 11 01:19 azkaban-web-server-3.39.0-11
-rw-r–r–. 1 root root 20033443 Dec 11 23:38 azkaban-web-server-3.39.0-11-ged24703.zip

3、3、在解壓的路徑下面執行
[root@master azkaban-web-server-3.39.0-11]# keytool -keystore keystore -alias jetty -genkey -keyalg RSA
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
Enter key password for
(RETURN if same as keystore password):
Re-enter new password:

進入到azkaban-web-server-3.39.0-11 裡面看看裡面有沒有conf和plugins目錄
如果沒有這個目錄建立conf目錄,並且拷貝azkaban-solo-server 下面conf目錄下面的檔案過來
[root@master azkaban-web-server-3.39.0-11]# ls
bin lib web
[root@master azkaban-web-server-3.39.0-11]# mkdir conf

[root@master azkaban-solo-server-3.39.0-11-ged24703]# pwd
/root/azkaban/azkaban-solo-server/build/distributions/azkaban-solo-server-3.39.0-11-ged24703
[root@master azkaban-solo-server-3.39.0-11-ged24703]# cd ..
[root@master distributions]# ls
azkaban-solo-server-3.39.0-11-ged24703 azkaban-solo-server-3.39.0-11-ged24703.zip
[root@master distributions]# cd azkaban-solo-server-3.39.0-11-ged24703
[root@master azkaban-solo-server-3.39.0-11-ged24703]# ls
bin conf lib plugins sql web
[root@master azkaban-solo-server-3.39.0-11-ged24703]# cd conf/
[root@master conf]# ls
azkaban.properties azkaban-users.xml global.properties
[root@master conf]# cp * /opt/azkaban/azkaban-web-server-3.39.0-11/conf/
azkaban.properties azkaban-users.xml global.properties
[root@master conf]# cp * /opt/azkaban/azkaban-web-server-3.39.0-11/conf/

[root@master plugins]# cp -r * /opt/azkaban/azkaban-web-server-3.39.0-11/plugins/

從 azkaban-solo-server下面拷貝log4j.properties檔案
[root@master build]# cd resources/
[root@master resources]# ls
main
[root@master resources]# cd main/
[root@master main]# ls
commonprivate.properties conf log4j.properties
[root@master main]# cp log4j.properties /opt/azkaban/
azkaban-exec-server-3.39.0-11/ azkaban-web-server-3.39.0-11/ keystore
azkaban-exec-server-3.39.0-11-ged24703.zip azkaban-web-server-3.39.0-11-ged24703.zip
[root@master main]# cp log4j.properties /opt/azkaban/azkaban-web-server-3.39.0-11/conf

3、4、修改azkaban.properties 檔案

database.type=mysql
mysql.port=3306
mysql.host=localhost
mysql.database=azkaban
mysql.user=root
mysql.password=root
mysql.numconnections=100
# 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
# Velocity dev mode
velocity.dev.mode=false
# Azkaban Jetty server properties.
jetty.use.ssl=false
jetty.maxThreads=25
jetty.port=8081
# 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 plugin settings
azkaban.jobtype.plugin.dir=plugins/jobtypes
jetty.keystore=keystore
jetty.password=xlucas
jetty.keypassword=xlucas
jetty.truststore=keystore
jetty.trustpassword=xlucas

啟動服務
[root@master azkaban-web-server-3.39.0-11]# ./bin/azkaban-web-start.sh

通過瀏覽器我們可以訪問
這裡寫圖片描述

相關文章