Purpose

The purpose of this document is to install and validate the (global) mAP environment.

Environment

The mAP is required for installing mAP-API. Please see here for installation of mAP.

Installing the Application

Download files from the following URL.

cloudgateway-api-r1751.zip


Deployment
$ unzip cloudgateway-api-1.0.zip
$ sudo mv api /usr/local/.
Initial Setting
$ cd /usr/local/api

# Adjust permissions
$ sudo chown -R apache.apache /usr/local/api/app/tmp
$ sudo chmod +x /usr/local/api/cake/console/cake
$ sudo chmod +x /usr/local/api/app/vendors/shells/*.php
$ sudo chmod -R 777 /usr/local/api/app/tmp/cache

# Deletion of Log Files and Cache Files
$ sudo rm -rf app/tmp/cache/models/*
$ sudo rm -rf app/tmp/cache/persistent/*
$ sudo rm -rf app/tmp/cache/views/*
$ sudo rm -rf app/tmp/logs/*

# Copy of Configuration Files
$ cp app/config/database.template.php app/config/database.php
$ cp app/config/core.template.php app/config/core.php
# Put random data on 'Security.salt' and 'Security.cipherSeed' in core.php.
$ vi app/config/core.php
Configuration of httpd.conf

Include following configuration in /etc/httpd/conf/httpd.conf

<VirtualHost _default_:80>
  Redirect permanent / https://[HOST-NAME-OF-THIS-SERVER]/
</VirtualHost>

Alias /api "/usr/local/api"
<Directory "/usr/local/api">
  Order allow,deny
  Allow from all
  Options ExecCGI FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>


<Location "/api">
  SSLVerifyClient optional_no_ca
  SSLOptions +ExportCertData
</Location>
Configuration of .htaccess

Include following configuration in /usr/local/api/.htaccess.

 RewriteRule    services/(.*)$ ../map/connector/services/$1 [L]
Restart
$ sudo systemctl restart httpd.service
Application Configuration File

Advanced Configuration

Clustering

If you want to run on multiple servers to set the following.

Application Configuration File