How to create and set up a keystonerc file
Please help me with this problem.. Thanks in advance
First time here? Check out the FAQ!
Please help me with this problem.. Thanks in advance
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.
Asked: 2014-02-09 08:18:12 -0600
Seen: 4,962 times
Last updated: Feb 09 '14