I have been able to set up a Google VPC with a Fabric topology of single org with two peers, all on different VM. I have Hyperledger composer on a separate VM and I am able to create a card with this connection profile
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org0",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"OneOrgsChannel": {
"orderers": [
"ordererorg0"
],
"peers": {
"peer0.org0": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer1.org0": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Org0": {
"mspid": "Org0MSP",
"peers": [
"peer0.org0",
"peer1.org0"
],
"certificateAuthorities": [
"ca.org0"
]
}
},
"orderers": {
"ordererorg0": {
"url": "grpc://orderer0:7050"
}
},
"peers": {
"peer0.org0": {
"url": "grpc://peer0:7051",
"eventUrl": "grpc://peer0:7053"
},
"peer1.org0": {
"url": "grpc://peer1:7051",
"eventUrl": "grpc://peer1:7053"
}
},
"certificateAuthorities": {
"ca.org0": {
"url": "http://35.200.195.193:7054",
"caName": "ca.org0"
}
}
}
While, I am using composer card import I am getting error like this:
Failed to import Identity Error: Client.createUser Parameter 'opts
mspid' required.
I have hfc-key-store populated with the certificates of admin that fabric peers and orderers uses.
I have searched a lot what is this error, but it seems to be abstract.
If you still have this problem (or maybe others have) just remember to make sure you didn't make a typo in connection.json file. You always mention organisations in two places there: client section and organizations. Make sure those names are the same.
Related
i can create thing, policy, certificate and connect altogether with these steps similar to https://github.com/aws/aws-cdk/issues/19303
But I want to do that with bulk thing creation, create certs and with policy (have created policy etc)
How do i achieve with CDK ?
i tried using provisioning template, but i am a bit unsure about that.
my code
const iotAssumeRoleWithCertificatePolicy = new iot.CfnPolicy(this, 'iotAssumeRoleWithCertificatePolicy', {
policyName: 'iotAssumeRoleWithCertificatePolicy',
policyDocument: {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:AssumeRoleWithCertificate",
"Resource": iotRoleAlias.roleArn.toString(),
}
]
},
});
const provisioningTemplateBody = {
"Parameters": {
"ThingName": {
"Type": "String"
},
"CSR": {
"Type": "String"
},
},
"Resources": {
"thing": {
"Type": "AWS::IoT::Thing",
"Properties": {
"ThingName": { "Ref": "ThingName" },
"ThingTypeName": "server-type",
"ThingGroups": [
"server-group",
]
}
},
"certificate": {
"Type": "AWS::IoT::Certificate",
"Properties": {
"CertificateSigningRequest": { "Ref": "CSR" },
CertificateId: {
Ref: 'AWS::IoT::Certificate::Id',
},
"Status": "ACTIVE"
}
},
"policy": {
"Type": "AWS::IoT::Policy",
"Properties": {
"PolicyName": iotAssumeRoleWithCertificatePolicy.toString(),
}
}
}
}
const provisiongTemplate = new iot.CfnProvisioningTemplate(this, 'iot-provisioning-template', {
provisioningRoleArn: iotProvisioningRole.roleArn,
templateBody: JSON.stringify(provisioningTemplateBody),
});
I try to use two connection-profile to setup the explorer. But I find there is always only 1 nodes, and in the "NETWORK" can only find orderer and the network I loggin. Here's the file I config.
only one peer
I use docker logs and find
[ERROR] FabricClient - Error: DiscoveryService has failed to return results
at DiscoveryService.send (/opt/explorer/node_modules/fabric-common/lib/DiscoveryService.js:370:10)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async NetworkImpl._initializeInternalChannel (/opt/explorer/node_modules/fabric-network/lib/network.js:279:13)
at async NetworkImpl._initialize (/opt/explorer/node_modules/fabric-network/lib/network.js:231:9)
at async Gateway.getNetwork (/opt/explorer/node_modules/fabric-network/lib/gateway.js:330:9)
config.json
{
"network-configs": {
"org1-network": {
"name": "org1-Network",
"profile": "./connection-profile/org1-network.json"
},
"org2-network": {
"name": "org2-Network",
"profile": "./connection-profile/org2-network.json"
}
},
"license": "Apache-2.0"
}
org1-network.json
{
"name": "org1-network",
"version": "1.0.0",
"client": {
"tlsEnable": true,
"adminCredential": {
"id": "exploreradmin1",
"password": "exploreradminpw"
},
"enableAuthentication": true,
"organization": "Org1MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"adminPrivateKey": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/keystore/priv_sk"
},
"peers": ["peer0.org1.example.com"],
"signedCert": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/users/User1#org1.example.com/msp/signcerts/User1#org1.example.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://peer0.org1.example.com:7051"
}
}
}
org2-network.json
{
"name": "org2-network",
"version": "1.0.0",
"client": {
"tlsEnable": true,
"adminCredential": {
"id": "exploreradmin2",
"password": "exploreradminpw"
},
"enableAuthentication": true,
"organization": "Org2MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org2.example.com": {}
}
}
},
"organizations": {
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path": "/tmp/crypto/peerOrganizations/org2.example.com/users/User2#org2.example.com/msp/keystore/priv_sk"
},
"peers": ["peer0.org2.example.com"],
"signedCert": {
"path": "/tmp/crypto/peerOrganizations/org2.example.com/users/User2#org2.example.com/msp/signcerts/User2#org2.example.com-cert.pem"
}
}
},
"peers": {
"peer0.org2.example.com": {
"tlsCACerts": {
"path": "/tmp/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"url": "grpcs://peer0.org2.example.com:9051"
}
}
}
docker-compose.yaml
docker-compose.yaml
As you are using Org1 and Org2, I assume that you have used the existing tutorial scripts to create your network. However, if you want to have two separate networks running side by side, you will have to start a new network under a new folder - this is just so that you can make changes without getting confused.
Running two networks means that you have to start again with your scripts and change everything, e.g. conflicting names, port numbers, etc. If you want Org2 to belong to org2-network, then you should ensure that no other peers are defined along the way e.g. docker files, config files, etc. Your Org2 will need a separate Orderer running on a different port.
Try to get one network running first, then try building the second one while the first is running. If you get no errors, then you will eventually have two separate networks running. After that, you should be able to point to them in your config file as long as you are using the correct connection profile settings for each network.
hello I am building electron app for the mac platform and having trouble notarize the app using Forge and getting this error:
Packaging ApplicationWARNING: Code sign failed; please retry manually. Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache /var/folders/q7//T/electron-packager/darwin-arm64/Integration-darwin-arm64/Integration.app
/var/folders/q7/*/T/electron-packager/darwin-arm64/Integration-darwin-arm64/Integration.app: rejected
source=Unnotarized Developer ID
my forge config
"forge": {
"packagerConfig": {
"appBundleId": "com.anyfolder.integrations",
"osxSign": {
"identity": "Developer ID Application: ****** (****)",
"hardened-runtime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"signature-flags": "library"
},
"osxNotarize": {
"appleId": "myid#id.com",
"appleIdPassword": "my-password"
},
"protocols": [
{
"name": "Any Folder",
"schemes": [
"electron-****"
]
}
],
"icon": "public/images/icon.ico"
},
"publishers": [
{
"name": "#electron-forge/publisher-s3",
"config": {
"bucket": "*******",
"folder": "integrations",
"public": true
}
},
{
"name": "#electron-forge/publisher-github",
"config": {
"repository": {
"owner": "****",
"name": "****"
},
"draft": false,
"prerelease": false
}
}
],
"makers": [
{
"name": "#electron-forge/maker-squirrel",
"config": {
"name": "integrations"
}
},
{
"name": "#electron-forge/maker-dmg",
"config": {
"icon": "public/images/icon.icns",
"format": "ULFO",
"name": "Name",
"overwrite": true,
"debug": true
}
}
],
"plugins": [
[
"#electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/render/imageEditor/index.html",
"js": "./src/render/imageEditor/index.tsx",
"name": "capture_window",
"preload": {
"js": "./src/render/imageEditor/preload.ts"
}
},
{
"name": "main_window",
"html": "./src/index.html",
"js": "./src/render/main/index.tsx",
"preload": {
"js": "./src/render/main/preload.ts"
}
},
{
"name": "integrations_menu",
"html": "./src/index.html",
"js": "./src/render/integrations/index.tsx",
"preload": {
"js": "./src/render/integrations/preload.ts"
}
}
]
}
}
]
]
}
I am new to WEBIDE, I am trying to consume northwind odata services, but so far I have been unsuccessful. Please see my code & help.
connection test on destination also was successful. but still I am getting error:
/V3/Northwind/Northwind.svc/$metadata", statusCode: 404, statusText:
"Not Found", headers: Array(0), body: "The resource you are looking
for has been removed,… its name changed, or is temporarily
unavailable."} responseText:"The resource you are looking for has been
removed, had its name changed, or is temporarily unavailable."
statusCode:404 statusText:"Not Found"
proto:Object
any suggestions, what I might be doing wrong?
neo-app.json:
{
"path": "/destinations/northwind",
"target": {
"type": "destination",
"name": "northwind"
},
"description": "Northwind OData Service"
}
manifest.json:
"sap.app": {
"id": "Mod3Act3",
"type": "application",
"i18n": "i18n/i18n.properties",
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"applicationVersion": {
"version": "1.0.0"
},
"dataSources": {
"northwind": {
"uri": "/V3/Northwind/Northwind.svc/",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
},
"sap.ui5": {
"rootView": {
"viewName": "Mod3Act3.view.Main",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {},
"sap.ushell": {},
"sap.collaboration": {},
"sap.ui.comp": {},
"sap.uxap": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"": {
"dataSource": "northwind"
}
},
"resources": {
"css": [{
"uri": "css/style.css"
}]
}
}
controller
var url = "/V3/Northwind/Northwind.svc";
var oModel1 = new sap.ui.model.odata.ODataModel(url, true);
sap.ui.getCore().setModel(oModel1, "categoryList");
issue was with manifest.json.
"dataSources": {
"northwind": {
"uri": "/destinations/northwind/V3/Northwind/Northwind.svc/",
"type": "OData",
"settings": {"odataVersion": "2.0" }
}
}
this worked
please try the example from the sapui5 walk through:
manifest.json
{
"_version": "1.8.0",
"sap.app": {
...
"ach": "CA-UI5-DOC",
"dataSources": {
"invoiceRemote": {
"uri": "https://services.odata.org/V2/Northwind/Northwind.svc/",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
},
"sap.ui": {
...
},
"sap.ui5": {
...
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "sap.ui.demo.walkthrough.i18n.i18n"
}
},
"invoice": {
"dataSource": "invoiceRemote"
}
}
}
}
controller
...
var oModel = this.getView().getModel("invoice");
...
please be aware of the accepting of the certificate due to the https connection and the same origin policy both mentioned in the linked walk through example.
I used automatical OData connection with SAP Web IDE. Unfortunately, Data don't connect and Layout Editor says that Data Set "not defined". I have tried to connect by coding, for example <Table items={/Stats}>, but it doesn't work either. When I use project template (Master-Detail or Worklist), there are no problems with connection and Data is automatically connecting, but when I want to make my project and make a connection, there are always some problems.
Component.js
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"Statusverwaltung/model/models"
], function(UIComponent, Device, models) {
"use strict";
return UIComponent.extend("Statusverwaltung.Component", {
metadata: {
manifest: "json"
},
config : {
"resourceBundle" : "i18n/i18n.properties",
"titleResource" : "SHELL_TITLE",
"serviceConfig" : {
name: "UI5STAT1_SRV",
serviceUrl: "/sap/opu/odata/kernc/UI5STAT1_SRV/"
}
},
/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* #public
* #override
*/
init: function() {
// call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
// set the device model
this.setModel(models.createDeviceModel(), "device");
}
});
});
Manifest.json
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "Statusverwaltung",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "1.0.0"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"sourceTemplate": {
"id": "servicecatalog.connectivityComponent",
"version": "0.0.0"
},
"dataSources": {
"UI5STAT1_SRV": {
"uri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "webapp/localService/UI5STAT1_SRV/metadata.xml"
}
}
}
},
"sap.ui": {
"_version": "1.1.0",
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone#2": "",
"tablet": "",
"tablet#2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": ["sap_hcb", "sap_bluecrystal"]
},
"sap.ui5": {
"_version": "1.1.0",
"rootView": {
"viewName": "Statusverwaltung.view.View",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
}
},
"resources": {
"css": [{
"uri": "css/style.css"
}]
},
"routing": {
"targets": {
"View": {
"viewType": "XML",
"transition": "slide",
"clearAggregation": true,
"viewName": "View",
"viewId": "View"
}
}
}
}
}
neo-app.json
{
"welcomeFile": "/webapp/index.html",
"routes": [
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
{
"path": "/test-resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/test-resources"
},
"description": "SAPUI5 Test Resources"
},
{
"path": "/sap/opu/odata",
"target": {
"type": "destination",
"name": "v01",
"entryPath": "/sap/opu/odata"
},
"description": "V01 description"
}
],
"sendWelcomeFileRedirect": true
}
.project.json
{
"projectType": [
"sap.watt.uitools.ide.fiori",
"sap.watt.uitools.ide.web",
"sap.watt.saptoolsets.fiori.project.ui5template.smartProject",
"sap.watt.saptoolsets.fiori.project.uiadaptation"
],
"build": {
"targetFolder": "dist",
"sourceFolder": "webapp"
},
"generation": [
{
"templateId": "ui5template.basicSAPUI5ApplicationProject",
"templateVersion": "1.32.0",
"dateTimeStamp": "Mon, 17 Oct 2016 08:28:52 GMT"
},
{
"templateId": "servicecatalog.connectivityComponent",
"templateVersion": "0.0.0",
"dateTimeStamp": "Mon, 17 Oct 2016 10:10:52 GMT"
},
{
"templateId": "uiadaptation.changespreviewjs",
"templateVersion": "0.0.0",
"dateTimeStamp": "Tue, 18 Oct 2016 08:08:06 GMT"
}
],
"translation": {
"translationDomain": "",
"supportedLanguages": "en,fr,de",
"defaultLanguage": "en",
"defaultI18NPropertyFile": "i18n.properties",
"resourceModelName": "i18n"
},
"basevalidator": {
"services": {
"xml": "fioriXmlAnalysis",
"js": "fioriJsValidator"
}
},
"codeCheckingTriggers": {
"notifyBeforePush": true,
"notifyBeforePushLevel": "Error",
"blockPush": false,
"blockPushLevel": "Error"
},
"mockpreview": {
"mockUri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"metadataFilePath": "webapp/localService/UI5STAT1_SRV/metadata.xml",
"loadJSONFiles": false,
"loadCustomRequests": false,
"mockRequestsFilePath": ""
}
}
It seems like you are never instantiating a model.
You can do that in the manifest.json
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
},
"": {
"dataSource":"UI5STAT1_SRV"
}
},
"" defines the default model so you can use Bindingpaths like {/Stats}.