I am trying to push a simple app to ibm cloud from my local folder(cloned from github). But getting error every time I am trying.I tried every way possible by restarting my system couple of times.
edit 1:
if i am not mentioning path I am getting the below error
command does not look right.... I should start with
cf push appname
Ref:
https://console.bluemix.net/docs/cli/reference/ibmcloud/cf_index.html#cf_push
appname is required and is the name of the application that you see on ibm cloud dashboard.
if you want to pass the path use -p option. So command should be:
ibmcloud cf push appname -p C:\Dir1\Dir2\...
Related
I want to create an action for a trigger in IBM Cloud Functions, but instead of only adding the code in the console, I want the action to deploy from code on a github repository. How can I do this?
Thanks in advance.
I don't believe (or at least have not seen anywhere in the docs) you can just point the Cloud Functions to a GitHub repo. With that said you could do the following:
Make sure ibmcloud CLI is installed and you have the Cloud Functions plugin also installed ibmcloud plugin install cloud-functions
ibmcloud login - You need a valid session in the CLI or use an IBM Cloud API key or a Service ID key that has the right IAM access to deploy to a Cloud Function namespace in IBM Cloud ibmcloud login --apikey "YOUR_API_KEY".
ibmcloud target -r eu-gb - You need to target the right region where the Cloud Function will live.
ibmcloud target -g test-resource-group - Once logged in, you need to make sure you target the right resource group where the Cloud Function will be pushed too.
If you are lazy like me then you can roll all 3 of the above commands into 1 like so: ibmcloud login --apikey "YOUR_API_KEY" -r "eu-gb" -g "test-resource-group"
ibmcloud functions namespace target test-function-namespace - Finally, after logging in you need to use the cloud-functions plugin to target the right namespace where the Cloud Function will be pushed.
There are multiple ways to deploy the Cloud Function. For example, using the CLI to push the cloud function or using a manifest.yml file as a config.
Using IBM Cloud CLI
Creating a trigger assuming test-action is already created.
ibmcloud functions trigger create test-trigger --feed test-action
Using Manifest File
The example below is triggering the test-action Cloud Function every 15 minutes using a Cloud Function trigger.
manifest.yaml
project:
namespace: _
packages:
test-package:
actions:
test-action:
function: ./src/actions/action.js
runtime: nodejs:12
triggers:
test-trigger:
feed: /whisk.system/alarms/interval
inputs:
minutes: 15
rules:
rile-test-trigger:
trigger: test-trigger
action: test-action
To deploy this you essentially just:
ibmcloud functions deploy -m ./manifest.yaml
Both options can essentially be wired into a CD tool like Travis or Jenkins and can automatically deploy latest changes to the Cloud from GitHub.
I am configuring rundeck to issue api calls to the google cloud compute api
I have tried both basic and oath 2.0 for authentication
Has anyone gotten this to work
You have two options:
Configure the google cloud CLI tool for "rundeck" user, (home at /var/lib/rundeck) or:
Use local sudo rundeck plugin to call the command using the user profile which you have the google cloud CLI configured.
In the first option you can use command steps/script steps to call the Google Cloud CLI tool and in the second one using the Local Command Workflow Step and the Local Script Workflow Step.
I am trying to send logs out to an external logging platform using the following command:
cf cups activity-tracker -l https://HOST:PORT
I am assuming activity-tracker that is created by above command will send all activity or access logs automatically to an externally exposed API. But so far I am not seeing results popup in papertrail, I also tried others like splunk.
What am I doing wrong?
The process to syslog drain to papertrail is documented here. This will send application and Cloud Foundry related logs to papertrail.
ibmcloud cf cups my-logs -l syslog-tls://logsN.papertrailapp.com:XXXXX
ibmcloud cf bind-service <appname> my-logs
ibmcloud cf restart <appname>
The is no mechanism to stream the events in real-time from Activity Tracker to another endpoint. The closest solution would be downloading events and piping them to a 3rd party using a program. The Downloading Events documentation may help you to do so.
When pushing my application to bluemix with cf cli, it is showing "0 of 1 instances running, 1 starting"...and after sometime "FAILED start app timeout"
For the same account, in eclipse ibm bluemix server is not starting.
Thanks Ram,
We contacted the IBM customer support for the same problem and they suggested us to use a different buildpack.
This cf command prints the available buildpacks list for liberty runtime:
cf buildpacks | grep -i liberty
It returns 2 buildpack options
To specify the buildpack
cf push appName -b buildPackName
Hope this will help others.
Bluemix provides a CF command line for download to manage applications.
We want to use CF (or any other command line tools ) to manage Organization and Space users. This will allow us to programmatically sync the user list.
Specifically I am looking for
cf enroll-user
cf add-user
cf remove-user
cf unenroll-use
the cf command already lists the users for a given ORG and SPACE.
The simple answer is to read the docs. See "Creating and Managing Users with the cf CLI." It documents commands like create-user, set-org-role, and set-space-role.
For example: Use cf create-user USERNAME PASSWORD to create a new user. The problem is, when you try to do this in Bluemix, you get an error:
>cf create-user jdoe password
Creating user jdoe as bwoolf...
FAILED
Error creating user jdoe.
Server error, status code: 403, error code: access_denied, message: Invalid token does not contain resource id (scim)
You get a similar error when you try to run set-org-role or set-space-role:
FAILED
Server error, status code: 403: Access is denied. You do not have privileges to execute this command.
Why did you get this error? Like #RandalAnders explained, Bluemix currently blocks users from using these user administration commands in the CF CLI. For the time being, you'll need to perform these actions using the Bluemix Dashboard.
Currently, it is not possible within Bluemix to use the CF CLI for certain management commands, as they require administrative privileges. We are exploring expanding the scope of the commands used in the CLI and would be interested in hearing any other use cases you may have.
you can not create a user on bluemix using cf cli since it needs admin privileges. To add a user, you will need to use bluemix cli 'bluemix iam account-user-invite' to invite a user to your account with a org/space role assigned. There are other account/org/space/role management commands under 'bluemix iam'.
Download bluemix CLI here: http://clis.ng.bluemix.net