PGA Installation
Pick your OS...</br/> Cent OS MAC OS Ubuntu OS
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.
- Ubunutu prerequisites
- Cent OS prerequisites
- MAC prerequisites
- 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
- 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 yum install php-soap Could be be it is already enabled in CentOS7
- Install php using yum install php
- Configure Selinux to allow outbound connection from web server;
- 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
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.)
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 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
- Follow instructions in MCrypt Installation for PHP on MAC
- First check whether your MAC has Apache installed. To check availability;
- To stop running Apache use;
- 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
- Then move Composer using
PGA Installation
- Go to cd /Library/WebServer/Documents
- Take a copy from GIT using
- Navigate to PGA folder
- Make sure the storage folder is writable by all users
- Move out of app folder and give;
This will take few minutes 6. You might get an error like this
- 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.so
- Now issue composer update command
- Restart the web server
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
- 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
- Uncomment the following extensions: mcrypt.so, openssl.so, and soap.so. If they do not exists add them as extensions.
- Locate httpd.conf file
- 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
- Install Apache sudo apt-get install apache2
- Install PHP 5.4
- You can check the installed versions of apache and php using apache2 -v and php -v commands
- Install the necessary php extensions
- Install Composer System Wide
- Activate mod_rewrite
- Open the default vhost config file:
- 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.
- Exit and save with CTRL+X, Y, ENTER.
Go to Airavata Installation on CentOS 7