zoukankan      html  css  js  c++  java
  • 2-glance 部署

    1. mysql 创建数据库和用户

    create database glance;

    grant all privileges on glance.* to 'glance'@'localhost' identified by 'mhc.123';

    grant all privileges on glance.* to 'glance'@'%' identified by 'mhc.123';

    2. 

    # source env/admin.openrc

    # openstack user create --domain default --password-prompt glance

    # openstack role add --project service --user glance admin

    # openstack service create --name glance --description "OpenStack Image service" image

    # openstack endpoint create --region RegionOne image public http://v460:9292

    # openstack endpoint create --region RegionOne image internal http://v460:9292

    # openstack endpoint create --region RegionOne image admin http://v460:9292

    3. 安装

    # git checkout -b rocky remotes/origin/stable/rocky

    # pip install -r requirements.txt

    # python setup.py install

    # pip install python-glanceclient

    # mkdir -p /var/lib/glance/images

    # user add glance

    # chown -R glance:glance /var/lib/glance/images

    配置: https://github.com/mhcvs2/docker/tree/master/openstack/glance

    # glance-manage db_sync

    # yum install https://buildlogs.centos.org/centos/7/cloud/x86_64/openstack-liberty/centos-release-openstack-liberty-1-3.el7.noarch.rpm

    # yum install openstack-utils

    # cp -r etc /etc/glance

    openstack-config --set  /etc/glance/glance-api.conf database connection  mysql+pymysql://glance:glance@controller/glance
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken www_authenticate_uri http://controller:5000
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken auth_url http://controller:5000
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken memcached_servers  controller:11211
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken auth_type password
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken project_domain_name Default
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken user_domain_name Default
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken project_name service 
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken username glance
    openstack-config --set  /etc/glance/glance-api.conf keystone_authtoken password glance
    openstack-config --set  /etc/glance/glance-api.conf paste_deploy flavor keystone
    openstack-config --set  /etc/glance/glance-api.conf glance_store stores  file,http
    openstack-config --set  /etc/glance/glance-api.conf glance_store default_store file
    openstack-config --set  /etc/glance/glance-api.conf glance_store filesystem_store_datadir /var/lib/glance/images/

    openstack-config --set  /etc/glance/glance-registry.conf database connection mysql+pymysql://glance:glance@controller/glance
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken www_authenticate_uri http://controller:5000
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken auth_url http://controller:5000
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken memcached_servers controller:11211
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken auth_type password
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken project_domain_name Default
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken user_domain_name Default
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken project_name service
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken username glance
    openstack-config --set  /etc/glance/glance-registry.conf keystone_authtoken password glance
    openstack-config --set  /etc/glance/glance-registry.conf paste_deploy flavor keystone

    # glance-control registry start
    # glance-control registry status
    # glance-control api start
    # glance-control api status
    wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img

    # source ~/env/admin.openrc

    # openstack image create "cirros" --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public
    # openstack image list
  • 相关阅读:
    泛型
    HDU 4917 Permutation
    OC本学习笔记Foundation框架NSString与NSMutableString
    HDU 5095 Linearization of the kernel functions in SVM(模拟)
    大约Java有点感悟---开发商根本上感悟学习
    Codeforces 442B Andrey and Problem(贪婪)
    mysql数据库优化课程---15、mysql优化步骤(mysql中最常用最立竿见影的优化是什么)
    mysql数据库优化课程---14、常用的sql技巧
    mysql数据库优化课程---13、mysql基础操作(mysql如何复制表)
    mysql数据库优化课程---12、mysql嵌套和链接查询(查询user表中存在的所有班级的信息?)
  • 原文地址:https://www.cnblogs.com/mhc-fly/p/10085252.html
Copyright © 2011-2022 走看看