Kevin Nguyen
Kevin Nguyen

Reputation: 105

how to get openstack openrc file through command line

I deployed OpenStack Ubuntu and like to script launch instances. One thing is that I can not find a way to get openrc file other manually log on dashboard and download it.

Is there any way to download this openrc file through command line or api?

Thanks.

Upvotes: 3

Views: 2073

Answers (2)

Albert Vonpupp
Albert Vonpupp

Reputation: 4867

I guess you are refering to the stackrc, if so, you need to connect via ssh to the director (controller) of your openstack and download it manually. Then you need to source stackrc and you are good to go to use the openstack command on the terminal.

Upvotes: 0

Fredrik T
Fredrik T

Reputation: 21

Late reply but I just struggled with this one myself. Note, it's no really the best way since these env seems to change between releases. So abit of a quickfix.

Basic idea is to build the file yourself using the "openstack user show" command.

openstack user show <username> | grep id 
| id         | 38107017a45747569461cf7c6ef2cc1f |
| project_id | 808c10c6156c44179f9643c2ac8b0aa3 |

Username, password and endpoint's I'm guessing you have a good idea on.

Upvotes: 1

Related Questions