Skip to main content

Basic Operations in Openstack

openstack linux
Hugo
Author
Hugo
DevOps Engineer in London
Table of Contents

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
ParameterCLI ArgumentEnvironment Variable
API endpoint--os-auth-url http://controller:5000export OS_AUTH_URL=http://controller:5000
API Version--os-identity-api-version 3export OS_IDENTITY_API_VERSION=3
User--os-username adminexport OS_USERNAME=admin
Password--os-password adminexport OS_PASSWORD=admin
Project--os-project-name adminexport OS_PROJECT_NAME=admin
Domain--os-domain-name Defaultexport 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