• 6.安装和配置OpenStack图片服务组件


    安装和配置图片服务组件

    这里是安装在控制器上

    安装和配置图片服务组件

    yum install –y openstack-glance python-glanceclient

    编辑/etc/glance/glance-api.conf

    mv /etc/glance/glance-api.conf /etc/glance/glance-api.conf_bak
    
    vim /etc/glance/glance-api.conf
    
    [database]
    connection = mysql://glance:toyo123@controller/glance
    
     
    [keystone_authtoken]
    auth_uri = http://controller:5000/v2.0
    identity_uri = http://controller:35357
    admin_tenant_name = service
    admin_user = glance
    admin_password = Abcd1234
    
    [paste_deploy]
    flavor = keystone
    
    [glance_store]
    default_store = file
    filesystem_store_datadir = /var/lib/glance/images/
    
     
    
    [DEFAULT]
    verbose = True
    notification_driver = noop

    编辑/etc/glance/glance-registry.conf

    mv /etc/glance/glance-registry.conf /etc/glance/glance-registry.conf_bak
    
    vim /etc/glance/glance-registry.conf
    
    [database]
    connection = mysql://glance:toyo123@controller/glance
    
    [keystone_authtoken]
    auth_uri = http://controller:5000/v2.0
    identity_uri = http://controller:35357
    admin_tenant_name = service
    admin_user = glance
    admin_password = Abcd1234
    
    [paste_deploy]
    flavor = keystone
    
    [DEFAULT]
    verbose = True
    notification_driver = noop

     

    填充图像服务数据库并启动图像服务配置为开机自启动

    su -s /bin/sh -c "glance-manage db_sync" glance
    systemctl enable openstack-glance-api.service openstack-glance-registry.service
    systemctl start openstack-glance-api.service openstack-glance-registry.service

    测试服务是否正常

    mkdir /tmp/images
    yum install -y wget
    wget -P /tmp/images http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
    source admin-openrc.sh
    glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img 
      --disk-format qcow2 --container-format bare --is-public True --progress
    glance image-list
    rm -r /tmp/images
  • 相关阅读:
    AutoFac实现AOP扩展
    Nginx缓存、本地responseCache响应式缓存、ResourceFilter缓存。
    缓存基于http协议的前端缓存
    读取excel表格内容,处理后写输出xt文件上
    缓存memoryCache和redis分布式缓存
    Java 线上诊断工具Arthas
    c语言把16进制文本转16进制数组
    vue中使用tinymce,以及插件 powerpaste 的使用
    Go Concurrency Patterns: Pipelines and cancellation 孙龙
    golang 详解协程——errgroup 孙龙
  • 原文地址:https://www.cnblogs.com/cainiaoit/p/6536240.html
Copyright © 2020-2023  润新知