设为首页 收藏本站
查看: 746|回复: 0

[经验分享] 使用SmartOS做为Openstack 基础操作系统(简译)

[复制链接]

尚未签到

发表于 2015-4-12 09:55:37 | 显示全部楼层 |阅读模式
本文为我的译文,原文参考:http://blog.hendrikvolkmer.de/2012/09/07/why-smartos-as-an-openstack-base-os/

When SmartOS was first announced about a year ago, I downloaded the ISO, booted it in VMware, logged in and then… nothing. What is this? It's small, it is not supposed to be installed on disk. What do I do with it? What is so special about it? It is just an Illumos distro - a small and strange one. I did not get it.

当一年前SmartOS发布的,我下载并在vmware中试用了它,可惜没有什么可以打动我的地方。
I am now porting OpenStack to SmartOS and I think it is a perfect fit for that purpose. It is truly a Cloud OS. What does that mean? Let's go through the features of SmartOS that make it a perfect fit to be run as a Cloud Base OS.

然而现在我转向支持它做为Openstack的基础操作系统,因为它是一个真正的云操作系统,让我们看一下它有哪些特性:

ZFS

The ZFS storage model is based on Copy-On-Write which means that snapshots and clones are essentially free. This is fantastic for a Cloud compute node. Say you have a small set of defined VM base images and then spin up 20 VMs of Ubuntu 12.04. The Ubuntu image takes up about 500 MB of disk space. How much do 20 VMs of Ubuntu 12.04 use? Simple math right? Well, with ZFS these 20 VMs take 500 and a few MB. Total. Of course as the instances diverge this ratio gets lower but it is still impressive and very useful. Also spinning up Instances means you only have to clone the base image in ZFS which will take a few seconds the most, compared to copying it on a traditional file system. Somewhere in the internets I can hear someone shouting: "My SAN does the same thing since the 80ies, smartass". Sure, but it costs quite a bit more and you also get a lot of complexity.

The local storage needs for the base operating system get even better when you use Zones (see below).

DTrace

While the open source SmartOS (to my knowledge) lacks the cool graphical reporting possibilities based on DTrace it still contains the real DTrace capabilities. Everyone who had to hunt a memory leak or strange process behaviour in production will know what it is worth to have a good tracing capability at hand. DTrace will enable you to find performance and other problems that in a stable and very low overhead way.

Zones

Zones let you securely partition your OS without the overhead of another hypervisor (OS level virtualisation). In SmartOS a zone is always the outer "hull" of virtualisation. Either inside is just another SmartOS, or a qemu process with KVM that runs any other operating system. In combination with ZFS and Crossbow this is fantastic basis for virtual environments.

As Zones have minimal overhead they provide an ideal foundation for PaaS services like databases, load balancers etc. In an OpenStack context this would allow us to just use a special VM image that translates to a zone for a DB. We could thus avoid the whole RedDwarf/RedDwarf lite-back-and-forth-disaster.

KVM

Using KVM allows us to run (almost) any x86 operating system using the Intel VT-D, VT-X extensions with very little overhead. SmartOS has integrated KVM in a way that is easy to use. Actually I'm pretty glad that they did not use libvirt as abstraction layer but created their own.

SMF - Service Management Facility

With SMF you can define services, dependencies and let SMF manage them for you. I do believe that dependencies are important and a good way to model things for services (in contrast to what the Upstart designers think). Managing services in this model has been proving to work well e.g. with the Erlang Supervision Tree. With SMF you can define dependencies and restart behaviours of services as well as alerts when stuff goes awry.

Crossbow

Illumos comes with its own network virtualisation layer (basically a virtual switch) called Crossbow. In SmartOS the network virtualisation is integrated in the vmadm tool and works seamlessly. The virtualisation is based on VLANs: Each tenant will get their own VLAN. Crossbow was way ahead of the competition when it was released. With OpenVSwitch the Linux world has caught up and maybe even surpassed Crossbow. It will be interesting to see how the development of these technologies will continue.

SmartOS VM tools

imgadm, vmadm are tools to manage images and VMs. They are clearly written in a way to be used as part of a cloud platform. No config files with strange syntax or super long command line options. Instead these tools work with short and clear command line commands that take JSON files as options to do the real work. This is fantastic when used as an API from a cloud orchestration layer like OpenStack. And it feels a lot more like an API than libvirt (I save the libvirt "API" rant for another time... XML snippets as arguments. Really?).

A true cloud OS

The - at first look strange - model of usb key or PXE booting the base OS is a fantastic fit for cloud environments and makes a lot of problems go away. OS updates? Just reboot. How to install the OS? Don't. Just use a Ramdisk. Why waste space on disk when you can have a Ramdisk of 250 MB with the whole OS in it?

As you can see I'm pretty excited about SmartOS in this context. In combination with OpenStack this might be the best open source cloud orchestration stack that you can get.

参考资料:
Openstack 开发小组完成了Openstack 对SmartOS的移植.
https://blueprints.launchpad.net/nova/+spec/smartos-support

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-56201-1-1.html 上篇帖子: OpenStack Swift 下篇帖子: OpenStack 学习笔记 (三)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表