Commit 607b31b7 authored by David Trattnig's avatar David Trattnig
Browse files

Simplified installation.

parent 988577d1
......@@ -6,7 +6,7 @@
"email": "david.trattnig@subsquare.at",
"url": "https://subsquare.at"
},
"license" : "AGPL-3.0-only",
"license": "AGPL-3.0-only",
"homepage": "https://gitlab.servus.at/aura/meta",
"repository": {
"type": "git",
......
......@@ -15,8 +15,14 @@ if [ $mode == "prod" ]; then
echo "[Installing AURA ENGINE for Production]"
fi
echo "Installation System Packages ..."
./script/install-system-packages.sh
# Production
echo "Installation OPAM Packages ..."
./script/install-opam-packages.sh
# Development
if [ $mode == "dev" ]; then
......@@ -62,7 +68,29 @@ echo "Create local Logs Folder ..."
mkdir -p logs
echo "Installing Web Application Packages ..."
./install-web.sh
./script/install-web.sh
echo "Installing Python Requirements ..."
python3.7 $(which pip3) install -r requirements.txt
\ No newline at end of file
python3.7 $(which pip3) install -r requirements.txt
echo "Setting up database ..."
echo
echo "Which database system do you want to use? (Press '1' or '2')"
echo " [1] MariaDB"
echo " [2] Other / Manually"
echo
while true; do
read -rsn1 input
if [ "$input" = "1" ]; then
echo "Creating DB for MariaDB ..."
LOCKFILE_DB=/etc/aura/engine/.install.mariadb.lock
sudo sh ./script/init-db-mariadb.sh
fi
if [ "$input" = "2" ]; then
echo "Manual database setup selected."
fi
done
echo
echo "+++ Installation of AURA Engine finished! +++"
\ No newline at end of file
#!/bin/sh
# Check if databases are already set-up
if test -f "$LOCKFILE_DB"; then
echo "Aura Engine Databases are already existing! Skipping..."
else
# Create random password
PASS_ENGINE="$(openssl rand -base64 24)"
# Create databases and users
echo "--- SETTING UP DATABASE AND USERS ---"
echo "Please enter the MySQL/MariaDB root password!"
stty -echo
printf "Password: "
read rootpasswd
stty echo
printf "\n"
echo "---"
echo "Creating database for Aura Engine..."
mysql -uroot -p${rootpasswd} -e "CREATE DATABASE aura_engine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -uroot -p${rootpasswd} -e "CREATE USER 'aura'@'localhost' IDENTIFIED BY '${PASS_ENGINE}';"
mysql -uroot -p${rootpasswd} -e "GRANT ALL PRIVILEGES ON aura_engine.* TO 'aura'@'localhost';"
mysql -uroot -p${rootpasswd} -e "FLUSH PRIVILEGES;"
echo "Done."
echo "Installing MySQL/MariaDB Libraries..."
apt-get install mariadb-server libmariadbclient-dev
echo "Done."
echo
echo
echo "Please note your database credentials for the next configuration steps:"
echo "-----------------------------------------------------------------------"
echo " Database: 'aura_engine'"
echo " User: 'aura'"
echo " Password: '${PASS_ENGINE}'"
echo "-----------------------------------------------------------------------"
echo
# Create lockfile to avoid accidential re-creation of the database
touch $LOCKFILE_DB
fi
\ No newline at end of file
opam depext fdkaac flac opus pulseaudio bjack alsa
opam install fdkaac flac opus pulseaudio bjack alsa
sudo apt install -y \
supervisor \
redis-server \
libsndfile1 ffmpeg \
quelcom \
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment