setting up Ibm-cloud organization - ibm-cloud

setting up Ibm-cloud organization
I was trying to do "ibmcloud cf push" for the simple project that I found in github but it shows me "No org targeted"! I tried to just set the organization that I can find in my account in IBM-cloud> cloud foundry orgs which is my email address so I tried to use "cf target -o ORG" but it shows "Could not get org"!
API endpoint: https://cloud.ibm.com
Region: us-east
User: XXX#yahoo.com
Account: sonia's Account (XXXX)
Resource group: Default
CF API endpoint: https://api.us-east.bluemix.net (API version: 2.128.0)
Org:
Space:

I solved it!!!
first I unset my region and set it to the south-us
after that, I could use those commands for setting the organization and space
ibmcloud target -o Myorg

If you want to be able to push Cloud Foundry applications in a different region, you can add a space to your org in that region. That way you are then able to target your default org in different regions.
Within the cloud.ibm.com UI navigate to "Manage->Account" and then on the menu on the left select "Cloud Foundry Orgs". You will see a list of Cloud Foundry organizations. If you select an org in the next screen you can add a Cloud Foundry space to that org and choose the region where you want to create the space.
After you have done that you are able to target the CF org and CF space in the new region.

I usually use:
ibmcloud target --cf
For a friendly menu.

Make sure you login to the same region as your account. Use the login passcode from the console UI profile menu to login and choose the right location. When i did so my org was populated correctly in the CLI.

Related

Can I change my account's default region in IBM cloud

When I tried ibmcloud target --cf to deploy my app on my IBMcloud account .. I got No organisation found error...
I even tried to create a new organization but got failed.
https://imgur.com/HNnaRf2
After some debugging I got to know I have created my IBM cloud account in eu region(We have to select a location at the time of account creation) and I tried to deploy my app/creating the organization in us-south region that's why it was throwing error.
After that i changed my region in ibm console
by
ibmcloud api https://api.eu-gb.bluemix.net
and login again.
and app gets deployed successfully.
I searched on google but havent got anything about how to change your default user account region.
I go through the link but seems like it will change my api endpoint to a specific region not my account's default region.
Changing Bluemix Account Default region?
ibmcloud target -r REGION_NAME
ibmcloud target -r us-south

ibmcloud create action through cli

ibmcloud create action through cli is not working . Getting an exception
Unable to authenticate with Cloud Functions: Unable to obtain wsk
authentication key for Org 'xxxxx' and Space 'xxxx': Target Org
'xxxxm' and Space 'xxxx' do not have an auth key; if Space 'dev' was
recently created, try again in a couple minutes.
But I have logged in successfully using ibmcloud login command
Issue is resolved now. The account I created at IBM was lite account where the initial credentials were created with different location. But my ibmcloud login was picking another location api. Even if i could give the api enpoint manually, org and space was not matching. Since it was a Lite account, there was no permission to add another org and space. AFter sending mail to IBM, I could add my credit card details and I could create a new space and creating action worked now

Couldn't target the organization using CF CLI

I am learning to use Bluemix and was trying to access my application using the Cloud Foundry command-line interface. But after logging in using my Bluemix ID at the CF CLI, I am not able to target the organization. On the Bluemix dashboard in my browser, the organization is visible. Is there a bug?
After running cf login some organisation should have been set as the target.
Run cf target to get the current target information
Run cf orgs to get the available organisations
Run cf spaces to get the available spaces in the organisation
Run cf target -o organisation_name -s space_name to target the correct organisation and space
Each organisation can have multiple spaces. Each space can have multiple applications. With the correct organisation and space set as targets the currently deployed applications can be listed with cf apps.
Organisations can span regions but may not. Check if the organisation is present in other regions by changing the API endpoint.
US South https://api.ng.bluemix.net
UK https://api.eu-gb.bluemix.net
Sydney https://api.au-syd.bluemix.net
change the region API endpoint to the region that appears in your account

