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");
相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。 &nbsp; 相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情:&nbsp;https://www.aliyun.com/product/rds/mysql&nbsp;
目录
相关文章
|
1月前
|
Ubuntu Linux
任何Ubuntu用户都应安装的四大Linux应用程序
当然,这款程序不需要太多介绍。我们面对的是网上最庞大最完整的多媒体中心,由于丰富的插件,我们能够高度细化地定制其每一项功能。这是我们的Linux发行版不可或缺的必备软件。 我们可以通过运行以下命令来轻松安装Kodi:sudo apt install kodi。
|
1月前
|
Ubuntu 物联网 Linux
从零安装一个Linux操作系统几种方法,以Ubuntu18.04为例
一切就绪后,我们就可以安装操作系统了。当系统通过优盘引导起来之后,我们就可以看到跟虚拟机中一样的安装向导了。之后,大家按照虚拟机中的顺序安装即可。 好了,今天主要介绍了Ubuntu Server版操作系统的安装过程,关于如何使用该操作系统,及操作系统更深层的原理,还请关注本号及相关圈子。
|
23天前
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。
|
1月前
|
安全 Ubuntu Linux
如何安装Linux操作系统?
此时,您可以选择重新启动计算机,然后从硬盘上的Linux系统启动。以上是一个大致的安装过程。请注意,不同的Linux发行版可能会在细节上有所差异,因此在进行安装之前,请确保您阅读并理解了相应发行版的安装指南或文档。
|
1月前
|
Ubuntu Linux 数据安全/隐私保护
Win10安装Linux子系统教程!如何在Win10系统中安装Ubuntu!
登录系统后,输入cd /返回上一级,然后再输入“ls”查看一下系统文件目录,看看对不对!
|
1月前
|
Ubuntu Linux Shell
手把手教你安装适用于Linux的Windows子系统——Ubuntu
重启完成,你看看重新打开Ubuntu是不是发生了变化,等待几分钟,系统配置完成,根据提示设置用户名和密码即可
|
1月前
|
存储 Ubuntu Linux
安卓手机免root安装各种Linux系统:Ubuntu, Centos,Kali等
此外还可以安装Slackware、Archstrike等系统,还可以通过github查找方法安装更多有趣的东西。 昨日小编就是通过Termux安装的Kali Linux工具包。
|
1月前
|
Ubuntu 网络协议 Unix
在虚拟机中安装Linux Ubuntu系统指南
通过点击【浏览】按钮,您可以更改Ubuntu的安装位置。为确保系统稳定,建议避免将Ubuntu安装在C盘。您可以在D盘或其他磁盘中创建一个名为“ubuntu”的文件夹,并选择该文件夹作为安装位置,然后点击【下一步】继续。
|
1月前
|
Ubuntu Linux 数据安全/隐私保护
Windows上快速安装Linux子系统Ubuntu
Installing, this may take a few minutes...WslRegisterDistribution failed with error: 0x800701bcError: 0x800701bc WSL 2 ?????????????????? https://aka.ms/wsl2kernelPress any key to continue... 原因是 wsl1 升级到 wsl2 之后,内核却没有升级。 解决:下载最新的wsl安装包(wsl安装包)
|
1月前
|
Ubuntu Unix Linux
玩机强化技能,动手安装Ubuntu Linux操作系统
(13)Ubuntu重启过程中,你将在关机画面中看到提示文字“Please remove the installation medium, then press ENTER:”,按下“Enter”键即可重启电脑。