本文主要是介绍[云开发3]-将问卷调查Demo应用快速部署到SAP云平台,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
快速部署到SAP云平台Cloud Foundry
阅读这篇blog大约需要5分钟
在Demo原型开发后的第一时间部署到云平台。
Be slow to promise and quick to perform.
部署前端UI5应用
修改index.html的sap-ui-core.js位置:
<script id="sap-ui-bootstrap"src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
UI5应用的运行环境是staticfile_buildpack,创建manifest.yml文件:
---
applications:
- name: arcticrandom-route: truepath: .buildpack: staticfile_buildpackmemory: 256M
部署应用:
cf push
输出:
...Staging app and tracing logs...Uploaded droplet (24.5M)Uploading completeCell 3adf9482-65af-48ef-86a3-a23b9adc0bc8 stopping instance ea800892-571a-4ad6-97eb-baf6346b0c3eCell 3adf9482-65af-48ef-86a3-a23b9adc0bc8 destroying container for instance ea800892-571a-4ad6-97eb-baf6346b0c3eCell 3adf9482-65af-48ef-86a3-a23b9adc0bc8 successfully destroyed container for instance ea800892-571a-4ad6-97eb-baf6346b0c3eWaiting for app to start...name: arctic
requested state: started
isolation segment: trial
routes: arctic-chatty-jackal.cfapps.eu10.hana.ondemand.com
last uploaded: Thu 13 Feb 21:49:15 CST 2020
stack: cflinuxfs3
buildpacks: staticfiletype: web
instances: 1/1
memory usage: 256M
start command: $HOME/boot.shstate since cpu memory disk details
#0 running 2020-02-13T13:49:33Z 0.0% 1.6M of 256M 131M of 1G
页面地址:
https://arctic-chatty-jackal.cfapps.eu10.hana.ondemand.com/webapp/
部署后端Node.js应用
Sails.js的CORS配置, security.js:
cors: {allRoutes: true,allowOrigins: '*',allowCredentials: false,},
Sails.js应用和部署Node.js完全一样,创建manifest.yml:
---
applications:
- name: arctic-backendrandom-route: truepath: .buildpack: nodejs_buildpackmemory: 768M
部署应用:
cf push
输出:
...Cell d8eab7bd-8f13-4598-a26b-00bb71b3764b destroying container for instance 0b198393-d057-499e-8283-8b4836de6ee9Cell d8eab7bd-8f13-4598-a26b-00bb71b3764b successfully destroyed container for instance 0b198393-d057-499e-8283-8b4836de6ee9Waiting for app to start...name: arctic-backend
requested state: started
isolation segment: trial
routes: arctic-backend-silly-cassowary.cfapps.eu10.hana.ondemand.com
last uploaded: Thu 13 Feb 21:11:11 CST 2020
stack: cflinuxfs3
buildpacks: nodejstype: web
instances: 1/1
memory usage: 768M
start command: npm startstate since cpu memory disk details
#0 running 2020-02-13T13:11:41Z 56.0% 48.3M of 768M 198M of 1G
API服务地址:
https://arctic-backend-silly-cassowary.cfapps.eu10.hana.ondemand.com
小结
通过SAP云平台Cloud Foundry部署云应用超级方便,让PaaS平台帮你去管理一切。你要做的就是CF PUSH。
参考阅读
- 5分钟将Node应用部署到SAP云平台Cloud Foundry
这篇关于[云开发3]-将问卷调查Demo应用快速部署到SAP云平台的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!