openstack H版單機部署

apt-get install python-mysqldb mysql-serverhtml

mysql_secure_installationpython

# apt-get install python-software-properties
# add-apt-repository cloud-archive:havanamysql

# apt-get update && apt-get dist-upgradesql

# apt-get install rabbitmq-server數據庫

# apt-get install keystone python-keystone python-keystoneclientcurl

# mysql -u root -p
mysql> CREATE DATABASE keystone;
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
mysql> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';ide

修改Keystone的配置文件/etc/keystone/keystone.conf,使其指向咱們剛剛建立的數據庫。修改[sql]部分以下:
[sql]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://keystone:keystone@localhost/keystone
接下來建立keystone須要的表格。
# keystone-manage db_sync
生成admin的token。
# openssl rand -hex 10
仍是編輯/etc/keystone/keystone.conf,把上面生成的token替換下面的ADMIN_TOKEN
[DEFAULT]
# A "shared secret" between keystone and other openstack services
admin_token = ADMIN_TOKENurl

# service keystone restartspa

# export OS_SERVICE_TOKEN=ADMIN_TOKEN
# export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0.net

# keystone tenant-create --name=admin --description="Admin Tenant"
# keystone tenant-create --name=service --description="Service Tenant"

建立管理用戶。用戶密碼ADMIN_PASS須要本身指定。
# keystone user-create --name=admin --pass=ADMIN_PASS --email=admin@example.com
建立角色
# keystone role-create --name=admin
爲用戶添加角色和租戶屬性。
# keystone user-role-add --user=admin --tenant=admin --role=admin

# keystone service-create --name=keystone --type=identity --description="Keystone Identity Service"

# keystone endpoint-create --service-id=the_service_id_above --publicurl=http://127.0.0.1:5000/v2.0 \
--internalurl=http://127.0.0.1:5000/v2.0 --adminurl=http://127.0.0.1:35357/v2.0

 

 

refer to follow blog:

http://bbs.chinaunix.net/thread-4111488-1-1.html

相關文章
相關標籤/搜索