This demo highlights the use of Application Services on VMWare vCloud Air
##Demo Scenario The ficticous company MediStuff wants to mobile enable it's sales workforce as soon as possible. The new mobile application should enable sales reps to view Customer Service calls placed by their accounts.
####The demo illustrates the following
- Pivotal Cloud Foundry (PCF) on vCloud Air exposing REST services to a mobile client.
- A PCF User Provided Service connecting to a remote on-premise mySQL Database
- A mobile client utilizing Kinvey mBaaS for Push Notifications
#####Search
- Search for Customer by Name
- Search for Customer by Contact Phone Number
- Search for all Customers
- Search for Ticket by Ticket Number
- Search for all Tickets
#####User
- Create a new User
- Edit a User
- Delete a User
- List all Users
- Login as a user
- Logout
- Add a New Customer
- Edit a Customer
- Delete a Customer
- View a Customer's tickets
- Change Customer User/Owner
- Create a New Ticket for a customer
- Edit a Ticket
- Delete a Ticket
- View a Ticket Detail and its Comments
- List a customers tickets
- Close a Ticket
- Reopen a Ticket
- Set Ticket Priority
- Create a New Comment on a Ticket
- Delete a Comment on a ticket
- Add a user as a follower to a ticket
- Remove a user as a follower to a ticket
- Create the database
- Reload the database with sample data
- Login
- Logout
- List all Customers for the current User
- List all Tickets for all the current User's Customers
- List all Tickets for a given Customer
- View the Ticket's Comments
- Add a New Comment to an open Ticket
- Receive an Apple push notification whan a Customer Ticket is modified
if python virtualEnv is not already on the workstation
$virtualenv --version
$ sudo pip install virtualenv
Then once virtualenv is installed
$ mkdir ~/vcademo/virtualEnvs
$ cd ~/vcademo/virtualEnvs
$ virtualenv mcare
$ cd mcare
$ source ./bin/activate
(mcare) $
$ git clone https://github.com/vmware/mcare-demo.git
Open the project with an editor such as sublime. Note sublime opens the directory and treats it as a project. File-> Open Browse to /Users/bwebster/vcademo/virtualEnvs/mcare/mcare-demo/mcare-web
The project should be executed within a python virtual env to keep python modules separate the base python install on your workstation.
Ensure the python virtual env is activated, you should see a command prompt that includes the the virtual env name
For example
(mcare)$
If is not activated then run
$ cd mcare
$ source ./bin/activate
$ pip install -r requirements.txt
$ python runApp.py
Once the application has started, open a browser to the url http://localhost:5000
to deactivate the virtualenv at some point in the future, rather than simply
closing the terminal window, run
(mcare)$ deactivate
## Mac xcode project
Using Apple Xcode 6.1 or greater
Open the project
~/vcaDemo/pythonVirtualEnvs/mcare/mcare-demo/mcare-mobile/mcare.xcodeproj
Deploy to iphone or iphone emulator
Use home button to go to iPhone settings.
Open mCare app and set local flask server url
For example
##### Local flask server testing:
The values should set in the config.py
PYTHON_HOST= '192.168.0.10'
PYTHON_PORT= '5000'
The host value depends
Use a value of localhost if you don’t need to connect from iPhone, set PYTHON_HOST to localhost and use
http://localhost:5000
Use a value of the local nic ip address if connecting from a browser and an iPhone, for example
http://192.168.0.10:5000
##### Cloud Foundry testing
If testing on Cloud Foundry install the Pivotal Cloud Foundry CLI
following the instructions at this location
[https://console.run.pivotal.io/tools](https://console.run.pivotal.io/tools)
For Cloud Foundry use the following url in the phone, no need to set PYTHON_HOST in the config.py file.
http://customer-service.23.92.225.219.xip.io
login with user bwebster / welcome1
or another registered user created through the Web version of the App.