-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsd-database-management_install.sh
executable file
·46 lines (34 loc) · 1.29 KB
/
msd-database-management_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
if [ "$1" == "--help" ]
then
echo "$0 --reset to erase postgres DB content + docker images)"
echo "$0 --local to run local hadoop and Spark connections setup (instead of cluster mode)"
exit 0
fi
echo "#######################"
echo "lancement de l'installation et la configuration d'Airflow pour MetaboHUB"
echo "#######################"
if [ "$1" == "--reset" ]
then
docker compose down --volumes --rmi all
fi
mkdir -p ./dags ./logs ./plugins ./config ./ingestion
mkdir -p /data/ingestion
ln -s /data/ingestion/ "$(pwd)/ingestion"
ln -s /data/ingestion/ /opt/airflow/ingestion
echo -e "AIRFLOW_UID=$(id -u)" > .env
docker compose up airflow-init
docker compose up -d
if [ "$1" == "--local" ]
then
./containerizedAirflowTasks/createHadoopConnection-localdocker.sh
./containerizedAirflowTasks/createSSHConnection-localdocker.sh
#./createSparkConnection-localdocker.sh
else
./containerizedAirflowTasks/createHadoopConnection-cluster.sh
./containerizedAirflowTasks/createSSHConnection-cluster.sh
#./containerizedAirflowTasks/createSparkConnection-cluster.sh
fi
./containerizedAirflowTasks/buildDockerOperatorImages.sh
#cp ./sansa-stack-spark_2.12-0.8.4_ExDistAD.jar ./msddbm/
cp API/libToInstall/sansa-stack-spark_2.12-0.8.0-RC3-SNAPSHOT-jar-with-dependencies.jar /usr/share/java/