如何不绑定app的情况下获得predix-zone-id?

Ivar_PredixCN 2017-08-28 09:36:45
PROBLEM
In order to call Predix services such as Asset, ACS, Analytics, or Time Series you must specify a Predix-Zone-Id header in your requests. How do you find the zone id when you do not yet have an app to push?

STEPS

Services such as Asset, ACS, and Time Series are multi-tenant and therefore share a common service endpoint. Your data is kept separate from others through the Predix-Zone-Id. There are a few ways to retrieve this guid that is needed when making any requests to the service. You do want to keep this value a secret between you and the service to help prevent unauthorized use of your partition.

The following examples use an instance of predix-timeseries called my-predix-timeseries.

(a) Run cf service my-predix-timeseries --guid and use the returned value.

This command simply returns a string such as:
12345678-1234-abcd-1a2b-1234abcd5678

(b) Use a Predix service key to get all of the VCAP details for your service including the Predix-Zone-Id, URIs, and connection details.


$ cf create-service-key my-predix-timeseries my-timeseries-key
...
OK
$ cf service-key my-predix-timeseries my-timeseries-key
{
"ingest": {
"uri": "wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages",
"zone-http-header-name": "Predix-Zone-Id",
"zone-http-header-value": "12345678-1234-abcd-12ab-1234abcd5678",
"zone-token-scopes": [
"timeseries.zones.12345678-1234-abcd-12ab-1234abcd5678.user",
"timeseries.zones.12345678-1234-abcd-12ab-1234abcd5678.ingest"
]
},
"query": {
"uri": "https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints",
"zone-http-header-name": "Predix-Zone-Id",
"zone-http-header-value": "12345678-1234-abcd-12ab-1234abcd5678",
"zone-token-scopes": [
"timeseries.zones.12345678-1234-abcd-12ab-1234abcd5678.user",
"timeseries.zones.12345678-1234-abcd-12ab-1234abcd5678.query"
]
}
}



You can find the Predix-Zone-Id in that returned dictionary.

(c) You can start with a hello world application, cf push to cloud foundry, cf bind the service to the app, then run cf env for the app.

DEPENDENCIES
Cloud Foundry CLI

You should know how to create services in Cloud Foundry.

RESOURCES
Cloud Foundry Documentation on Managing Service Keys
https://docs.cloudfoundry.org/devguide/services/service-keys.html
...全文
934 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
nettman 2017-09-06
  • 打赏
  • 举报
回复
wanc1212 2017-08-31
  • 打赏
  • 举报
回复
看不明白,我是新人,还是要支持的
csdn987q 2017-08-31
  • 打赏
  • 举报
回复
qq_40012785 2017-08-29
  • 打赏
  • 举报
回复
haofffffffffffff
csdn987q 2017-08-29
  • 打赏
  • 举报
回复
hugh_z 2017-08-29
  • 打赏
  • 举报
回复
很专业的样子.
cattpon 2017-08-29
  • 打赏
  • 举报
回复
learning~
Cosmos-Z 2017-08-29
  • 打赏
  • 举报
回复
哦哦哦哦哦哦哦哦哦
nettman 2017-08-28
  • 打赏
  • 举报
回复
qq_40008338 2017-08-28
  • 打赏
  • 举报
回复
评论送积分吗
wjxxiao 2017-08-28
  • 打赏
  • 举报
回复
看不明白,我是新人
内容概要:本文围绕“面向高精度电流控制的PMSM多参数PSO辨识模型研究”,系统阐述了基于Simulink的永磁同步电机(PMSM)多参数辨识方法,重点采用粒子群优化算法(PSO)实现对电机关键内部参数的高精度辨识。研究构建了完整的PMSM控制系统仿真模型,结合智能优化算法,解决了传统参数辨识中精度低、收敛慢的问题,有效提升了电流环控制的动态性能与稳态精度。该方法特别适用于对控制精度和响应速度要求较高的工业应用场景,如高性能伺服系统、电动汽车驱动系统等,具有较强的工程实用价值和科研参考意义。文中提供了完整的Simulink仿真模型与配套代码,确保了研究内容的可复现性和实践操作性。; 适合人群:具备电机控制、自动化或电气工程等相关专业背景,熟悉MATLAB/Simulink仿真环境,从事电机驱动系统研发、控制算法设计或相关领域科研工作的工程师及研究生,尤其适合工作1-5年、希望深入理解先进参数辨识技术的研发人员。; 使用场景及目标:①开展高精度PMSM控制系统的设计与参数辨识研究;②学习并掌握PSO等智能优化算法在电机系统参数辨识中的具体实现与调优技巧;③完成学术论文复现、科研项目验证、毕业设计或工程原型开发,提升对现代电机控制核心技术的理解与应用能力。; 阅读建议:建议读者结合提供的Simulink模型与源代码进行动手实践,按照文档逻辑逐步搭建与调试仿真系统,重点关注PSO算法与电机模型的交互机制、目标函数设计及参数收敛过程,通过对比不同工况下的辨识结果,深入理解算法性能与控制精度之间的内在联系。

164

社区成员

发帖
与我相关
我的任务
社区描述
GE的Predix平台整合云计算可扩展性、大数据管理和高级分析技术来助力新一代的数字化企业。结合GE自己作为全球工业界领导者的经验,Predix云平台为开发高级工业应用程序提供可连接性、安全和高性能。
云计算大数据 技术论坛(原bbs)
社区管理员
  • GE Predix工业互联网开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