PGA Installation

Pick your OS...</br/> Cent OS       MAC OS       Ubuntu OS      

General Prerequisites

  1. A Unix or Unix like operating system.
  2. 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.
  3. Composer
  4. MYSQL database (Required if the user is hosting Airavata on his own. To communicate with hosted Airavata this step is not relevant)
  5. MCrypt PHP extension
  6. Enable OpenSSL PHP extension
  7. Follow instructions given in links to install the prerequisites based on the OS.
    • Ubunutu prerequisites
    • Cent OS prerequisites
    • MAC prerequisites
  8. Important: Do not need to install Laravel. You can skip the steps given on the links
  9. WSO2 IS server

PGA Installation on CentOS 7

Pre-Installations

  1. Install apache 
  1. 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
  2. Enable php using yum install php-soap Could be be it is already enabled in CentOS7
  3. Install php using  yum install php
  4. Configure Selinux to allow outbound connection from web server;
  1. install composer
  1. Install php-mcrypt yum install php-mcrypt

PGA Installation

  1. As the document root (var/www/html) take the git clone https://github.com/apache/airavata-php-gateway.git
  2. Change the cloned folder name to your desired folder name(e.g.: airavata-php-gateway). This will carry sub folders for the gateway
  1. In the gateway folder do a composer update

  2. Create a directory in var/www/ for user data (E.g.:gateway-user-data).

  3. 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
    
  4. Copy ./app/config/pga_config.php.template to ./app/config/pga_config.php

  5. 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.)
  6. Give writing permission chmod -R g+rwx app/storage/

  7. Make sure SElinux comparability of airavata_php_gateway folder. For that give 

This is to make sure the gateway folder is readable by http 10. 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. 11. 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 12. Locate httpd.conf file in location /etc/httpd/conf/
Make sure below ‘Allow Override’ has ‘All’ option.

PGA Installation on MAC Yosemite OS

Pre-Installation

  1. Follow instructions in MCrypt Installation for PHP on MAC
  2. First check whether your MAC has Apache installed. To check availability;
  1. To stop running Apache use;
  1. Once above is completed follow the Installation Steps given for
    • Configuring Apache
    • Installing Composer (Use sudo commands as and when required for installation)
  2. To install Composer use
  1. Then move Composer using

PGA Installation

  1. Go to cd /Library/WebServer/Documents
  2. Take a copy from GIT using
  1. Navigate to PGA folder
  1. Make sure the storage folder is writable by all users
  1. Move out of app folder and give;

This will take few minutes 6. You might get an error like this

  1. Install mcrypt installation MCrypt Installation
  2. (Optional) Go to [PGA_HOME]/app/config/pga_config.php and change the configuration to match your settings
  3. 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.so
  1. Now issue composer update command
  1. Restart the web server

Link Airavata and PGA

  1. Once the PGA and Airavata are downloaded and locally running; in PGA app/config folder locate the file called pga_config.php.template
  2. Copy the located file and name it as pga_config.php
  3. In the newly copied file find two configurations for
    • Airavata host
    • Port
  4. Change above configurations
    • Airavata host = localhost
    • Port = 9930
  5. You are all set to run your own PGA!
  6. For steps to register resources, applications, etc… use
  7. 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

  1. To install dependencies use commands in Ubuntu Installation
    In the command avoid installing mysql and mariaDB.
  2. Enable the appropriate extensions: navigate to php.ini
    • Uncomment the following extensions: mcrypt.so, openssl.so, and soap.so. If they do not exists add them as extensions.
  3. Locate httpd.conf file
- Find 'AllowOverride None' and change to 'AllowOverride All' (Two places to change)

PGA Installation

  1. The following guide give a sample installation starting from a fresh Ubunutu 12.04 installation. Similar instructions should be used in other operating systems.
  2. Update the ubuntu package manager
  1. Install Apache sudo apt-get install apache2
  2. Install PHP 5.4
  1. You can check the installed versions of apache and php using apache2 -v and php -v commands
  2. Install the necessary php extensions
  1. Install Composer System Wide
  1. Activate mod_rewrite
  1. Open the default vhost config file:
  1. Now search for “AllowOverride None” corresponding “DocumentRoot /var/www <Directory /var/www>”
    (which should be there TWO times) and change both to “AllowOverride All“. Search for these two lines.
  2. Exit and save with CTRL+X, Y, ENTER.

Go to Airavata Installation on CentOS 7