Creating object accounts

An account is used to group or isolate object resources. Each object user is part of an account. Object users are mapped to an account and can access only the objects that reside within the project. Each user needs to be defined with a set of user rights and privileges to perform a specific set of operations on the resources of the account to which it belongs. Users can be assigned to multiple accounts with different roles on each account.

You must create at least one account before adding users. An account contains a list of containers in the object storage. You can also define quota at the account level. An object account represents a storage location for a project rather than a specific user.

Note:
To work with this function in the IBM Spectrum Scale™ GUI, log on to the GUI and select Object > Accounts.
  1. To view the details for an existing account, issue the swift stat command:
    swift stat --os-auth-url http://tully-ces-ip.adcons.spectrum:35357/v3 \
                    --os-project-name admin \
                    --os-project-domain-name Default \
                    --os-username admin \
                    --os-user-domain-name Default \
                    --os-password Passw0rd \
                    --auth-version 3
    or
    source openrc 
    swift stat

    The system displays output similar to the following:

    Account: AUTH_bea5a0c632e54eaf85e9150a16c443cet
    Note: To avoid specifying the option to the swift command, you can use the ~/openrc file from the protocol node. The swift command looks like:
    source ~/openrc
    swift stat
  2. To create a new account, do the following steps:
    1. Use the openstack project create command to create a project.

      For example, create the project 'salesproject' in the Default domain using the command:

      # openstack project create salesproject --domain Default

      The system displays output similar to the following:

      +-------------+----------------------------------+
      | Field       | Value                            |
      +-------------+----------------------------------+
      | description |                                  |
      | domain_id   | default                          |
      | enabled     | True                             |
      | id          | ec4a0bff137b4c1fb67c6fe8fbb6a37b |
      | name        | salesproject                     |
      +-------------+----------------------------------+
    2. Use the openstack role add command to associate roles to the users who need access to the project:
       # openstack role add --user admin --project salesproject admin

      The system displays output similar to the following:

      +-------------+----------------------------------+
      | Field       | Value                            |
      +-------------+----------------------------------+
      | description |                                  |
      | domain_id   | default                          |
      | enabled     | True                             |
      | id          | ec4a0bff137b4c1fb67c6fe8fbb6a37b |
      | name        | salesproject                     |
      +-------------+----------------------------------+
  3. To see the new account details, issue the swift stat command with the new project value:
    # swift stat --os-auth-url http://tully-ces-ip.adcons.spectrum:35357/v3 \
                    --os-project-name salesproject \
                    --os-project-domain-name Default \
                    --os-username admin \
                    --os-user-domain-name Default \
                    --os-password Passw0rd \
                    --auth-version 3

    The system displays output similar to the following:

    Account: AUTH_ec4a0bff137b4c1fb67c6fe8fbb6a37b