Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Adding a User to Your Bluemix Space

DZone's Guide to

Adding a User to Your Bluemix Space

Need to add another user to your IBM Cloud Functions actions but are befuddled by Bluemix's user management pages? Here's how to set up your users.

· Cloud Zone
Free Resource

Are you joining the containers revolution? Start leveraging container management using Platform9's ultimate guide to Kubernetes deployment.

I'm at the stage where I need to give another developer access to my IBM Cloud Functions actions. I'm not really an infrastructure person, and I found the user management pages on the Bluemix console incomprehensible. So I used the command line. This is how I did it so that I don't have to work it all out again.

Add the User to Your Organization

These are the steps to add the user to your organization:

  1. Register the new user with Bluemix. In my case, this is test@19ft.com.
  2. Invite the user into your organization with bx iam org-user-add {username} {organization name}. I'm adding this user to my 19FT organization, so for me, this is:
$ bx iam org-user-add test@19ft.com 19FT


The user can now access the organization but can't access a space. If they log in, you get a very scary message about there being no spaces in this organization. This is wrong. What it actually means is that this user doesn't have access to any of the spaces that exist.

Add the User to a Space

Spaces are per region, so you first need to ensure that your bx is working in the right region:

  1. Run bx target to check which region you're currently logged into.
  2. If you're in the wrong region, change using bx target -r {region name} --cf. You can find the correct region name to use with bx regions, which list them for you. For today, I need:
$ bx target eu-gb --cf


Now that I'm in the right region, I add the user using bx iam space-role-set {username} {organization name} {role name}. To find the list of available role names, use bx iam space-role-set -h. In my case, I want the SpaceDeveloper role, as my new user needs to edit and update OpenWhisk actions:

$ bx iam space-role-set test@19ft.com 19FT dev SpaceDeveloper


Repeat for all the spaces that this user needs access to. If they also need access to spaces in a different region, swap regions with bx target and repeat again.

Usefully, the user also gets access to the other services, such as any Cloudant databases that are attached to that space, with no additional work required.

Using Containers? Read our Kubernetes Comparison eBook to learn the positives and negatives of Kubernetes, Mesos, Docker Swarm and EC2 Container Services.

Topics:
cloud ,ibm bluemix ,user management ,cli ,tutorial

Published at DZone with permission of Rob Allen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}