[关闭]
@zhouyy 2018-03-16T06:59:10.000000Z 字数 2585 阅读 622

openstack培训内容

会议纪要


outline

component

1. 虚拟机创建流程

由多个项目共同完成 not only nova

horizon/CLI-〉keystone[token][request vadidation and permission]
->nova-api
nova-api->Glance (para:name,flavor,image,keys,no of VMs)
nova-api->metadata of Image(最小内存空间etc)
nova-api->nova database [validate 认证authentication:合法 ; 授权authorlization合法后,对资源的权限 ]
queue->Nova-compute nova-api ->Horizon(不需要响应和等待)
Nova-taski->nova-scheduler资源调度器:把虚拟机分发到最合适的物理机
Nava-task (rpc.cast 注:单点通信 与rpc相比 无需响应) ->nova-compute[launch instance to select host]
nova-compute(rpc.call)->queue->nova-conductor->nova database 不能直接访问数据库 数据库的最大连接数 [拿到instance information]
nova-compute-〉Neutron
nova-compute->Cinder
nova-compute(command)->hypervisor[创建虚拟机]
hypervisor->Glance (最耗时 get Image by ID)

First Boot of VM:
instance-specific data: metadata service
implementation: VM->nova-api

copy-on-write 只有在写的时候复制 (理解:图层 覆盖 快:局部复制,只复制需要修改的部分)加快启动速度

命令行
nova boot -image -name -hint key(host),value(VM id) 手动操作,过滤条件 内存复用、资源均衡

2. 密码注入

创建一个server,通过adminPass specify a password

Possible solution
-File injection
-guestFS 不是所有镜像都支持直接修改模式

Cloud-init(more general)

   -User-data (功能强大,执行脚本)需要写文件,有大小限制
   -Metadata(nova的Matadat service)

Horizon -'can_set_password':True

Verify校验 policy'api_name:action'

Qemu guest agent

Qemu guest agent
http://wiki.libvirt.org/page/Qemu_guest_agent

guestagent.pyc
修改guest.py

3.镜像制作

Disk Formats:
iso(与其它不同,不能直接boot)
raw(大,通用、其它都是对其压缩和封装)
ari\ami\aki->vmdk(by ec2)
qemu-img convert(qcow2 raw vhd vdi vmdk)

solu1: download and modify

4.Heat模板&演示

overview: 业务编排;调用各种API generate running cloud app
- Uses template mechanism:HOT
- Allow creation of resource types:Instances,networks,floating IP
- Some advanced services:HA, auto-scaling
- Integrated well with Puppet(集中配置管理系统,使用自有的puppet描述语言,可管理配置文件、用户、cron任务、软件包、系统服务等) and Chef

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注