changed Ubuntu to 20.04, made python3 the default while installing faafo, added comment to show use of different faafo branches for cloud-init
This commit is contained in:
@ -78,6 +78,7 @@ if [[ -e /etc/os-release ]]; then
|
||||
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
|
||||
sudo apt-get update
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
sudo dnf update -y
|
||||
fi
|
||||
|
||||
@ -89,6 +90,7 @@ if [[ -e /etc/os-release ]]; then
|
||||
#sudo sed -i -e "/bind-address/d" /etc/mysql/my.cnf
|
||||
sudo service mysql restart
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
sudo dnf install -y mariadb-server python-mysql
|
||||
printf "[mysqld]\nbind-address = 127.0.0.1\n" | sudo tee /etc/my.cnf.d/faafo.conf
|
||||
sudo systemctl enable mariadb
|
||||
@ -106,6 +108,7 @@ if [[ -e /etc/os-release ]]; then
|
||||
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
|
||||
sudo apt-get install -y rabbitmq-server
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
sudo dnf install -y rabbitmq-server
|
||||
sudo systemctl enable rabbitmq-server
|
||||
sudo systemctl start rabbitmq-server
|
||||
@ -117,6 +120,7 @@ if [[ -e /etc/os-release ]]; then
|
||||
|
||||
if [[ $INSTALL_FAAFO -eq 1 ]]; then
|
||||
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
|
||||
# TODO: needs to be updated for Ubuntu >= 20.04
|
||||
sudo apt-get install -y python-dev python-pip supervisor git zlib1g-dev libmysqlclient-dev python-mysqldb
|
||||
# Following is needed because of
|
||||
# https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740
|
||||
@ -131,6 +135,7 @@ if [[ -e /etc/os-release ]]; then
|
||||
fi
|
||||
fi
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
sudo dnf install -y python-devel python-pip supervisor git zlib-devel mariadb-devel gcc which python-mysql
|
||||
sudo systemctl enable supervisord
|
||||
sudo systemctl start supervisord
|
||||
@ -171,6 +176,7 @@ startretries=0"
|
||||
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
|
||||
echo "$faafo_api" | sudo tee -a /etc/supervisor/conf.d/faafo.conf
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
echo "$faafo_api" | sudo tee -a /etc/supervisord.d/faafo.ini
|
||||
else
|
||||
echo "error: distribution $ID not supported"
|
||||
@ -188,6 +194,7 @@ startretries=0"
|
||||
if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
|
||||
echo "$faafo_worker" | sudo tee -a /etc/supervisor/conf.d/faafo.conf
|
||||
elif [[ $ID = 'fedora' ]]; then
|
||||
# fedora currently not tested nor supported
|
||||
echo "$faafo_worker" | sudo tee -a /etc/supervisord.d/faafo.ini
|
||||
else
|
||||
echo "error: distribution $ID not supported"
|
||||
|
Reference in New Issue
Block a user