码迷,mamicode.com
首页 > 其他好文 > 详细

Azkaban 2.5.0 搭建

时间:2014-07-16 21:26:53      阅读:1664      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   使用   

一、前言

最近试着参照官方文档搭建 Azkaban,发现文档很多地方有坑,所以在此记录一下。

二、环境及软件

安装环境:

  • 系统环境: ubuntu-12.04.2-server-amd64
  • 安装目录: /usr/local/ae/ankaban
  • JDK 安装目录: export JAVA_HOME=/usr/local/ae/jdk1.7.0_51
  • Hadoop 安装目录 export HADOOP_HOME=/usr/local/ae/hadoop-1.2.1
  • Mysql 版本:mysql-server-5.5

需要软件:

Azkaban source: github.com/azkaban/azkaban

Azkaban plugin source:github.com/azkaban/azkaban-plugins

doc:azkaban.github.io/azkaban/docs/2.5/

 三、配置Mysql

  1.  解压azkaban-sql-script-2.5.0.tar.gz
    user@ae01:/usr/local/ae/azkaban$ tar -zxvx azkaban-sql-script-2.5.0.tar.gz
  2. 登录Mysql 创建Database azkaban
    user@ae01:/usr/local/ae/azkaban$ mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 165
    Server version: 5.5.37-0ubuntu0.12.04.1 (Ubuntu)
    
    Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type help; or \h for help. Type \c to clear the current input statement.
    
    mysql> create database azkaban;
  3. 创建 Azkaban 表格
    mysql> use azkaban
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> source /usr/local/ae/azkaban/azkaban-2.5.0/create-all-sql-2.5.0.sql
  4. 为 Azkaban 创建用户 azkaban
    mysql> grant all privileges on azkaban.* to azkaban@localhost identified by azkaban;
    mysql> flush privileges;

四、配置 azkaban-web

  1. 解压 azkaban-web-server-2.5.0.tar.gz
    user@ae01:/usr/local/ae/azkaban$ tar -zxvx azkaban-web-server-2.5.0.tar.gz
  2. 生成SSL 证书
    关于怎么使用 Java keytool 生成 keystore 和 Truststore 文件 可以参考我之前的随笔。
    在这里可以只简单的生成 keystore 文件,并将生成的 keystore 文件拷贝至 /usr/local/ae/azkaban/azkaban-web-2.5.0/web 文件下。
    本文中证书文件为 keystone, keypass 为 kestore。
  3. 修改 ./conf/azkaban.properties
    #Azkaban Personalization Settings
    azkaban.name=Azkaban
    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
    project.temp.dir=../temp
    trigger.plugin.dir=../plugins/triggers
    
    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.port=8081
    jetty.keystore=../web/keystore
    jetty.password=keystore
    jetty.keypassword=jetty-azkaban
    jetty.truststore=../web/keystore
    jetty.trustpassword=keystore
    
    # Azkaban Executor settings
    executor.port=12321
    
    # mail settings
    mail.sender=***********************
    mail.host=***********************
    mail.user=************************
    mail.password=******
    job.failure.email=*************************
    job.success.email=*************************
    
    lockdown.create.projects=false
    
    cache.directory=../cache

     * 上文中红色标记的选项区别于官网的配置,其中某些选项如果参照官网将抛出 Exception 或 Error log。

  4. 启动 azkaban-web
    user@ae01:/usr/local/ae/azkaban/azkaban-web-2.5.0/bin$ sh azkaban-web-start.sh
  5. 登录 https:ae01:8443 username:azkaban; password:azkaban
  6. 修改 azkaban-web 启动文件
    如果发现无法上传文件,需要修改 azkaban-web 的启动脚本 azkaban-web-start.sh
    if [[ -z "$tmpdir" ]]; then    --->    if [ -z "$tmpdir" ]; then

五、配置 azkaban-executor

  1. 解压 azkaban-executor-server-2.5.0.tar.gz
    user@ae01:/usr/local/ae/azkaban$ tar -zxvx azkaban-executor-server-2.5.0.tar.gz
  2. 配置 ./conf/azkaban.properties
    #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
    azkaban.execution.dir=../executions
    project.temp.dir=../temp
    
    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

     * 上文中红色标记的选项区别于官网的配置,其中某些选项如果参照官网将抛出 Exception 或 Error log。

  3. 配置 jobtype 插件
    解压 azkaban-jobtype-2.5.0.tar.gz 至 ./plugins 并重命名为 jobtypes
    user@ae01:/usr/local/ae/azkaban/azkaban-executor-2.5.0/plugins$ tar -zxvx azkaban-jobtype-2.5.0.tar.gz
    user@ae01:/usr/local/ae/azkaban/azkaban-executor-2.5.0/plugins$ mv ./azkaban-jobtype-2.5.0 ./jobtypes

    配置 ./conf/common.propertes

    ## everything that the user job can know
    
    hadoop.home=/usr/local/ae/hadoop-1.2.1
    #hive.home=
    #pig.home=
    
    azkaban.should.proxy=true
    jobtype.global.classpath=${hadoop.home}/hadoop-core-1.2.1.jar,${hadoop.home}/conf
  4. 启动 azkaban-executor
    user@ae01:/usr/local/ae/azkaban/azkaban-executor-2.5.0/bin$ sh azkaban-executor-start.sh

Azkaban 2.5.0 搭建,布布扣,bubuko.com

Azkaban 2.5.0 搭建

标签:style   blog   http   java   color   使用   

原文地址:http://www.cnblogs.com/tannerBG/p/3835952.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!