Comment 1 for bug 1724023

Revision history for this message
Matt Verran (mv-2112) wrote :

Actually looks like the issue is in https://git.openstack.org/cgit/openstack/faafo/plain/contrib/install.sh. Its attempting to do it but however its intending to do it it doesn't work for ubuntu 16.04. Will update if I find a workaround.

if [[ $INSTALL_DATABASE -eq 1 ]]; then
        if [[ $ID = 'ubuntu' || $ID = 'debian' ]]; then
            sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server python-mysqldb
            sudo sed -i -e "/bind-address/d" /etc/mysql/my.cnf
            sudo service mysql restart
        elif [[ $ID = 'fedora' ]]; then
            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
            sudo systemctl start mariadb
        else
            echo "error: distribution $ID not supported"
            exit 1
        fi
        sudo mysqladmin password password
        sudo mysql -uroot -ppassword mysql -e "CREATE DATABASE IF NOT EXISTS faafo; GRANT ALL PRIVILEGES ON faafo.* TO 'faafo'@'%' IDENTIFIED BY 'password';"
        URL_DATABASE='mysql://root:password@localhost/faafo'
    fi