Skip to content

Commit 2df73f0

Browse files
committed
updated the csd for Airflow 1.9.0
1 parent 57d868a commit 2df73f0

File tree

7 files changed

+24
-69
lines changed

7 files changed

+24
-69
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ This repository allows you to install [Apache Airflow](https://airflow.apache.or
55
## Requirements
66
- A supported operating system.
77
- MySQL or PostgreSQL database in which to store Airflow metadata.
8-
- [Airflow](https://github.com/teamclairvoyant/apache-airflow-parcels) and [RabbitMQ](https://github.com/teamclairvoyant/rabbitmq-cloudera-parcel) parcels need to be installed.
8+
- [Airflow](https://github.com/teamclairvoyant/apache-airflow-parcels)
99

1010
### Currently Supported Versions of Airflow
1111
- Airflow 1.7.1.3
1212
- Airflow 1.8.0
13+
- Airflow 1.9.0
1314

1415
### Currently Supported Operating Systems
1516
- CentOS 6 & 7
1617
- RHEL 6 & 7
1718

1819
## Installing the CSD
19-
1. Download the Jar file. [Airflow CSD](https://teamclairvoyant.s3.amazonaws.com/apache-airflow/cloudera/csd/AIRFLOW-1.8.0.jar)
20+
1. Download the Jar file. [Airflow CSD](http://archive.clairvoyantsoft.com/airflow/parcels/latest/AIRFLOW-<Airflow Version>.jar)
2021
2. Copy the jar file to the `/opt/cloudera/csd` location on the Cloudera Manager server.
21-
3. Restart the Cloudera Manager Server service. `service cloiudera-scm-server restart`
22+
3. Restart the Cloudera Manager Server service. `service cloudera-scm-server restart`
2223

2324
## Requirements
2425
1. A database needs to be created.
@@ -61,19 +62,16 @@ There are seven roles defined in the CSD.
6162
1. Airflow Webserver
6263
2. Airflow Scheduler
6364
3. Airflow Worker
64-
4. RabbitMQ
65-
5. Airflow Flower
66-
6. Kerberos
67-
7. Gateway
65+
4. Airflow Flower
66+
5. Kerberos
67+
6. Gateway
6868

6969
Airflow Webserver: Airflow Webserver role is used to start the Airflow Web UI. Webserver role can be deployed on more than instances. However, they will be the same and can be used for backup purposes.
7070

7171
Airflow Scheduler: Airflow Scheduler role is used to schedule the Airflow jobs. This is limited to one instance to reduce the risk of duplicate jobs.
7272

7373
Airflow Worker: Airflow Worker role picks jobs from RabbitMQ and executed them on the nodes. Multiple instances can be deployed.
7474

75-
RabbitMQ: RabbitMQ role facilitates the use of RabbitMQ as the messaging broker. Currently the number of roles is limited to 1.
76-
7775
Airflow Flower: Airflow Flower is used to monitor celery clusters. Multiple instances are supported
7876

7977
Kerberos: Kerberos is used to enable Kerberos protocol for the Airflow. It internally executes `airflow kerberos`. An external Kerberos Distribution Center must be setup. Multiple instances can be setup for load balancing purposes.
@@ -149,7 +147,7 @@ jar -cvf AIRFLOW-1.0.0.jar -C src/ .
149147
4. Only 'airflow.contrib.auth.backends.password_auth' mechanism is supported for Airflow user authentication.
150148

151149
## Future work:
152-
1. RabbitMQ needs to installed in Cluster Mode.
150+
1. Build RabbitMQ parcel.
153151
2. Test Database connection.
154152
3. Add the support for more Airflow user authentication methods.
155153

src/descriptor/service.sdl

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"name" : "AIRFLOW",
1616
"label" : "Airflow",
1717
"description" : "Airflow is a platform to programmatically author, schedule and monitor workflows. <span class=\"error\">Before adding this service, ensure that the Airflow and RabbitMQ parcels have been activated.</span>",
18-
"version" : "1.7.1.3",
18+
"version" : "1.9.0",
1919
"runAs" : {
2020
"user" : "root",
2121
"group" : "root"
2222
},
2323
"parcel" : {
2424
"repoUrl" : "https://teamclairvoyant.s3.amazonaws.com/apache-airflow/cloudera/parcels/",
25-
"requiredTags" : [ "airflow" ],
25+
"requiredTags" : [ "airflow"],
2626
"sTags" : []
2727
},
2828
"parameters" : [
@@ -114,7 +114,7 @@
114114
"label" : "Broker URL",
115115
"description" : "Broker URL value for Celery ",
116116
"type" : "string",
117-
"default" : "sqla+mysql://username:password@host:3306/dbname",
117+
"default" : "sqla+mysql://username:password@host:3306/dbname",
118118
"configurableInWizard": true,
119119
"required" : "true"
120120
},
@@ -815,7 +815,7 @@
815815
],
816816
"gateway" : {
817817
"alternatives" : {
818-
"name" : "airflow",
818+
"name" : "airflow_conf",
819819
"priority" : 50,
820820
"linkRoot" : "/tmp/airflowTemp/"
821821
},
@@ -828,15 +828,11 @@
828828
"dbName" : "${dbName}",
829829
"dbPort" : "${dbPort}",
830830
"dbPass" : "${dbPass}",
831-
"broker_url": "${broker_url}",
831+
"broker_url": "${broker_url}",
832832
"authenticate" : "${Airflow.authenticate}",
833833
"AIRFLOW_USER" : "${Airflow.username}",
834834
"AIRFLOW_PASS" : "${Airflow.password}",
835835
"AIRFLOW_EMAIL" : "${Airflow.email}",
836-
"RABBITMQ_HOST" : "${RabbitMQ.host}",
837-
"RABBITMQ_USER" : "${RabbitMQ.username}",
838-
"RABBITMQ_PASS" : "${RabbitMQ.password}",
839-
"RABBITMQ_PORT" : "${RabbitMQ.port}",
840836
"airflow_home" : "${airflow_home}",
841837
"AIRFLOW_HOME" : "${airflow_home}",
842838
"dags_folder" : "${dags_folder}",
@@ -865,7 +861,7 @@
865861
"configWriter" : {
866862
"generators" : [
867863
{
868-
"filename" : "airflow/airflowTemp.cfg",
864+
"filename" : "airflow_conf/airflowTemp.cfg",
869865
"configFormat" : "properties"
870866
}
871867
]
@@ -1030,6 +1026,11 @@
10301026
"AIRFLOW_HOME" : "${airflow_home}"
10311027
}
10321028
},
1029+
"stopRunner" : {
1030+
"runner" : {
1031+
"program" : "scripts/stop_airflow_scheduler.sh"
1032+
}
1033+
},
10331034
"parameters" : [
10341035
{
10351036
"name" : "job_heartbeat_sec",
@@ -1166,7 +1167,7 @@
11661167
"loggingType" : "log4j"
11671168
}
11681169
},
1169-
{
1170+
{
11701171
"name" : "AIRFLOW_FLOWER",
11711172
"label" : "Flower (Optional)",
11721173
"pluralLabel" : "Flowers",

src/scripts/mkuser.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/scripts/start_rabbitmq.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
for pid in `ps -ef | grep -v "grep" | grep "airflow scheduler" | awk '{print $2}'` ; do kill -9 $pid || true ; done

src/scripts/stop_rabbitmq.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/scripts/update_cfg.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ if [ "$dbType" == "mysql" ]; then
3232
elif [ "$dbType" == "postgresql" ]; then
3333
sql_alchemy_conn="postgresql+psycopg2://${dbUser}:${dbPass}@${dbHost}:${dbPort}/${dbName}"
3434
fi
35+
36+
echo $sql_alchemy_conn
3537

3638
# Updating airflow.cfg
3739

@@ -94,4 +96,4 @@ echo "export PATH=${AIRFLOW_DIR}/bin:\$PATH" >> /usr/bin/airflow-mkuser
9496
echo "${AIRFLOW_DIR}/bin/mkuser.sh \$@" >> /usr/bin/airflow-mkuser
9597

9698

97-
echo "Airflow configurations updated."
99+
echo "update.cfg script ends"

0 commit comments

Comments
 (0)