Linux下Azkaban安装

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,高可用系列 2核4GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: 说明: 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");
相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
1月前
|
Ubuntu Linux Shell
Linux环境下VSCode快速安装终极指南:debian/ubuntu/linux平台通用
以上就是在Linux环境下安装VSCode的终极指南,抛开繁复的专业词汇,以平易近人的文字、形象生动的比喻让你轻松学会这一过程。别忘了,你的小伙伴VSCode已经在应用菜单里等你了!
306 23
|
3月前
|
Ubuntu 关系型数据库 Linux
Linux数据库安装
本文介绍了在CentOS 8.0和Ubuntu 22.04系统上安装、配置和启动MariaDB数据库服务器的详细步骤。包括通过`yum`和`apt`包管理器安装MariaDB服务,启动并检查服务运行状态,设置root用户密码以及连接数据库的基本操作。此外,还展示了如何在Ubuntu上更新软件包列表、安装依赖项,并验证MariaDB的版本和运行状态。通过这些步骤,用户可以成功部署并初始化MariaDB环境,为后续数据库管理与应用开发奠定基础。
169 61
|
2月前
|
Java 关系型数据库 MySQL
在Linux平台上进行JDK、Tomcat、MySQL的安装并部署后端项目
现在,你可以通过访问http://Your_IP:Tomcat_Port/Your_Project访问你的项目了。如果一切顺利,你将看到那绚烂的胜利之光照耀在你的项目之上!
206 41
|
2月前
|
人工智能 安全 Linux
Alpine Linux设定指定的软件包安装源
以上就是如何为Alpine Linux设置特定的软件包的安装源的全部流程。这个过程非常简洁、明了,希望你在使用过程中能够找到乐趣。这个过程不仅可以提供你需要的软件,还可以根据你的网络条件和地域性需求进行调整,使你的Alpine Linux系统达到最佳性能。
299 24
|
2月前
|
开发框架 Java 关系型数据库
在Linux系统中安装JDK、Tomcat、MySQL以及部署J2EE后端接口
校验时,浏览器输入:http://[your_server_IP]:8080/myapp。如果你看到你的应用的欢迎页面,恭喜你,一切都已就绪。
273 17
|
2月前
|
关系型数据库 MySQL Java
安装和配置JDK、Tomcat、MySQL环境,以及如何在Linux下更改后端端口。
遵循这些步骤,你可以顺利完成JDK、Tomcat、MySQL环境的安装和配置,并在Linux下更改后端端口。祝你顺利!
168 11
|
2月前
|
消息中间件 NoSQL Linux
Redis的基本介绍和安装方式(包括Linux和Windows版本),以及常用命令的演示
Redis(Remote Dictionary Server)是一个高性能的开源键值存储数据库。它支持字符串、列表、散列、集合等多种数据类型,具有持久化、发布/订阅等高级功能。由于其出色的性能和广泛的使用场景,Redis在应用程序中常作为高速缓存、消息队列等用途。
637 16
|
3月前
|
Ubuntu Linux 编译器
在Ubuntu Linux系统下如何搭建并安装EDK2
以上就是在Ubuntu Linux系统下搭建并安装EDK2的过程。这个过程可能会有些复杂,但只要按照步骤一步步来,应该不会有太大问题。如果在过程中遇到任何问题,都可以在网上找到相应的解决方案。希望这个指南能对你有所帮助!
147 17
|
3月前
|
Oracle 关系型数据库 MySQL
Oracle linux 8 二进制安装 MySQL 8.4企业版
Oracle linux 8 二进制安装 MySQL 8.4企业版
99 1
|
3月前
|
安全 Linux 网络安全
在Linux(CentOS和AWS)上安装更新的git2的方法并配置github-ssh
经过以上这些步骤,你现在就能在GitHub上顺利往返,如同海洋中的航海者自由驰骋。欢迎你加入码农的世界,享受这编程的乐趣吧!
123 10