OpenStack Dalmatian : Add Openstack Users2024/10/04 |
Add User accounts in keystone who can use Openstack System. |
|
[1] | Any names are OK you like for user-name or project-name. |
# create 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 | 84e315c8d65e4b3cb33aaf69c9eed0c3 | | is_domain | False | | name | hiroshima | | options | {} | | parent_id | default | | tags | [] | +-------------+----------------------------------+ # create a user root@dlp ~(keystone)# openstack user create --domain default --project hiroshima --password userpassword serverworld +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | 84e315c8d65e4b3cb33aaf69c9eed0c3 | | domain_id | default | | email | None | | enabled | True | | id | d97d1aef1b234c469ad3757bcd51dfa4 | | name | serverworld | | description | None | | password_expires_at | None | +---------------------+----------------------------------+root@dlp ~(keystone)# openstack role list +----------------------------------+---------+ | ID | Name | +----------------------------------+---------+ | 0c0e56e84a0741ffa6db6a21c8fefadd | member | | 777f0e020c0c45a5adc2ad3ab77f723f | service | | 85e48e4b84984b909e5b2b5e6edba766 | admin | | 8ac6e4f5c0d749d3beb6cdadcad1e321 | manager | | bc5f4baae4fa4e7080c66e8ba1da1660 | 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. |
ubuntu@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)\$ '
ubuntu@dlp:~$
chmod 600 ~/keystonerc ubuntu@dlp:~$ source ~/keystonerc ubuntu@dlp ~(keystone)$ echo "source ~/keystonerc " >> ~/.bash_profile
# verify possible to run openstack command [cent@dlp ~(keystone)]$ openstack project list +----------------------------------+-----------+ | ID | Name | +----------------------------------+-----------+ | 84e315c8d65e4b3cb33aaf69c9eed0c3 | hiroshima | +----------------------------------+-----------+ |
Sponsored Link |