OpenStack Dalmatian : Add Users2024/10/09 |
Add User accounts in keystone who can use Openstack System. |
|
[1] | Any names are OK you like for user-name or project-name. |
# add a project [root@dlp ~(keystone)]# openstack project create --domain default --description "Hiroshima Project" hiroshima +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Hiroshima Project | | domain_id | default | | enabled | True | | id | 756e2b4937c44d3991028e294f92d89a | | is_domain | False | | name | hiroshima | | options | {} | | parent_id | default | | tags | [] | +-------------+----------------------------------+ # add a user [root@dlp ~(keystone)]# openstack user create --domain default --project hiroshima --password userpassword serverworld +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | 756e2b4937c44d3991028e294f92d89a | | domain_id | default | | email | None | | enabled | True | | id | 19c7530debb54eb0bfe6dc47aae3df32 | | name | serverworld | | description | None | | password_expires_at | None | +---------------------+----------------------------------+[root@dlp ~(keystone)]# openstack role list +----------------------------------+---------+ | ID | Name | +----------------------------------+---------+ | 4cbffcb8460a472e9f248e8536b6b254 | admin | | 81e7f75a8ff44892b9a7c66b1bfce8ed | service | | 842b4194a02f4ae2849a88d20c9240b1 | member | | c29749ff7b354c4eb175e6d22a99bc14 | manager | | ec7c81493ae4438fb9ef1b6f333302c7 | reader | +----------------------------------+---------+ # add a user to the [member] role [root@dlp ~(keystone)]# openstack role add --project hiroshima --user serverworld member
|
[2] | Set environment variables for Openstack to an OS user that makes it be able to use Openstack system. |
[cent@dlp ~]$
vi ~/keystonerc
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=hiroshima export OS_USERNAME=serverworld export OS_PASSWORD=userpassword export OS_AUTH_URL=https://dlp.srv.world:5000 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2 export PS1='[\u@\h \W(keystone)]\$ '
[cent@dlp ~]$
chmod 600 ~/keystonerc [cent@dlp ~]$ source ~/keystonerc [cent@dlp ~(keystone)]$ echo "source ~/keystonerc " >> ~/.bash_profile
# verify possible to run openstack command [cent@dlp ~(keystone)]$ openstack project list +----------------------------------+-----------+ | ID | Name | +----------------------------------+-----------+ | 756e2b4937c44d3991028e294f92d89a | hiroshima | +----------------------------------+-----------+ |
Sponsored Link |
|