This is a fictitious case study demonstrating how a company can leverage SUSE Cloud Application Platform (SUSE CAP) to provide agility infrastructure to scale their business as demands suddenly surge.
There are 2 parts in this demo.
A QR code is provided to attendees, which is the URL for the shopping cart application. As of this writing, SUSE CAP is deployed on AWS, and may be subjected to changes in the future. Attendees will use their mobile phones to browse to that page and start the ordering. This document provides additional information, so go through the powerpoint presentation first.
This demo will showcase how easy it is to update the software. This is where some requirements need to be met before you can present this demo. The code is modified locally to present the additional payment method (bitcoin), and will need to be compiled locally before uploading the new application to AWS.
To understand how the demo is supposed to execute by the presenters to a group of audience on the stage floor, please visit the demo guide (Access is limited to SUSE Employee only)
This eshop demo application is hosted on SUSE Cloud Application Platform on public cloud.
Login is required to access to the SUSE CAP and prometheus Query UI. Please visit to this link for the credentials (Access is limited to SUSE employee only)
The demo application is comprised of a simple micro-services based architecture:
Component | Description | URL |
---|---|---|
suse-expert-day | QR Code For Access To order app | QR code for display |
order-app | Mobile-friendly web-order application | http://suse-order-app.open-cloud.net/ |
order-processor | Shop API service | |
dashboard | Store Shop Owner Business Dashboard | http://suse-order-dashboard.open-cloud.net |
NOTE: This demo is hosted in public cloud which mean internet access is required for both the presenter and audience.
Assuming the presenter will be using OS openSUSE 15 installed with GNOME
, the initial setup will be as follows.
sudo zypper -n in git-core vim nodejs8 nodejs10 cf-cli
cd ~
git clone https://github.com/dsohk/susecap-demostore
cd ~/susecap-demostore/order-app
npm install --save-dev
npm audit fix
To access to the SUSE CAP via CLI, please follow the steps below.
- Set SUSE CAP API endpoint for
cf-cli
cf login -a https://api.open-cloud.net --skip-ssl-validation -u admin
- Enter admin password to continue
- Select Organization:
demo
- Select space:
dev
- List all apps under
demo/dev
space withcf apps
command like the example below.
$ cf apps
Getting apps in org demo / space dev as admin...
OK
name requested state instances memory disk urls
suse-order-dashboard started 1/1 512M 1G suse-order-dashboard.open-cloud.net
suse-order-app started 1/1 64M 1G suse-order-app.open-cloud.net
suse-order-processor started 1/1 512M 1G suse-order-processor.open-cloud.net
suse-expert-day started 1/1 64M 1G suse-expert-day.open-cloud.net
There are 2 versions of the order app:
- v1 - order-app with cash and credit card payment options only
- v2 - order-app with cash, credit card and bitcoin payment options.
Make sure the order-app-v1 has been deployed to SUSE CAP. If not, execute the following commands.
cd ~/susecap-demostore/order-app
./deploy-v1.sh
cd ~/susecap-demostore/order-app
vi src/app/paymethods.ts
Uncomment the 3rd payment option and ensure a comma has been added to the 2nd payment option like below.
import { Paymethod } from './paymethod'
export const PAYMETHODS: Paymethod[] =[
{id: 1, name: 'Cash', image: 'fa fa-dollar-sign'},
{id: 2, name: 'Credit Card', image: 'fa fa-credit-card'},
{id: 3, name: 'SUSE Coin', image: 'fab fa-btc'}
]
Save the file and deploy the change to SUSE CAP
sh ./deploy.sh
At this stage, both v1 and v2 will be running on SUSE CAP with the v1 still serving.
./switch-version.sh v1 v2
At this point, the audience should see the order-app-v2 on their mobile phone.
./switch-version.sh v2 v1
Ask the audience to check if their mobile phone is showing order-app-v1 (no bitcoin) option.
After the demo has been completed, please reset the demo environment with the steps below.
- To clear all the data in dashboard, execute the following command line in your linux host.
curl http://suse-order-processor.open-cloud.net/api/reset
- To reset payment to 2 options only
cd ~/susecap-demostore/order-app
vi src/app/paymethods.ts
- Comment out the 3rd payment options as shown below and save the file. Please ensure no comma at the end of the 2nd payment option.
import { Paymethod } from './paymethod'
export const PAYMETHODS: Paymethod[] =[
{id: 1, name: 'Cash', image: 'fa fa-dollar-sign'},
{id: 2, name: 'Credit Card', image: 'fa fa-credit-card'}
// {id: 3, name: 'SUSE Coin', image: 'fab fa-btc'}
]
- Redeploy the
order-app
to SUSE CAP on AWS
cf login
cd ~/susecap-demostore/order-app
sh ./deploy.sh
Please submit an issue ticket to help us improve the demo application.
Special thanks to @byuenhb for their contribution.