#!/bin/bash
# Prerequisites:
# - Cloud Foundry trial account on SAP Cloud Platform with
# entitlement for Business Rules service and application runtime
# - Build tool 'mbt' installed globally
# - cf CLI installed with the 'multiapps' plugin installed
# - cf CLI already authenticated against the CF endpoint
# Recommended:
# - Role collection containing RuleRepositorySuperUser and
# RuleRuntimeSuperUser assigned tothe trial account user
# Show current CF target
echo Deploying to:
cf target
# Create an instance of the service, with the free 'lite' service plan, called businessrules
# (reason for the name is because that's how it's referred to in the mta.yaml to come). If the
# service instance 'businessrules' already exists it won't be re-created.
cf create-service business-rules lite businessrules
# Download the project containing the multi target application descriptor for the rules editor
# (see https://bit.ly/handsonsapdev#ep44 for background).
rm -rf archive.zip editor/
curl -o archive.zip -s https://raw.githubusercontent.com/SAP-samples/cloud-businessrules-samples/master/cf-apps/cf-business...
unzip -q -d editor ./archive.zip
# Kick off the build - this should produce an archive in mta_archives/ directory.
cd editor/
mbt build
# Deploy the archive
cf deploy mta_archives/businessruleseditor_0.0.1.mtar
qmacro@penguin:~/local/projects/github.com/qmacro/handsonsapdev/episodes/ep51
-> ./rules.bash
Deploying to:
api endpoint: https://api.cf.eu10.hana.ondemand.com
api version: 2.144.0
user: dj.adams
org: I347491trial_qmacrosubdomain
space: dev
Creating service instance businessrules in org I347491trial_qmacrosubdomain / space dev as dj.adams@sap.com...
OK
Service businessrules already exists
[2020-01-28 12:09:52] INFO Cloud MTA Build Tool version 1.0.8
[2020-01-28 12:09:52] INFO generating the "Makefile_20200128120952.mta" file...
[2020-01-28 12:09:52] INFO done
[2020-01-28 12:09:52] INFO executing the "make -f Makefile_20200128120952.mta p=cf mtar= strict=true mode=" command...
[2020-01-28 12:09:52] INFO validating the MTA project
[2020-01-28 12:09:52] INFO validating the MTA project
[2020-01-28 12:09:52] INFO building the "businessruleseditor_appRouter" module...
[2020-01-28 12:09:52] INFO executing the "npm install --production" command...
.....npm WARN deprecated scmp@1.0.0: scmp v2 uses improved core crypto comparison since Node v6.6.0
.....
> @sap/node-jwt@1.6.5 install /home/qmacro/local/projects/github.com/qmacro/handsonsapdev/episodes/ep51/editor/businessruleseditor_appRouter/node_modules/@sap/node-jwt
> node ./build.js
`linux-x64-v8-6.8` exists; testing
Binary is fine; exiting
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN html5-apps-approuter@ No repository field.
npm WARN html5-apps-approuter@ No license field.
added 236 packages from 133 contributors and audited 407 packages in 10.319s
found 5 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
[2020-01-28 12:10:03] INFO the build results of the "businessruleseditor_appRouter" modulewill be packed and saved in the "/home/qmacro/local/projects/github.com/qmacro/handsonsapdev/episodes/ep51/editor/.editor_mta_build_tmp/businessruleseditor_appRouter" folder
[2020-01-28 12:10:04] INFO finished building the "businessruleseditor_appRouter" module
[2020-01-28 12:10:04] INFO generating the metadata...
[2020-01-28 12:10:04] INFO generating the MTA archive...
[2020-01-28 12:10:05] INFO the MTA archive generated at: /home/qmacro/local/projects/github.com/qmacro/handsonsapdev/episodes/ep51/editor/mta_archives/businessruleseditor_0.0.1.mtar
[2020-01-28 12:10:05] INFO cleaning temporary files...
Deploying multi-target app archive mta_archives/businessruleseditor_0.0.1.mtar in org I347491trial_qmacrosubdomain / space dev as dj.adams@sap.com...
Uploading 1 files...
/home/qmacro/local/projects/github.com/qmacro/handsonsapdev/episodes/ep51/editor/mta_archives/businessruleseditor_0.0.1.mtar
OK
Deploying in org "I347491trial_qmacrosubdomain" and space "dev"
Detected MTA schema version: "3"
Detected deployed MTA with ID "businessruleseditor" and version "0.0.1"
Detected new MTA version: "0.0.1"
Deployed MTA version: "0.0.1"
kProcessing service "businessruleseditor_html5_repo_runtime"...
Processing service "businessrules_uaa"...
Updating service "businessrules_uaa"...
Updating application "businessruleseditor_appRouter"...
Application "businessruleseditor_appRouter" attributes are not modified and will not be updated
Uploading application "businessruleseditor_appRouter"...
Stopping application "businessruleseditor_appRouter"...
Staging application "businessruleseditor_appRouter"...
Application "businessruleseditor_appRouter" staged
Starting application "businessruleseditor_appRouter"...
Application "businessruleseditor_appRouter" started and available at "i347491trial-qmacrosubdomain-dev-businessruleseditor-approuter.cfapps.eu10.hana.ondemand.com"
Deleting discontinued configuration entries for application "businessruleseditor_appRouter"...
Skipping deletion of services, because the command line option "--delete-services" is not specified.
Process finished.
Use "cf dmol -i 25e31dd8-41c7-11ea-a559-eeee0a8615fb" to download the logs of the process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |