-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·36 lines (25 loc) · 944 Bytes
/
setup.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
#!/bin/bash
set -eo pipefail
IFS=$'\n\t'
CURRENTDIR=`basename "$PWD"`
CLUSTERNAME=$(clustername)
# Capitalize first letter of CLUSTERNAME
CLUSTERNAME="$(tr '[:lower:]' '[:upper:]' <<< ${CLUSTERNAME:0:1})${CLUSTERNAME:1}"
# Replace cluster-name, app-name, user-name in config.yml
sed -i.bak -e "s/\[cluster-name\]/$CLUSTERNAME/g" -e "s/\[app-name\]/$CURRENTDIR/g" -e "s/\[user-name\]/$USER/g" config.yml
# Replace cluster-name in manifest.yml
sed -i.bak -e "s/\[cluster-name\]/$CLUSTERNAME/g" manifest.yml
# Remove backup file during copy
rm config.yml.bak manifest.yml.bak
# create the environments directory
mkdir -p environments
#create the logs directory and log file
mkdir -p logs
touch logs/drona_log
chmod uog+rw logs/drona_log
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
#pip install -r requirements.txt.Python2.6.8
npm install -D babel-loader @babel/core @babel/preset-react
npm run build