open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 65 forks source link

Change exchangePublishScript.sh to publish sample business policies to the cluster org #286

Closed bmpotter closed 3 years ago

bmpotter commented 4 years ago

Since business policies can't be public, customers can't use the business policies from the IBM org, and generally can't even view them (because they don't usually have credentials in the IBM org). So change exchangePublishScript.sh to publish the sample business policies to the cluster org instead. You may have to add <cluster-name> as an argument to the script, because exchangePublishScript.sh may not have the right info to be able to query that, but the caller does.

I think the example business policies should have a constraint like openhorizon.example == helloworld (or cpu2evtstreams, etc.). That way the nodes that want to use it can just set this node policy property: openhorizon.example: helloworld

t-fine commented 4 years ago

PR I submitted for this: https://github.com/open-horizon/examples/pull/301

bmpotter commented 4 years ago

A couple of small updates are needed:

curl https://raw.githubusercontent.com/open-horizon/examples/v4.1/tools/exchangePublishScript.sh | bash -s -- -c $CLUSTER_ORG