Skip to content

Commit c273687

Browse files
committed
chg: [v6.0] add v6.0 update script
1 parent 849977f commit c273687

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

update/v6.0/Update.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python3
2+
# -*-coding:UTF-8 -*
3+
4+
import os
5+
import sys
6+
7+
sys.path.append(os.environ['AIL_HOME'])
8+
##################################
9+
# Import Project packages
10+
##################################
11+
from update.bin.ail_updater import AIL_Updater
12+
from lib.ConfigLoader import ConfigLoader
13+
from lib import ail_updates
14+
15+
class Updater(AIL_Updater):
16+
"""default Updater."""
17+
18+
def __init__(self, version):
19+
super(Updater, self).__init__(version)
20+
21+
22+
if __name__ == '__main__':
23+
config_loader = ConfigLoader()
24+
r_queues = config_loader.get_redis_conn("Redis_Queues")
25+
config_loader = None
26+
r_queues.delete('modules')
27+
updater = Updater('v6.0')
28+
updater.run_update()

update/v6.0/Update.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
[ -z "$AIL_HOME" ] && echo "Needs the env var AIL_HOME. Run the script from the virtual environment." && exit 1;
4+
[ -z "$AIL_REDIS" ] && echo "Needs the env var AIL_REDIS. Run the script from the virtual environment." && exit 1;
5+
[ -z "$AIL_BIN" ] && echo "Needs the env var AIL_ARDB. Run the script from the virtual environment." && exit 1;
6+
[ -z "$AIL_FLASK" ] && echo "Needs the env var AIL_FLASK. Run the script from the virtual environment." && exit 1;
7+
8+
export PATH=$AIL_HOME:$PATH
9+
export PATH=$AIL_REDIS:$PATH
10+
export PATH=$AIL_BIN:$PATH
11+
export PATH=$AIL_FLASK:$PATH
12+
13+
GREEN="\\033[1;32m"
14+
DEFAULT="\\033[0;39m"
15+
16+
echo -e $GREEN"Shutting down AIL ..."$DEFAULT
17+
bash ${AIL_BIN}/LAUNCH.sh -ks
18+
wait
19+
20+
echo -e $GREEN"Updating UI resources..."$DEFAULT
21+
bash ${AIL_BIN}/LAUNCH.sh -ut
22+
wait
23+
24+
echo -e $GREEN"Updating python requirement..."$DEFAULT
25+
pip install -U flask-sock
26+
27+
# SUBMODULES #
28+
git submodule update
29+
30+
echo ""
31+
echo -e $GREEN"Updating AIL VERSION ..."$DEFAULT
32+
echo ""
33+
python ${AIL_HOME}/update/v6.0/Update.py
34+
wait
35+
echo ""
36+
echo ""
37+
38+
exit 0

var/www/update_thirdparty.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ wget https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js -O ./static/
6767
wget https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css -O ./static/css/dataTables.bootstrap.min.css
6868
wget https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js -O ./static/js/dataTables.bootstrap.min.js
6969

70+
#Ressource for graph
71+
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js -O ./static/js/echarts.min.js
72+
7073
#Ressources for bootstrap popover
7174
POPPER_VERSION="1.16.1"
7275
wget https://github.com/FezVrasta/popper.js/archive/v${POPPER_VERSION}.zip -O temp/popper.zip
7376
unzip -qq temp/popper.zip -d temp/
7477
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js ./static/js/
7578
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js.map ./static/js/
7679

77-
#Ressource for graph
78-
# DASHBOARD # TODO Extract from github
79-
wget https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js - O ./static/js/echarts.min.js
8080

8181

8282

0 commit comments

Comments
 (0)