How to invoke chaincode that was deployed with fabric composer in Bluemix? - ibm-cloud

I'm using Fabric v0.6 on Bluemix and composer-ui on my local machine. I was able to make my model and logic files and deployed them to my Blockchain network on Bluemix. Now I want to invoke the chaincode I deployed with composer from an app that is already running on Bluemix (node.js), not from the composer-ui. How would I approach this?
I have seen a sample app here: https://github.com/hyperledger/composer-sample-applications/tree/master/packages/getting-started
But it requires this configuration file: https://github.com/hyperledger/composer-sample-applications/blob/master/packages/getting-started/config/default.json
And that configuration file specifies the connectionProfile, which I guess is the connection profile I created on composer-ui to connect to my Blockchain service on Bluemix.
Do I need to have Fabric Composer running in order to invoke the chaincode? Or is there anyway to invoke my chaincode completely independent from the composer runtime?

Couple of options:
Use the composer-rest-server and write your front-end application against a domain specific REST API
Pass the connection profile information into the Composer JS composer-client API using an environment variable. See: https://github.com/hyperledger/composer/issues/602

Related

Cannot deploy Kubeflow on GCP: tells me to enable APIs that are already enabled

I am trying to install Kubeflow on Google Cloud Platform (GCP) and Kubernetes Engine (GKE), following the GCP deployment guide.
I created a GCP project of which I am the owner, I enabled billing, set up OAuth credentials and enabled the following APIs:
Compute Engine API
Kubernetes Engine API
Identity and Access Management (IAM) API
Deployment Manager API
Cloud Resource Manager API
Cloud Filestore API
AI Platform Training & Prediction API
However, when I want to deploy Kubeflow using the UI, I get the following error:
So I doublechecked and those APIs are already enabled:
The log messages at the bottom of the screen are:
2020-03-0614:14:04.629: Getting enabled services for project <projectname>..
2020-03-0614:14:16.909: Could not configure communication with GCP, exiting
The Could not configure communication with GCP, exiting is triggered when _enableGcpServices() fails.
The line Getting enabled services for project ... is printed but not the line Proceeding with project number: ..., so the error must be triggered somewhere in the block of code between those lines.
The call to Gapi.cloudresourcemanager.getProjectNumber(project) has its own try/catch with a slightly different error message and title (only talks about the cloud resource manager API, not the IAM API), so I assume it is the call to Gapi.getSignedInEmail() that fails??
I'd suggest having a look at the service management API, IAM service credentials API and cloud identity aware proxy API possibly. I've only used the CLI install tool previously and not run into these problems, but you might require these services for the IAP deployment?
I faced the same issue and was able to solve by correcting the project id.
Make sure that the project id on the UI form is specified correctly as it is on the GCP project - and that it does not have any leading or trailing spaces if you copy pasted from the GCP project details like I did.
I had the same issue. I was using in trial. Seems they allow a limited project to use billing account at same time. So I shut down unused ones . Went to Billing-->my projects. Disabled unused with 3 dots. Then tried to enable the billing account for current project. It worked.

IBM Cloud API Connect Secure Gateway

Recently, I started seeing an issue when trying to setup secure gateway within API Connect on IBM Cloud, I previously had it working but looks like they changed this wizard interface and its broken since then
here is what I did to recreate the issue:
Setup new APIC instance on IBM Cloud
API connect Manager UI > Admin > Secure Gateways > Add (name & save)
once created, in Secure Gateway Clients section, click on +Set Up
I see no ID or Token generated
no matter what type of client I choose (DataPower, Docker or Installer)
Anyone facing the same issue?
Empty ID and Token when trying to setup Secure Gateway Client
turned out that creating SecureGateway from within the APIC is deprecated feature anyway.
you will need to create standalone SecureGateway resource on Bluemix and call it from your API assembly.
here is the instructions
https://www.ibm.com/support/knowledgecenter/en/SSFS6T/com.ibm.apic.apionprem.doc/task_api_secure_gateway.html

Node-Red on Bluemix - how to access the Node server files?

I created a Node-Red flow on Bluemix, did some development and it was working ok for a few weeks. Suddenly the server won't start and logs "[Error: No cloudant service found]". The cloudant db credentials in VCAP look ok to me. How can I look at other files which are used by the Node server to setup and run? I don't see any way to access them in Bluemix or via cf.
Node-RED looks for a cloudant instance with the name <your-app-name>.cloudantNoSQLDB as that is what the boilerplate/quick-start deploy processes uses when deploying your instance.
One explanation for it not finding the bound cloundant instance is if you have renamed your app.
The specific code deployed is available: https://github.com/node-red/node-red-bluemix-starter
The expected name of the cloudant instance is generated here: https://github.com/node-red/node-red-bluemix-starter/blob/25f216a61fba182c4f8d2594124e2e4bbbebc3a6/bluemix-settings.js#L80

Connection error with cloudant db dedicated service on CIO Bluemix

I have created an app on CIO bluemix platform under my org. Then I added cloudant DB dedicated service and did a bind of the service with the app. The hello world Node JS starter works for the app. However, when I try to connect to the cloudant db by extending the starter app downloaded as the starter kit and cloud foundry cli, then it give 'connect ECONNREFUSED ' error. I have used the proper credentials. I also tried to launch the db using the web console that comes by clicking on the cloudant service icon, but it times out. Can you suggest what could be the issue? Thanks.
You need to take the hostname in your cloduant credentials file and add to your PC's host file:
windows sample:
9.45.69.22 23199ddc-775f-4ca5-91aa-XXXXXXXXXXXXXX-bluemix.cloudant.com # DEV MOOC

Mobile first Custom Login Module adapter deployment failed Bluemix mfp Container

Hi I am trying to deploy the Custom Login application give in
Github
to Bluemix I deployed the .wlapp to the container. But I could not deploy the AuthAdapter provided. It is failing to get deployed.
Keeping that aside I tried to deploy the starter application provided in the
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/ibm-containers/sample-app/
It is giving Error shown is as below
The request is coming to my localhost mobilefirst server
What should I do to solve this problem and get the apps deployed on bluemix mfp container
How to deploy custom auth adapters which is not getting deployed to Bluemix
You did not mention if you are using the pre-configured evaluation container, or your own container.
Pre-configured: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/ibm-containers/evaluate/
Your own container: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/ibm-containers/run/
You can't open a question and say "deployment fails". It's not going to help anyone solve your problem. mention the error you're getting during the deployment attempt.
An "auth adapter" implies it is using some security test(s). If your server on Bluemix (see "your own container") was not configured correctly with said security test(s) in its authenticationConfig.xml file, this could fail an adapter deployment.
The screen shot in your question clearly shows a CORS issue. Chrome does not allow CORS (attempting to get data for different domains).
Make sure that your application points to the correct server - not your local host one, since you want to use your Bluemix server, right? So in its worklight.plist file or wlclient.properties file, make sure the wlHost property is pointing to the correct server.