Linux下Azkaban安装

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 说明: CentOS 7JDK 1.8官方文档:https://azkaban.readthedocs.io/en/latest/getStarted.html#building-from-source 安装步骤 Clone the repo: git clone https://github.

说明:

CentOS 7
JDK 1.8
Azkaban版本:3.59.0
官方文档:
https://azkaban.readthedocs.io/en/latest/getStarted.html#building-from-source

安装步骤

Clone the repo:

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

Build Azkaban and create an installation package:

cd azkaban; ./gradlew build installDist

这个编译项目需要一定的时间,可能出现的问题如下:
1:连接maven超时,则需要检查超时的网址和端口是否正常
2:JCE报错

testV1_1 FAILED
    java.lang.RuntimeException: java.lang.RuntimeException: org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
        at azkaban.crypto.Crypto.decrypt(Crypto.java:76)
        at azkaban.crypto.DecryptionTest.testV1_1(DecryptionTest.java:35)

        Caused by:
        java.lang.RuntimeException: org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
            at azkaban.crypto.CryptoV1_1.decrypt(CryptoV1_1.java:57)
            at azkaban.crypto.Crypto.decrypt(Crypto.java:74)
            ... 1 more

            Caused by:
            org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
                at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.handleInvalidKeyException(StandardPBEByteEncryptor.java:1073)
                at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.decrypt(StandardPBEByteEncryptor.java:1050)
                at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:725)
                at azkaban.crypto.CryptoV1_1.decrypt(CryptoV1_1.java:55)
                ... 2 more

azkaban.crypto.EncryptionTest > testEncryption FAILED
    org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
        at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.handleInvalidKeyException(StandardPBEByteEncryptor.java:1073)
        at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.encrypt(StandardPBEByteEncryptor.java:924)
        at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.encrypt(StandardPBEStringEncryptor.java:642)
        at azkaban.crypto.CryptoV1_1.encrypt(CryptoV1_1.java:42)
        at azkaban.crypto.Crypto.encrypt(Crypto.java:58)
        at azkaban.crypto.EncryptionTest.testEncryption(EncryptionTest.java:28)

5 tests completed, 2 failed

> Task :azkaban-common:compileJava 
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':az-crypto:test'.
> There were failing tests. See the report at: file:///opt/azkaban/az-crypto/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

解决方法:
下载JCE
https://www.oracle.com/technetwork/cn/java/javase/downloads/jce8-download-2133166-zhs.html
我这边使用的JDK8,包含了JCE所需要的jre8
解压搜下载好的文件,放置到以下目录:
image
放置到jdk所在目录下的:

