adminrc#
Via Horizon#
Via Command Line#
While there isn’t a direct way to generate the adminrc file from the command line, you can use the OpenStack CLI to fetch the necessary authentication parameters and convert them into environment variables.
Check Available Options:
openstack -h
Parameter | CLI Argument | Environment Variable |
---|---|---|
API endpoint | --os-auth-url http://controller:5000 | export OS_AUTH_URL=http://controller:5000 |
API Version | --os-identity-api-version 3 | export OS_IDENTITY_API_VERSION=3 |
User | --os-username admin | export OS_USERNAME=admin |
Password | --os-password admin | export OS_PASSWORD=admin |
Project | --os-project-name admin | export OS_PROJECT_NAME=admin |
Domain | --os-domain-name Default | export OS_DOMAIN_NAME=Default |
Use the converted environment variables to create the adminrc file. eg:
vim adminrc
export OS_AUTH_URL=http://controller:5000
export OS_IDENTITY_API_VERSION=3
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_PROJECT_NAME=admin
export OS_DOMAIN_NAME=Default
Once the adminrc file is ready, we can
source adminrc