ibm-cloud

How to retrieve the cloud foundry oauth token from a devops deploy stage for setting up auto scaling?

孤人 提交于 2020-01-06 06:08:51
问题 I'm trying to get the cloud foundry oauth-token from a devops pipeline deploy stage: ... cf push $CF_APP ... accessToken=$(cf oauth-token | grep bearer | sed -e s/bearer/Bearer/g) echo accessToken=$accessToken ... # use token in Auto Scaling API call ... curl $createPolicyUrl -X 'PUT' -H 'Content-Type:application/json' \ -H 'Accept:application/json' \ -H "Authorization:$accessToken" \ --data-binary @${policyJson} \ -s -o response.txt -w '%{http_code}\n' The output from the echo command is:

IBM Watson Assistant: How can Skill gain access to session_id using V2 of WA API's

房东的猫 提交于 2020-01-06 05:39:07
问题 The V2 APIs for IBM Watson Assistant ask that you get a session_id and then use it in subsequent calls to the Assistant in order for global context values to be preserved across calls. Looking at the Preview link webpage we associated with our Assistant, it appears the request contains both a value object containing all the expected parts of the payload for a Skill, and a session_id. I would like to access this session_id in my skill to pass it along to cloud functions that may want to

Can't get Guzzle working in my Laravel app on Bluemix

岁酱吖の 提交于 2020-01-06 04:00:08
问题 I have a working PHP app running in Bluemix that I want to extend to call a RESTful service (Insights for Twitter). Since PHP has no built-in way to call the service, I looked around and decided to use Guzzle. I downloaded Guzzle 6.0.2 from its Git and imported the zip into my httdocs/vendor path and renamed the imported path GuzzleHttp I changed my buildpack to get PHP 5.5 and updated composer.json to the Autoload.psr4 property with: "GuzzleHttp\\": "htdocs/vendor/" I redeployed my app and

Changing Bluemix Account Default region?

眉间皱痕 提交于 2020-01-05 10:53:28
问题 I created my Bluemix account with "US SOUTH" as region. Later I realized that I belong to the UK-Europe region, and I can change to it once I'm logged in. However, every time when I come back and log on again I need to switch again to UK region, because I cannot make this region the default one for my account. The login process takes me to my account with "US South" selected by default. Can this be fixed? 回答1: You can use the following URL to login directly to Bluemix UK region: https:/

Changing Bluemix Account Default region?

北城余情 提交于 2020-01-05 10:53:07
问题 I created my Bluemix account with "US SOUTH" as region. Later I realized that I belong to the UK-Europe region, and I can change to it once I'm logged in. However, every time when I come back and log on again I need to switch again to UK region, because I cannot make this region the default one for my account. The login process takes me to my account with "US South" selected by default. Can this be fixed? 回答1: You can use the following URL to login directly to Bluemix UK region: https:/

How to specify npm version when deploying nodejs apps to bluemix?

自作多情 提交于 2020-01-05 08:33:26
问题 I created a node.js application with runtime dependencies of scoped packages in my package.json : "dependencies": { "@shawnzhu/mybot" : "latest", ... }, "engines": { "npm": ">2.0.0", "node": "0.10.38" }, I also have a custom .npmrc that points scope @shawnzhu to my private npm registry. Currently it works when deploying to heroku, where it upgrades npm to v2.7.x. However, a cf push to bluemix fails with the console output showing: registry "@shawnzhu/mybot" not found. After reviewing the

IBM Bluemix disconnecting the MqttAndroidClient after sometime

不想你离开。 提交于 2020-01-05 03:38:51
问题 I am working on CC2650 sensortag and Bluemix(using IOT starter boilerplate) as a cloud solution. The cc2650 android app uses MqttAndroidClient to connect to MQTT server provided by bluemix. The problem I am facing after sometime (around 7 mins) it get timedout. Following exception is visible on the android studio console d:2f7tpk:ti-sensortag2:B0B448C07886: Timed out as no activity, keepAlive=240,000 lastOutboundActivity=1,463,309,545,312 lastInboundActivity=1,463,309,275,609 time=1,463,309

Mask and filter are not working when using the SoftLayer API

久未见 提交于 2020-01-04 13:30:02
问题 When I add billingItemFlag to my mask and filter it is missing in the results. I am using the SoftLayer-go api from the SoftLayer GitHub account. Is my filter or mask wrong? Please consider the following code: const mask string = "id;hostname;domain;billingItemFlag;billingItem" var filters = filter.Build( filter.Path("billingItemFlag").NotNull(), filter.Path("billingItem").NotNull(), ) accountService := services.GetAccountService(softlayerSession) hardware, err := accountService.Filter

Mask and filter are not working when using the SoftLayer API

五迷三道 提交于 2020-01-04 13:26:55
问题 When I add billingItemFlag to my mask and filter it is missing in the results. I am using the SoftLayer-go api from the SoftLayer GitHub account. Is my filter or mask wrong? Please consider the following code: const mask string = "id;hostname;domain;billingItemFlag;billingItem" var filters = filter.Build( filter.Path("billingItemFlag").NotNull(), filter.Path("billingItem").NotNull(), ) accountService := services.GetAccountService(softlayerSession) hardware, err := accountService.Filter

Parse server migration to IBM bluemix

旧城冷巷雨未停 提交于 2020-01-04 07:33:06
问题 I am trying to run parse server with nodejs in ibm bluemix but it is throwing an error in parse server PromiseRouter file. PromiseRouter.js:48 throw _iteratorError; ^ ReferenceError: Symbol is not defined How can i get this resolved My App .js var express = require('express'); var ParseServer = require('parse-server').ParseServer; var app = express(); var port = process.env.PORT || 1337; // Specify the connection string for your mongodb database // and the location to your Parse cloud code