Step by step guide to deploy Logistic Wizard to Cloud Foundry Enterprise Environment(CFEE). The Logistic Wizard app is broken down into many microservices to function different part of the application. There are three runtimes(WebUI, ERP, and Controller) all of which deployed to CFEE while the services located in the public Cloud Foundry and been linked to the CFEE account. You may be thinking why to use CFEE at first place.
With the IBM® Cloud Foundry Enterprise Environment (CFEE), you can instantiate multiple, isolated, enterprise-grade Cloud Foundry platforms on demand. Instances of the IBM Cloud Foundry Enterprise service run within your own account in the IBM Cloud. The environment is deployed on isolated hardware (Kubernetes clusters). You have full control over the environment, including access control, capacity management, change management, monitoring, and services.
CFEE
- Web UI runtime
- ERP runtime
- Controller runtime
Non-CFEE
- Cloudant used by the ERP
- Cloud Functions
- Cloudant used by Cloud Functions
- Weather Company Data used by Cloud Functions
The services must be created within the public Cloud Foundry(CF) and then linked to your Cloud Foundry Enterprise Environment (CFEE).
Logistics Wizard consists of several microservices.
-
If this instruction guide, you will explore deploying Logistic Wizard to CFEE. First, you would need a CFEE instance created to follow this guide. If you don't have one already, then you can create one by following the steps 1 & 2 in this link.
-
The instructions below deploys to the US South region, but you can deploy to other regions available depending on your requirements.
- (US South) public CF API endpoint: https://api.ng.bluemix.net
- (US South) CFEE API endpoint: https://api.<ENVIRONMENT_NAME>-cluster.us-south.containers.appdomain.cloud
- You can get your CFEE API endpoint from the IBM Cloud CFEE dashboard.

-
Then clone
logistics-wizard-erprepo.git clone https://github.com/IBM-Cloud/logistics-wizard-erp cd logistics-wizard-erp -
Edit the
manifest.ymlfile and remove thelogistics-wizard-erp-dbservice listed. -
Switch to CFEE API endpoint and target your CFEE Org and Space.
cf api <CFEE_API ENDPOINT> cf login
Note: For creating CFEE Org and Space, refer https://console.bluemix.net/docs/cloud-foundry/orgs-spaces.html#create_orgs
-
Push the ERP to CFEE.
cf push --no-start
-
Create the Cloudant NoSQLDB service for the ERP. Navigate to IBM Cloud Dashboard > Create Resource > Search for Cloudant > name it as
logistics-wizard-erp-db.
-
Create the database called
logistics-wizardby launching the Cloudant dashboard.
-
On the CFEE dashboard, click on the Org you created under Organizations > Spaces > Space name > Services and then Create a service alias for the Cloudant Service
logistics-wizard-erp-dband then bind it to thelogistics-wizard-erpapplication.
-
Start the ERP microservice.
cf start logistics-wizard-erp
-
After starting the ERP microservice, you can verify it is running.
-
Clone the controller repo.
git clone https://github.com/IBM-Cloud/logistics-wizard-controller cd logistics-wizard-controller -
Push the controller microservice without starting.
cf push --no-start
-
Set the environment variables for the controller to connect to the ERP. You can get the
OPENWHISK_AUTHAPI key from the IBM Cloud console. Choose the Region, Org and Space where you have rest of the services created.
On a Terminal, run the below commands by providing appropriate values
cf set-env logistics-wizard-controller ERP_SERVICE 'https://<erp-URL>'
cf set-env logistics-wizard-controller OPENWHISK_AUTH <openwhisk-auth>
cf set-env logistics-wizard-controller OPENWHISK_PACKAGE lwr-
Start the controller microservice.
cf start logistics-wizard-controller
-
Clone the logistics-wizard-webui repo.
git clone https://github.com/IBM-Cloud/logistics-wizard-webui cd logistics-wizard-webui -
Install the dependencies.
npm install
-
Build the static files for the WebUI using the appropriate environment variables.
export CONTROLLER_SERVICE=<controller-service-URL> npm run deploy:prod
For example,
CONTROLLER_SERVICE=https://logistics-wizard-controller.lw-cfee-demo-cluster.us-south.containers.appdomain.cloud -
Deploy the WebUI to CFEE.
cd dist cf push logistics-wizard
Cloud Functions is outside CFEE, so you would need to switch to the public CF to complete below section.
-
Switch to public Cloud Foundry.
cf api https://api.ng.bluemix.net ic target --cf cf login
-
Create the two services,
CloudantandWeather Company Dataservice.cf create-service weatherinsights Base-v2 logistics-wizard-weatherinsights cf create-service cloudantNoSQLDB Lite logistics-wizard-recommendation-db
Note: weatherinsights Base-v2 requires a
paidaccount and your account will be charged. -
Create service keys for two services created, take note of the URL values as it would be needed in step 6.
cf create-service-key logistics-wizard-weatherinsights for-openwhisk cf create-service-key logistics-wizard-recommendation-db for-openwhisk cf service-key logistics-wizard-weatherinsights for-openwhisk cf service-key logistics-wizard-recommendation-db for-openwhisk
-
Clone the logistics-wizard-recommendation repo.
git clone https://github.com/IBM-Cloud/logistics-wizard-recommendation cd logistics-wizard-recommendation -
Copy the local env template file.
cp template-local.env local.env
-
Using the URL values from the terimal output above, update the local.env file to look like the following:
PACKAGE_NAME=lwr CONTROLLER_SERVICE=<controller-service-URL> WEATHER_SERVICE=<logistics-wizard-weatherinsights-URL> CLOUDANT_URL=<logistics-wizard-recommendation-db-URL> CLOUDANT_DATABASE=recommendations
-
Build your Cloud Functions actions.
Note: node version >=4.2.0 required and npm >=3.0.0
npm install npm run build
-
Verify your setup, Here, we perform a blocking (synchronous) invocation of
echo, passing it "hello" as an argument.bx wsk action invoke /whisk.system/utils/echo -p message hello --result
Output should be something like
{ "message": "hello" }. -
Deploy your Cloud Functions actions:
./deploy.sh --install
-
Done, now access the WebUI URL in the browser and explore the app running on CFEE.






