Openstack: openstack创建项目

openstack创建项目

基于admin身份进行操作

root@controller120:~/liaozhengjie/images-test# cat /etc/profile.d/keystone_manage.sh
export OS_USERNAME=admin
export OS_PASSWORD=xxxxxx
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://controller120:5000/v3
export OS_IDENTITY_API_VERSION=3

创建test项目

root@controller120:~/liaozhengjie/images-test# openstack project create --domain default --description "learn to ues Openstack" test
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | learn to ues Openstack           |
| domain_id   | default                          |
| enabled     | True                             |
| id          | 59fed8ad62ac4dd68c1cb873afde8cb8 |
| is_domain   | False                            |
| name        | test                             |
| options     | {}                               |
| parent_id   | default                          |
| tags        | []                               |
+-------------+----------------------------------+

创建liaozhengjie用户

root@controller120:~/liaozhengjie/images-test# openstack user create --domain default --password-prompt liaozhengjie
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 0e0b58e781834c5692bd1d7386ba1e9f |
| name                | liaozhengjie                     |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+

创建角色(可以根据需求进行创建,这里不进行创建,直接使用已经存在的member角色,需要创建时则可以使用以下命令)

openstack role create xxx

添加member角色到test项目和liaozhengjie用户上

root@controller120:~/liaozhengjie/images-test# openstack role add --project test --user liaozhengjie member

你可能感兴趣的:(Openstack,openstack,运维,linux)