PGA Installation
General Prerequisites
- A Unix or Unix like operating system.
- A web server (e.g apache web server) with PHP 5.4 or higher. Make sure to have enabled mod_rewrite module in httpd.conf file and enable PHP SOAP extension.
- Composer
- MYSQL database (Required if the user is hosting Airavata on his own. To communicate with hosted Airavata this step is not relevant)
- MCrypt PHP extension
- Enable OpenSSL PHP extension
- Follow instructions given in links to install the prerequisites based on the OS.
- Important: Do not need to install Laravel. You can skip the steps given on the links
- WSO2 IS server
PGA Installation on CentOS 7
Pre-Installations
- Install apache
Yum install httpd
- module_rewrite is auto enabled in apache version in centos7. Its in /etc/httpd/conf.modules.d/00-base.conf file and the line is LoadModule rewrite_module modules/mod_rewrite.so
- Enable php using
Could be be it is already enabled in CentOS7yum install php-soap
- Install php using
yum install php
- Configure Selinux to allow outbound connection from web server;
setsebool -P httpd_can_network_connect 1
- install composer
yum install composer
- Install php-mcrypt
yum install php-mcrypt
PGA Installation
- As the document root (var/www/html) take the git clone https://github.com/apache/airavata-php-gateway.git
- Change the cloned folder name to your desired folder name(e.g.: airavata-php-gateway). This will carry sub folders for the gateway
cp - R airavata-php-gateway /* .
- In the gateway folder do a
composer update
- Create a directory in var/www/ for user data (E.g.:gateway-user-data).
-
Make this user data directory writeable by Apache httpd by making the following SELinux update as root:
chcon -R -t httpd_sys_rw_content_t /path/to/gateway-user-data
-
Copy ./app/config/pga_config.php.template to ./app/config/pga_config.php
- In pga_config.php change airavata server, change;
- Airavata Client Configurations
- 'airavata-server' => 'localhost’,
- 'gateway-id' => 'php_reference_gateway',
- 'experiment-data-absolute-path' => '/var/www/gateway-user-data',(Here user has to create the experimentData folder in var/www)
- 'gateway-data-store-resource-id' => '' (This is the ID of the gateway preferred storage resource)
- Portal Related Configurations
- 'super-admin-portal' => false, (User has one gateway and need to use it to configure the compute resources, storage resources, etc...)
- 'admin-emails' => ['airavatatest100@gmail.com'],
- 'portal-email-username' => 'airavatatest100@gmail.com',
- 'portal-email-password' => '&airavaxxxxxx',
- WSO2 Identity Server Related Configurations
- 'tenant-domain' => 'prod.airavata', (Provided by the Gateway Admin to WSO2 IS at tenant creation)
- 'admin-username' => 'Gateway-Admin', (Provided by the Gateway Admin to WSO2 IS at tenant creation)
- 'admin-password' => 'Gateway-Admin-Password', (Provided by the Gateway Admin to WSO2 IS at tenant creation)
- 'oauth-client-key' => 'G1khg0I0Xf444rereggrteret', (Generated by WSO2 IS at tenant creation)
- 'oauth-client-secret' => 'G1khg0I0Xf444rere', (Generated by WSO2 IS at tenant creation)
- 'verify-peer' => true, (Set this to false if trusted server certificates are not used. Refer Adding CA Signed Certificate on adding trusted certificates.)
- Airavata Client Configurations
- Give writing permission chmod -R g+rwx app/storage/
- Make sure SElinux comparability of airavata_php_gateway folder. For that give
This is to make sure the gateway folder is readable by httpchcon -Rv --type=httpd_sys_content_t airavata-php-gateway/
- ls - lZ shows the SELinux context. After the above chcon command do the same for storage folder as well
This is to make sure the storage folder is writable.su -c "chcon -R -h -t httpd_sys_script_rw_t [fullpath]/app/storage”
- Configure firewall to allow http and https
- Check existing configurations using
firewall-cmd --zone=public --list-services
- To open access for http
firewall-cmd --zone=public --permanent --add-service=http
- To open access for https
firewall-cmd --zone=public --permanent --add-service=https
- To get above rules applied
firewall-cmd —reload - refresh
- Check existing configurations using
- Locate httpd.conf file in location /etc/httpd/conf/
Make sure below 'Allow Override' has 'All' option.# # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All
PGA Installation on MAC Yosemite OS
Pre-Installation
- Follow instructions in MCrypt Installation for PHP on MAC
- First check whether your MAC has Apache installed. To check availability;
apache ctrl start
- To stop running Apache use;
apache ctl stop
- Once above is completed follow the Installation Steps given for
- Configuring Apache
- Installing Composer (Use sudo commands as and when required for installation)
- To install Composer use
curl -sS https://getcomposer.org/installer | php
- Then move Composer using
mv composer.phar /usr/local/bin/composer
PGA Installation
- Go to cd /Library/WebServer/Documents
- Take a copy from GIT using
git clone https://github.com/apache/airavata-php-gateway.git
- Navigate to PGA folder
cd /Library/WebServer/Documents/airavata-php-gateway
- Make sure the storage folder is writable by all users
sudo chmod -R 777 app/storage
- Move out of app folder and give;
This will take few minutessudo composer update
- You might get an error like this
Mcrypt PHP extension required. Script php artisan clear-compiled handling the post-update-cmd event returned with an error [RuntimeException] Error Output:
- Install mcrypt installation MCrypt Installation
- (Optional) Go to [PGA_HOME]/app/config/pga_config.php and change the configuration to match your settings
- Enable Apache extensions (mod_rewrite module and PHP SOAP extension)
uncomment #LoadModule rewrite_module libexec/apache2/mod_rewrite.so uncomment #LoadModule php5_module libexec/apache2/libphp5.sosudo vim /etc/apache2/httpd.conf
- Now issue composer update command
sudo composer update
- Restart the web server
sudo apachectl restart
Link Airavata and PGA
- Once the PGA and Airavata are downloaded and locally running; in PGA app/config folder locate the file called pga_config.php.template
- Copy the located file and name it as pga_config.php
- In the newly copied file find two configurations for
- Airavata host
- Port
- Change above configurations
- Airavata host = localhost
- Port = 9930
- You are all set to run your own PGA!
- For steps to register resources, applications, etc… use
- For steps to create projects, experiments and monitor them use IMPORTANT: In places where the hosted PGA link is used please replace by your locally running PGA URL.
PGA Installation on Ubuntu OS
Pre-Installation
- To install dependencies use commands in Ubuntu Installation
In the command avoid installing mysql and mariaDB. - Enable the appropriate extensions: navigate to php.ini
sudo vi /etc/php.ini
- Uncomment the following extensions: mcrypt.so, openssl.so, and soap.so. If they do not exists add them as extensions.
extension=mcrypt.so
extension=openssl.so
extension=soap.so
- Uncomment the following extensions: mcrypt.so, openssl.so, and soap.so. If they do not exists add them as extensions.
- Locate httpd.conf file
sudo vi /etc/httpd/conf/httpd.conf
- Find 'AllowOverride None' and change to 'AllowOverride All' (Two places to change)
PGA Installation
- The following guide give a sample installation starting from a fresh Ubunutu 12.04 installation. Similar instructions should be used in other operating systems.
- Update the ubuntu package manager
sudo apt-get update
sudo apt-get upgrade
- Install Apache sudo apt-get install apache2
- Install PHP 5.4
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-cache policy php5
sudo apt-get install php5
- You can check the installed versions of apache and php using
andapache2 -v
php -v commands
- Install the necessary php extensions
sudo apt-get install unzip
sudo apt-get install curl
sudo apt-get install openssl
sudo apt-get install php5-mcrypt
sudo apt-get install php-soap
- Install Composer System Wide
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
- Activate mod_rewrite
sudo a2enmod rewrite
sudo service apache2 restart
- Open the default vhost config file:
sudo nano /etc/apache2/sites-available/default.
- Now search for “AllowOverride None” corresponding “DocumentRoot /var/www
”
(which should be there TWO times) and change both to “AllowOverride All“. Search for these two lines. - Exit and save with CTRL+X, Y, ENTER.