How to create and set up a keystonerc file

asked 2014-02-09 08:18:12 -0600

Indeep_Minku-OPENSTACK gravatar image

Please help me with this problem.. Thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-02-09 09:22:20 -0600

updated 2014-02-09 09:35:44 -0600

keystonerc is a file that's used for exporting keystone credentials to environment variables so that you wouldn't have to pass it everytime when you use keystone. Create it wherever you wish to create it. Just create it on your home folder

$ vi ~/keystonerc

write the following content into the keystonerc file.

export ADMIN_TOKEN=(your_admin_token)
export OS_USERNAME=(your_admin_username)
export OS_TENANT_NAME=(your_admin_username)
export OS_PASSWORD=(your_admin_password)
export OS_AUTH_URL=http://(ip_address_of_keystone):5000/v2.0

and then just execute that file with

$ cd ~/
$ . ./keystonerc

Now when you do this, all these are stored in your environment variables (env). You can simply run commands without specifying any credentials. Try

keystone service-list

The drawback of this approach is, the exported environment variable will be visible only to that terminal where you ran keystonerc. To make it available across all the terminals, add those exports to .bashrc, if Ubuntu is your distro, else to .bash_profile.

If you are looking for a multi-region environment, you should visit this IBM link for more details.

Hope this was what you were expecting.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-02-09 08:18:12 -0600

Seen: 4,962 times

Last updated: Feb 09 '14