How do I remove or rename a Bluemix organization after a name change?

I try to remove my organization executing this command:
1) Change the original organization name from miguel#thingtrack.com to Miguel correctly from the Dashboard.
1) Login in my bluemix account correctly from CLI like this:
bluemix login
2) Try to remove my unique organization called Miguel:
bluemix iam org-delete Miguel
The error result is:
Suprimiendo la organizaciĆ³n Miguel como miguel#thingtrack.com...
FAILED
Error response from server. StatusCode: 500; description: multiple documents found containing guid 7f1f9939-b0bc-4e61-85b9-d7e3744b6c77: [{"_id":"org.Miguel","_rev":"3-9b1bba6c8f8c618ba424c728e55ee247","customer":"ibm","deployment":"yp","name":"Miguel","type":"org","value":{"ibm:yp:eu-gb":{"guid":"6b7219e6-5992-4d43-ac52-083bf0ce8d50","owner":true},"ibm:yp:us-south":{"guid":"7f1f9939-b0bc-4e61-85b9-d7e3744b6c77"}},"created_at":"2016-05-23T13:49:36.660Z","updated_at":"2016-09-09T17:50:02.846Z","migrated":true},{"_id":"org.miguel#thingtrack.com","_rev":"2-cf26e55555fe9730b4a9a9a4525f4bf3","customer":"ibm","deployment":"yp","name":"miguel#thingtrack.com","type":"org","value":{"ibm:yp:us-south":{"guid":"7f1f9939-b0bc-4e61-85b9-d7e3744b6c77","owner":true}},"created_at":"2015-08-28T09:49:49.221Z","updated_at":"2016-08-13T18:06:03.994Z","migrated":true}]
Also I noticed that if I try to rename again the organization to other name I obtain the same error.
So in my opinion if you change the organization name one time, you will never remove it or change the name never more.
Is it a bug of bluemix??
Regards
Bluemix does not allow users to delete organizations. Per documentation you have to contact Bluemix Support team to delete the organization on your behalf.
From Bluemix documentation:
You must contact Bluemix Support to delete an organization. When you
request for the support team to delete an organization, all the
spaces, applications, and services within the organization are
deleted.
You can find more details here: https://console.ng.bluemix.net/docs/admin/orgs_spaces.html#orginfo
Actually, Miguel Salinas is correct. You can now rename or delete orgs from the Bluemix CLI using commands such as:
bluemix iam org-rename <old_org_name> <new_org_name>
bluemix iam org-delete <org_name>
Here's the reference to the bluemix commands:
https://www.ng.bluemix.net/docs/cli/reference/bluemix_cli/index.html
The documentation snippet mentioned above by Alex is outdated and need to be revised. I'll send them this feedback.
I know I am late to the party, but I hope this helps the future users.
You can rename org using the bluemix cli as #marcel Ribas stated above.
bluemix iam org-rename old_org_name new_org_name
bluemix iam org-delete org_name
Alternatively you can go into your bluemix account and you have and option to change org name under the manange organizations tab. Just click on edit button next to org name and make the changes
Note- You need to have manager level access to the org you are trying to rename. You can check this on your bluemix account under the manage organizations tab

How to find my own organization id?

In many of the APIs for Bluemix, I need to know my "organization id" which I believe to be different from the "name" of my organization. When I login to the Bluemix dashboard, I am unable to find my organization id value. What is the recommended set of steps to determine my own organization id value?
You can use the cf command line tool for this:
$ cf org <org-name> --guid
You can also see it in the Bluemix dashboard browser URL, like for example (I modified mine below for security reasons):
https://console.ng.bluemix.net/?direct=classic/#/resources/cloudOEPaneId=resources&orgGuid=xxxxxxxx-8afc-4b2f-afb5-dc7d77dd0baa&spaceGuid=xxxxxxx-2c29-4d8a-9e97-06aed