snow chuai汇总、整理、撰写---2020/2/5
最后更新时间---2020/10/23
# 添加glance账户,并定义其隶属于service租户,密码为servicepassword [root@node1 ~(keystone)]# openstack user create --domain default --project service --password servicepassword glance +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | 1be75e85ec9445ab9ff7dd7ec2f02b71 | | domain_id | default | | enabled | True | | id | c7d9e5856499477586c5aab82c62e986 | | name | glance | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ |
[root@node1 ~(keystone)]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 19 Server version: 10.1.20-MariaDB MariaDB Server |
1) 安装Glance [root@node1 ~(keystone)]# yum --enablerepo=centos-openstack-queens,epel install openstack-glance -y |
1) 安装KVM并设置桥接 [root@node1 ~(keystone)]# yum install qemu-kvm libvirt virt-install bridge-utils -y [root@node1 ~(keystone)]# lsmod | grep kvm kvm_intel 188644 0 kvm 621480 1 kvm_intel irqbypass 13503 1 kvm [root@node1 ~(keystone)]# systemctl enable --now libvirtd |
[root@node1 ~(keystone)]# openstack image create "c77" \ --file /var/lib/libvirt/images/c7.img \ --disk-format qcow2 \ --container-format bare \ --public +------------------+------------------------------------------------------+ | Field | Value | +------------------+------------------------------------------------------+ | checksum | f702e0dc1111aca67e04a934afe33d56 | | container_format | bare | | created_at | 2020-02-05T14:03:44Z | | disk_format | qcow2 | | file | /v2/images/d2cf4454-09a0-43fa-83b4-aaa9df0f5919/file | | id | d2cf4454-09a0-43fa-83b4-aaa9df0f5919 | | min_disk | 0 | | min_ram | 0 | | name | c77 | | owner | 6f83afcc475b440bb9816ea20ba26c5f | | protected | False | | schema | /v2/schemas/image | | size | 1705508864 | | status | active | | tags | | | updated_at | 2020-02-05T14:03:57Z | | virtual_size | None | | visibility | public | +------------------+------------------------------------------------------+ |
1) 完成HandBook-ceph单元-第1阶段内容-----Glance节点作为Ceph客户端 # 本例子为:node5--admin节点/node6/node7/node8四台主机 |