Get the App
SLTechnology News&Howtos  ›  Development  › 

How to configure, run and test OpenStack after installing keystone under CentOS6.2

Shulou Source: shulou.com Published: 2022-06-03 05:29:19 10月13日 Update

How to run and test keystone configuration after installing OpenStack under CentOS6.2. For this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

CentOS6.2 configure, run, test keystone after installing OpenStack

This article is largely the same as the installation of keystone that I wrote earlier. If you have read the previous article, you can skim it here.

1. Configuration

You can also refer to http://docs.openstack.org/trunk/openstack-compute/install/content/keystone-conf-file.html for configuration.

1.1 copy the default profile:

[ugyn@cc swift-1.4.8] $cd.. / keystone-2012.1 & & sudo cp-R etc/ etc/keystone

[ugyn@cc keystone-2012.1] $sudo chown-R ugyn:ugyn / etc/keystone

[ugyn@cc keystone-2012.1] $mv / etc/keystone/logging.conf.sample / etc/keystone/logging.conf

1.2 modify / etc/keystone/keystone.conf:

Generate random token:

[ugyn@cc keystone-2012.1] $openssl rand-hex 10

7d97448231c0a2bac8a3

[ugyn@cc keystone-2012.1] $vim / etc/keystone/keystone.conf

Replace the value of admin_token with the generated token

Modify: # log_config =. / etc/logging.conf.sample

Are:

Log_config = / etc/keystone/logging.conf

Modify:

[sql]

Connection = sqlite:///keystone.db

Idle_timeout = 200

Are:

[sql]

Connection = mysql://keystone:keystone@localhost/keystone

Idle_timeout = 200

Min_pool_size = 5

Max_pool_size = 10

Pool_timeout = 200

Modify:

[catalog]

Driver = keystone.catalog.backends.templated.TemplatedCatalog

Template_file =. / etc/default_catalog.templates

Are:

[catalog]

Driver = keystone.catalog.backends.sql.Catalog

Modify:

[token]

Driver = keystone.token.backends.kvs.Tokens

Are:

[token]

Driver = keystone.token.backends.sql.Token

Modify:

[ec2]

Driver = keystone.contrib.ec2.backends.kvs.Ec2

Are:

[ec2]

Driver = keystone.contrib.ec2.backends.sql.Ec2

It is easy to run client commands to create and run the following files:

Export SERVICE_TOKEN=7d97448231c0a2bac8a3

Export SERVICE_ENDPOINT= http://127.0.0.1:35357/v2.0

Export OS_USERNAME=nova

Export OS_PASSWORD=service123

Export OS_TENANT_NAME=service

Export OS_AUTH_URL= http://127.0.0.1:5000/v2.0

Note: the user data here is created in the script below 2.3.When SERVICE_TOKEN and SERVICE_ENDPOINT are set up, you can run any keystone command, so be careful.

Run:

[ugyn@cc keystone-2012.1] $source ~ / .openstackrc

two。 Running

2.1 when running for the first time, you need to create a data table:

[ugyn@cc keystone-2012.1] $keystone-manage db_sync

2.2 run keystone:

Please open a new terminal or run in the background

[ugyn@cc Desktop] $keystone-all

2.3 create initial tenants, users, roles, services, endpoints:

Modify the tools/sample_data.sh by adding the following at the beginning of the file:

[ugyn@cc keystone-2012.1] $vim tools/sample_data.sh

# set administrative password:

ADMIN_PASSWORD=admin123

# set the service password:

SERVICE_PASSWORD=service123

# to create an endpoint, add:

ENABLE_ENDPOINTS=ture

# to create a user,service related to swif:

ENABLE_SWIFT=ture

# to create a user,service related to quantum, add:

# ENABLE_QUANTUM=ture

Run the creation script:

[ugyn@cc keystone-2012.1] $sudo tools/sample_data.sh

3. test

3.1 View the user you just created

[ugyn@cc keystone-2012.1] $keystone user-list

3.2View the tenant you just created

[ugyn@cc keystone-2012.1] $keystone tenant-list

For more operations, please run the following command and test it yourself

[ugyn@cc keystone-2012.1] $keystone help

This is the answer to the question about how to configure, run and test keystone after installing OpenStack under CentOS6.2. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Tags: Run configure test commands files more articles questions content passwords data users scripts help generation solutions large easy same simple Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info Docker Huawei Xiaomi