Contents
This roll installs cloud scheduler GUI and its needed database All prerequisite software listed below are a part of the roll and will be installed and configured during roll installation. The source code for the GUI has been developed by the Thammmasat satudents and can be found in cloud-scheduler-gui git repository.
Previous version og GUI based on Booked AIP is at the tag booked-2.5.3
- The following prerequisites are installed with the roll:
mysql-python: v.1.2.5 nodejs: v6.10.2-linux-x64 - Python roll
A lifemapper-server roll installs mysql-python. In case lifemapper roll is present
when installing the cloud-scheduler roll, omit the cloud-scheduler-MySQL-python
RPM
installation.
Checkout roll distribution from git repo
# git clone https://github.com/pragmagrid/cloud-scheduler # cd cloud-scheduler/
To build a roll, first execute a script that build nodejs and installs cloud-scheduler-gui source distro
# ./bootstrap.sh
Then proceeed with building the roll:
# make roll
The resulting ISO file cloud-scheduler-*.iso can be added to the frontend.
A roll can be added to the existing frontend. Make sure that the python roll is installed (can be downloaded from Rocks Downloads )
# rocks add roll cloud-scheduler-6.2-0.x86_64.disk1.iso # rocks enable roll cloud-scheduler # (cd /export/rocks/install; rocks create distro) # yum clean all # rocks run roll cloud-scheduler > add-roll.sh # bash add-roll.sh > add-roll.out 2>&1
After the last command is finished, examine the add-roll.out file for errors.
A /tmp/cs-config.log
file contains output from the roll configuration commands
that set a database and its access. During the roll install a cs-config
command
is executed. It creates the database and the db admin user access. A password
is saved in /opt/cloud-scheduler/etc/pragmac.pass
/opt/cloud-scheduler/UI - cloud scheduler gui code distribution and a bild framework for
npm
. To make (debug) changes to the app.js file :# cd /opt/cloud-scheduler/UI # make needed chanfges in src/* # npm run build-unix # cp dist/app.js /var/www/html/cloud-scheudler/app.js
/opt/cloud-scheduler/etc/ - pragma.sql
- pragma.sql - input data for the
pragma
database, including a default password for the admin user. During thecs-config
run, this file is executed by mysql.
- pragma.sql - input data for the
Installs Node.js
in /usr/local/*
Installs mysql-python in /opt/python/lib/python2.7/site-packages/MySQLdb
- /etc/httpd/conf.d/cloud-scheduler.conf - add apache directive for python scripts
- /etc/ld.so.conf.d/cloud-scheduler.conf - adds python library to dynamic linker runtime bindings
- /opt/cloud-scheduler/bin - cs-config, cs-uninstall, sha512.py
- cs-config - is run during the roll post install. Creates and initializes the
pragma
database, sets the db administrator user (pragmac) access. NOTE: if the database exists it gets destroyed. - cs-uninstall - If the roll needs to be removed, the script deletes installed RPMs and
removes all created files and directories in
/opt/cloud-scheduler
and/var/www/html/cloud-scheduler
- sha512.py - a helper python script to create sha512 hash object and its hex digest. Used to create a hash for a random password for the db administrative user. The digests for passwords are used for the GUI login.
- cs-config - is run during the roll post install. Creates and initializes the
- /opt/cloud-scheduler/etc/ - cs-admin.sql.tmpl, cs-initdb.sql.tmpl
- cs-initdb.sql.tmpl - a template sql script to create a
pragmac
database and its admin userpragmac
. During thecs-config
run, a filecs-initdb.sql
is created from this template and is executed by mysql. - cs-admin.sql.tmpl - a template sql script to update a password for the db admin user in the
user
table. During thecs-config
run, a filecs-initdb.sql
is created from this template and is executed by mysql.
- cs-initdb.sql.tmpl - a template sql script to create a
By default, you can access the Cloud Scheduler via http://myhost.edu/cloud-scheduler. If you want to enable https and create a friendlier name such as https://cloud.mydomain.edu, you will need to
As your administrator to create a DNS host alias (e.g., cloud.mydomain.edu) that points to your host.
Create a SSL host certificate via Let's Encrypt or other service.
Modify the /etc/httpd/conf.d/cloud-scheduler.conf as follows
NameVirtualHost youripaddress:80 <VirtualHost myhost.edu:80> ServerName myhost.edu DocumentRoot "/var/www/html" </VirtualHost> <VirtualHost cloud.mydomain.edu:80> ServerName cloud.mydomain.edu DocumentRoot "/var/www/html/cloud-scheduler" Redirect permanent / https://cloud.mydomain.edu/ AddHandler cgi-script .cgi .py </VirtualHost> <VirtualHost cloud.mydomain.edu:443> ServerName cloud.mydomain.edu DocumentRoot "/var/www/html/cloud-scheduler" SSLEngine on SSLCertificateFile /etc/pki/tls/certs/cloud_letsencrypt_cert.pem SSLCertificateKeyFile /etc/pki/tls/private/cloud_letsencrypt_key.pem SSLCertificateChainFile /etc/pki/tls/certs/cloud_letsencrypt_fullchain.pem AddHandler cgi-script .cgi .py </VirtualHost> <Directory /var/www/html/cloud-scheduler> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] </Directory>