# Configure repositories
yum -y install epel-release
yum -y install https://repos.fedorapeople.org/repos/openstack/openstack-kilo/rdo-release-kilo-1.noarch.rpm
yum -y install http://opennodecloud.com/centos/7/nodeconductor-release.rpm

# Install and enable services
yum -y install mariadb-server nodeconductor-wsgi redis

systemctl enable httpd
systemctl enable mariadb
systemctl enable nodeconductor-celery
systemctl enable nodeconductor-celerybeat
systemctl enable redis

# Start MySQL and Redis
systemctl start mariadb
systemctl start redis

# Create MySQL database
mysql -e "CREATE DATABASE nodeconductor CHARACTER SET = utf8"
mysql -e "CREATE USER 'nodeconductor'@'localhost' IDENTIFIED BY 'nodeconductor'"
mysql -e "GRANT ALL PRIVILEGES ON nodeconductor.* to 'nodeconductor'@'localhost'"

# Init NodeConductor database
nodeconductor migrate --noinput
chown -R nodeconductor:nodeconductor /var/log/nodeconductor

# Start Celery and Apache
systemctl start httpd
curl --head http://localhost/api/
systemctl start nodeconductor-celery
systemctl start nodeconductor-celerybeat

# Configure repositories
yum -y install epel-release
yum -y install https://repos.fedorapeople.org/repos/openstack/EOL/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm
sed -i 's,openstack/openstack-icehouse/,openstack/EOL/openstack-icehouse/,' /etc/yum.repos.d/rdo-release.repo
yum -y install http://opennodecloud.com/centos/7/nodeconductor-release.rpm

# Install and enable services
yum -y install mariadb-server nodeconductor-wsgi redis

systemctl enable httpd
systemctl enable mariadb
systemctl enable nodeconductor-celery
systemctl enable nodeconductor-celerybeat
systemctl enable redis

# Start MySQL and Redis
systemctl start mariadb
systemctl start redis

# Create MySQL database
mysql -e "CREATE DATABASE nodeconductor CHARACTER SET = utf8"
mysql -e "CREATE USER 'nodeconductor'@'localhost' IDENTIFIED BY 'nodeconductor'"
mysql -e "GRANT ALL PRIVILEGES ON nodeconductor.* to 'nodeconductor'@'localhost'"

# Init NodeConductor database
nodeconductor migrate --noinput
chown -R nodeconductor:nodeconductor /var/log/nodeconductor

# Start Celery and Apache
systemctl start httpd
curl --head http://localhost/api/
systemctl start nodeconductor-celery
systemctl start nodeconductor-celerybeat

Revert "Fix installation guide in documentation"
Revert "Fix installation guide in documentation"

This reverts commit 6e897b471878be96f145385e9d090c1765bf1a5d.