cp UnlimitedJCEPolicyJDK8/* /usr/local/jdk1.8.0_74/jre/lib/security

对原有的文件进行覆盖

然后在进行重新编译
image

Start the solo server:

启动单机版的服务

image

cd azkaban-solo-server/build/install/azkaban-solo-server; bin/start-solo.sh

Azkaban solo server should be all set, by listening to 8081 port at default to accept incoming network request. So, open a web browser and check out http://localhost:8081/

打开页面
image

Stop server:

bin/shutdown-solo.sh

azkaban-solo-server 目录说明

image

目录名称 | 描述 |
------- | ------- |
bin | 用于启动/停止Azkaban solo服务器的脚本
conf | Azkaban solo服务器的配置文件
lib | Azkaban的jar依赖项
extlib | 添加到extlib的其他jar将添加到Azkaban的类路径中
plugins | 可以安装插件的目录
web | Azkaban Web服务器的Web(css,javascript,image)文件

数据库设置

为Azkaban创建数据库:

#示例数据库创建命令,尽管db名称不需要是'azkaban'
mysql> CREATE DATABASE azkaban;
Query OK, 1 row affected (0.00 sec)

为Azkaban创建一个mysql用户。 例如,:

# Example database creation command. The user name doesn't need to be 'azkaban'
mysql> CREATE USER 'azka'@'%' IDENTIFIED BY '111111';
# give the user INSERT, SELECT, UPDATE, DELETE permission on all tables in the Azkaban db.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON azkaban.* to 'azka'@'%' WITH GRANT OPTION;

在/etc/my.cnf中配置Mysql Packet Size的大小

[mysqld]
...
max_allowed_packet=1024M

image

重启mysql

/sbin/service mysqld restart

image

创建Azkaban表
image

Installing Azkaban Executor Server

使用Gradle命令指令对源码进行编译
注意:如果之前在安装solo模式的时候已经编译完成,则不需再进行编译

# 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.properties中的mysql用户和密码,同时配置发送邮箱的配置信息
image
image

then run

cd azkaban-exec-server/build/install/azkaban-exec-server
./bin/start-exec.sh

之后,请记住通过调用以下方法激活执行程序:

cd azkaban-exec-server/build/install/azkaban-exec-server
curl -G "localhost:$(<./executor.port)/executor?action=activate" && echo

激活成功

image

然后,一个执行器就可以使用了。用户可以通过分发和部署多个执行程序安装分发来设置多个执行程序。

安装Azkaban Web服务器

Azkaban Web Server处理项目管理,身份验证,调度和执行触发器。您可以从主分支构建最新版本

为了快速入门,我们可以直接使用gradle生成的安装目录
azkaban / azkaban-web-server / build / install / azkaban-web-server。

image

更改账户名和密码

我们只需要在里面更改mysql用户名和密码azkaban.properties:

Then run

cd azkaban-web-server/build/install/azkaban-web-server
./bin/start-web.sh

默认的账户名和密码:

azkaban

azkaban

注意

如果修改azkaban.properties的配置信息,则需要重启进程才能生效

配置的文件都是修改install下的azkaban.properties文件

Could not find Linker 'g++' in system path

解决方法:

sudo yum install g++
sudo yum install -y gcc-c++*

启动脚本是只能在bin目录外面提

solo是单机版使用的进程
web和exec是和mql配置使用,分布式的服务模式

添加和修改配置的时候,修改的是如下位置的配置文件:

/opt/azkaban/azkaban-web-server/build/install/azkaban-web-server/conf

然后重启web服务,配置生效

部署阿里云注意事项:

因为阿里云不能使用默认的25端口,所以需要事情ssl的465端口,但是3.59.0的版本是不支持ssl的,所以需要添加如下代码

    import java.security.Security;
    final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
    props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
    props.setProperty("mail.smtp.socketFactory.fallback", "false");
    props.setProperty("mail.smtp.socketFactory.port", "465");
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
7天前
|
缓存 Linux 测试技术
安装【银河麒麟V10】linux系统--并挂载镜像
安装【银河麒麟V10】linux系统--并挂载镜像
44 0
|
7天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
24 0
|
7天前
|
NoSQL Linux Redis
linux 下和win下安装redis 并添加开机自启 图文详解
linux 下和win下安装redis 并添加开机自启 图文详解
13 0
|
7天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
27 0
|
19天前
|
Java Linux Maven
Linux中安装MAVEN环境配置
Linux中安装MAVEN环境配置
42 3
|
20天前
|
存储 负载均衡 索引
linux7安装elasticsearch-7.4.0集群配置
linux7安装elasticsearch-7.4.0集群配置
108 0
|
24天前
|
Linux 数据安全/隐私保护 虚拟化
Linux技术基础(1)——操作系统的安装
本文是龙蜥操作系统(Anolis OS) 8.4 的安装指南,用户可以从[龙蜥社区下载页面](https://openanolis.cn/download)获取ISO镜像。安装方法包括物理机的光驱和USB闪存方式,以及虚拟机中的VMware Workstation Pro设置。安装过程涉及选择语言、配置安装目标、选择软件集合和内核,设置Root密码及创建新用户。安装完成后,可通过文本模式或图形化界面验证系统版本,如Anolis OS 8.4,标志着安装成功。
|
27天前
|
边缘计算 Kubernetes Devops
KubeSphere平台安装系列之二【Linux单节点部署KubeSphere】(2/3)
KubeSphere平台安装系列之二【Linux单节点部署KubeSphere】(2/3)
35 3
|
19天前
|
消息中间件 Java Linux
Linux下RabbitMQ安装与使用
Linux下RabbitMQ安装与使用
32 1
|
27天前
|
边缘计算 Kubernetes Linux
KubeSphere平台安装系列之三【Linux多节点部署KubeSphere】(3/3)
KubeSphere平台安装系列之三【Linux多节点部署KubeSphere】(3/3)
26 1