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 you add 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.

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, run 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 this output:

    Account: AUTH_bea5a0c632e54eaf85e9150a16c443cet
    Containers: 0
    Objects: 0
    Bytes: 0
    X-Put-Timestamp: 1489046102.20607
    X-Timestamp: 1489046102.20607
    X-Trans-Id: tx73c9382f200d4bd88d866-0058c10a55
    Content-Type: text/plain; charset=utf-8
    Note: To avoid specifying the option to the swift command, you can use the ~/openrc file from the protocol node:
    source ~/openrc
    swift stat
  2. To create a new account, perform the following steps:
    1. Use the openstack project create command to create a project.

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

      # openstack project create salesproject --domain Default
      

      The system displays output similar to this output:

      +-------------+----------------------------------+
      | Field       | Value                            |
      +-------------+----------------------------------+
      | description | Description is displayed here.   |
      | domain_id   | default                          |
      | enabled     | True                             |
      | id          | ec4a0bff137b4c1fb67c6fe8fbb6a37b |
      | is_domain   | False                            |
      | name        | salesproject                     |
      | parent_id   | default                          |
      +-------------+----------------------------------+
    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 command does not display any output.

  3. To see the new account details, run 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 this output:

    Account: AUTH_ec4a0bff137b4c1fb67c6fe8fbb6a37b
    Containers: 0
    Objects: 0
    Bytes: 0
    X-Put-Timestamp: 1489046460.28283
    X-Timestamp: 1489046460.28283
    X-Trans-Id: txe9d13765f0c14fe4ad3ce-0058c10bbc
    Content-Type: text/plain; charset=utf-8