sqliteOpenStack:安装Glance

>安装Glance

  1. 安装
    # apt-get install glance python-glanceclient
    删除sqlite文件
    rm -f /var/lib/glance/glance.sqlite
  2. 创建db
    create database glance;
    grant all privileges on glance.* to ‘glance’@’%’ identified by
    ‘openstack’;
    grant all privileges on glance.* to ‘glance’@’localhost’ identified by
    ‘openstack’;

  3. 创建user, role
    # keystone user-create –name=glance –pass=openstack
    # keystone user-role-add –user=glance –tenant=service –role=admin

  4. 配置:
    (1)配置/etc/glance/glance-api.conf, /etc/glance/glance-registry.conf:
    [DEFAULT]
    sql_connection = mysql://glance:openstack@controller/glance

[keystone_authtoken]
auth_uri = http://controller:35357
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = openstack

[paste_deploy]
flavor = keystone

(2)配置/etc/glance/glance-api-paste.ini,
/etc/glance/glance-registry-paste.ini:
[filter:authtoken]
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
auth_host=controller
admin_user=glance
admin_tenant_name=service
admin_password=openstack

  1. 初始表:
    # glance-manage db_sync

  2. 注册service, endpoint:
    # keystone service-create \
    –name=glance \
    –type=image \
    –description=”Glance Image Service”

# keystone endpoint-create \
–service-id=590090bbac114f1a95e0a55602940473 \
–publicurl=http://controller:9292 \
–internalurl=http://controller:9292 \
–adminurl=http://controller:9292

  1. 重启glance服务.
    # service glance-registry restart
    # service glance-api restart
网站地图xml地图