作者:手机用户2602915671 | 来源:互联网 | 2024-11-21 11:46
本文档介绍了如何使用OpenStack命令行工具在Keystone身份服务中创建和管理域、项目、用户及角色。随着Keystone命令向OpenStack命令集的迁移,了解这些新的命令格式对于系统管理员来说至关重要。
随着Keystone命令逐步整合到OpenStack命令集中,掌握这些更新后的命令对于有效管理和配置OpenStack环境变得尤为重要。
创建服务项目:
$ openstack project create --domain default --description "Service Project" service
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Service Project |
| domain_id | default |
| enabled | True |
| id | 24ac7f19cd944f4cba1d77469b2a73ed |
| is_domain | False |
| name | service |
| parent_id | default |
+-------------+----------------------------------+
创建演示项目:
$ openstack project create --domain default --description "Demo Project" demo
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Demo Project |
| domain_id | default |
| enabled | True |
| id | 231ad6e7ebba47d6a1e57e1cc07ae446 |
| is_domain | False |
| name | demo |
| parent_id | default |
+-------------+----------------------------------+
$ openstack user create --domain default --password-prompt demo
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | aeda23aa78f44e859900e22c24817832|
| name | demo |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
$ openstack role create user
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 997ce8d05fc143ac97d83fdfb5998552 |
| name | user |
+-----------+----------------------------------+
$ openstack role add --project demo --user demo user
以上步骤展示了如何通过OpenStack命令行工具有效地管理Keystone中的资源,确保了系统的安全性和灵活性。