Newer
Older
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
#/usr/bin/bash
mode="dev"
if [ -n "$2" ]; then
if [[ $1 =~ ^(prod)$ ]]; then
mode=$1
fi
fi
if [ $mode == "dev" ]; then
echo "[Installing AURA ENGINE for Development]"
fi
if [ $mode == "prod" ]; then
echo "[Installing AURA ENGINE for Production]"
fi
# Production
if [ $mode == "api" ]; then
if getent passwd 'engineuser' > /dev/null 2>&1; then
echo "User 'engineuser' exists already.";
else
echo "Creating Engine User ..."
adduser engineuser
adduser engineuser sudo
fi
echo "Set Ownership of '/opt/aura/engine' to Engine User"
chown -R engineuser:engineuser .
echo "Copy Supervisor Config to '/etc/supervisor/conf.d'"
cp configuration/supervisor/engine-api.conf /etc/supervisor/conf.d/
echo "Create Log Directory `/var/log/aura/engine`"
mkdir -p /var/log/aura
mkdir -p /var/log/aura/engine
echo "Create Configuration Directory `/etc/aura/engine`"
mkdir -p /etc/aura
mkdir -p /etc/aura/engine
fi
# Development and Production
python3.7 $(which pip3) install -r requirements.txt