Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

Appendix A. Additional Utilities

A.1. The Domain Management Tool

Red Hat Gluster Storage Console authenticates users using Active Directory services. To add users to Red Hat Gluster Storage Console, use the internal administrator user to add the Active Directory service against which the users must be authenticated. You can add and remove directory service domains using the domain management tool, rhsc-manage-domains. This command is only accessible from the machine on which Red Hat Gluster Storage Console is installed, and must be run as the root user.

A.1.1. Syntax of the Domain Management Tool

The syntax is:
rhsc-manage-domains -action=ACTION [options]
For full information on usage, see the rhsc-manage-domains command's help output:
# rhsc-manage-domains --help

A.1.2. Adding Domains to a Configuration

In this example, the rhsc-manage-domains command is used to add the ActiveDirectory domain test.redhat.com to the Red Hat Gluster Storage Console configuration. The configuration is set to use the administrator user when querying the domain; the password is provided interactively.

Example A.1. rhsc-manage-domains Add Action

# rhsc-manage-domains -action=add -domain='test.redhat.com' -provider=ActiveDirectory -user='admin' -interactive
Enter password:

The domain test.redhat.com has been added to the engine as an authentication source but no users from that domain have been granted permissions within the oVirt Manager.
Users from this domain can be granted permissions from the Web administration interface or by editing the domain using -action=edit and specifying -addPermissions.
oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).
Manage Domains completed successfully

A.1.3. Editing a Domain in the Configuration

In this example, the rhsc-manage-domains command is used to edit the directory.test.redhat.com domain in the Red Hat Gluster Storage Console configuration. The configuration is updated to use the administrator user when querying this domain; the password is provided interactively.

Example A.2. rhsc-manage-domains Edit Action

# rhsc-manage-domains -action=edit -domain='test.redhat.com' -provider=ActiveDirectory -interactive
Enter password:

oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).
Manage Domains completed successfully

A.1.4. Deleting a Domain from the Configuration

In this example, the rhsc-manage-domains command is used to remove the directory.test.redhat.com domain from the Red Hat Gluster Storage Console configuration. Users defined in the removed domain will no longer be able to authenticate with the Red Hat Gluster Storage Console. The entries for the affected users will remain defined in the Red Hat Gluster Storage Console until they are explicitly removed.
The domain being removed in this example is the last one listed in the Red Hat Gluster Storage Console configuration. A warning is displayed highlighting this fact, and that only the administrator user from the internal domain will be able to log in until another domain is added.

Example A.3. rhsc-manage-domains Delete Action

# rhsc-manage-domains -action=delete -domain='test.redhat.com'
WARNING: Domain test.redhat.com is the last domain in the configuration. After deleting it you will have to either add another domain, or to use the internal administrator user in order to login.
Are you sure you like to delete domain test.redhat.com (yes/no) : 
yes
Successfully deleted domain test.redhat.com. Please remove all users and groups of this domain using the Administration portal or the API. oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).
Manage Domains completed successfully

A.1.5. Validating a Domain Configuration

In this example, the rhsc-manage-domains command is used to validate the Red Hat Gluster Storage Console configuration. The command attempts to log into each listed domain with the credentials provided in the configuration. The domain is reported as valid if the attempt is successful.

Example A.4. rhsc-manage-domains Validate Action

#  rhsc-manage-domains -action=validate
Domain test.redhat.com is valid.
The configured user for domain test.redhat.com is admin@TEST.REDHAT.COM
Manage Domains completed successfully

A.1.6. Listing the Domains in a Configuration

In this example, the rhsc-manage-domains command is used to list the domains defined in the Red Hat Gluster Storage Console configuration. For each configuration entry, the command displays the domain, the user name - in User Principle Name (UPN) format - and whether the domain is local or remote.

Example A.5. rhsc-manage-domains List Action

# rhsc-manage-domains -action=list
Domain: test.redhat.com
        User name: admin@TEST.REDHAT.COM
Manage Domains completed successfully