|
|
|
|
|
|
|
|
Deployment - Sales Dashboard using AppFabric SDK for PHP
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
|
|
Demo Installation Guide
|
- If you haven't already done so,
Download and configure the AppFabric SDK for PHP Developers.
- Download and extract
dotnetservicesphp-v1.0-sample.zip.This will create following five folders
- Clientapp
- database
- iisrewrite
- PollingService
- SalesDashboardService

- The Demo requires a service namespace, management key, issuer key, policy key
and claims to be created on azure. The following steps explain how to create a
service namespace, keys and claims on azure:
- Login to AppFabric Devloper Portal using your live ID.
- Create a project by specifying a name e.g. PHPAppFabric.
- Once the project is created, Click on the project name to navigate to the project information Page.
- Click on 'Add Service Namespace' to create a new service namespace, give name e.g. appfabricsdkphp
- Once the service namespace is created, click on the 'Service Namespace' name to navigate to the service namespace information page.
- In this page you can see information such as Management key, service bus and access control end points.
- To create issuer key and policy key,
download and install Windows Azure platform AppFabric SDK.
- Go to C:\Program Files\Windows Azure platform AppFabric SDK\V1.0\Tools, Update the Acm.exe.config file,with service namespace and management key.
- Copy and paste SetUpSalesDashBoard.cmd to C:\Program Files\Windows Azure platform AppFabric SDK\V1.0\Samples \AccessControl\GettingStarted\ASPNETStringReverser
- From the command prompt run SetUpSalesDashBoard.cmd, this script will ask for your service namespace name and management key
This script will create and display the issuer key and policy key, notedown these
keys. This script also creates required claims for the SalesDashBoard application.
- Enable gd2 extension in php.ini file
- To enable gd2, search for 'extension=php_gd2.dll' in the php.ini file and remove the semicolon (;) in front.
- Follow the instructions listed below to configure the
RESTful SalesDashboard Service:
- Create a MySQL database with name infocorp, use the MySQL script \database\infocorp.sql to create required tables with data in this database
- Set following parameters present in config.php file
placed under SalesDashboardService\config folder as per your configuration.
- Define the database configuration settings as described
below
- MySQL server name as DB_HOST. e.g. "localhost"
- MySQL user name as DB_USER. e.g. "root"
- MySQL password as DB_PASS
- MySQL database name as DB_DBNAME. e.g. "infocorp"
- Define the AppFabric settings as described below:
- Set value of ACS_TRUSTED_SERVICE as AppFabric service namespace e.g. "appfabricsdkphp"
- Set value of ACS_TRUSTED_AUDIENCE as "http://localhost/SalesDashboard/"
- Set value of ACS_TRUSTED_SIGNING_KEY as the policy key step 3.j
- Follow the instructions listed below to configure the
SalesDashboard client application:
- Set following parameters present in config.inc file
placed under \Clientapp\includes\ folder as per your configuration.
- Define the proxy settings as described below:
- HTTP Proxy Host Name
define("PROXY_HOST", "127.0.0.1");
- HTTP Proxy Port Number
define("PROXY_PORT", "80");
- HTTP Proxy username
define(“HTTP_PROXY_USER”, "");
- HTTP Proxy Password
define("PROXY_PASSWORD", "");
- Define the AppFabric Service Bus settings as described below:
- Set value of ISSUER_NAME as "owner"
- Set value of ISSUER_SECRET_KEY as management key in step 3.f
- Set the value of SERVICE_NAMESPACE_DOMAIN as your service namespace
ex:appfabricsdkphp
- Set the value of MESSAGE_BUFFER_NAME as "salesopphp"
- Set the value of SCOPE_APPLIES_TO as "http://localhost/SalesDashboard/"
- Set the value of HOST_NAME as url to the RESTful Sales Dashboard Service, refer
step 7.d e.g. http://localhost:8086

- Follow the instruction below to set up the SalesDashboard service and Client application:
- Open login.php file in \Clientapp\view folder, search for the text "txtPassword" and set your issuer key (from step 3.j) as the value of "value" attribute.
- Copy-paste the Web.config file in \iisrewrite to the \Clientapp folder
- Copy-Paste the SalesDashBoardService folder to \Clientapp folder
- Create a web site with name SalesDashBoard [e.g. on port 8086] using the contents of \Clientapp.
To know more about how to configure a new website on IIS, please refer
here
- Follow the instructions listed below to configure the Polling Service
- Open the command prompt and change the current directory to the PollingService folder and run the polling service as
a stand-alone service using following command:
C:\inetpub\www\html\PollingService> php intermediateService.php
- To stop the polling service, open the command prompt and change the current directory to the PollingService folder and run
following command:
C:\inetpub\www\html\PollingService> php intermediateService.php stop
- Open browser and browse to http://localhost:8086
|
|
|
|
|
|