One手动玩转
<preface p2 by Ruiy,我就在开头简单奇葩两句!>
老周被查,涉及到政治问题,我先就不聊了,但Ruiy叹那,都查到七*务了,土党唱哪一出!
能基本玩转OpenNebula都认为它很奇葩!比它小岁吧的openStack就比较单纯(dev Language aspect,人家功能可是一个 “牛”字,概之,OpenStack的设计初衷和市场定位PublicCloud),one适合在vDCs中生存,虚机的allInfo 都设计到接口,因此在one中可一般可看到虚机的详细创建调度,操作日志,见GUI.相对在openstack中关于虚机的很多信息几乎不能从接口API中来get!但可以从log中挖,哎,也只能委屈你Dev工程师帅锅,其实在大型projects中无API的二次开发一般是无法开展的,要是你开展下去了,那Ruiy只能说 放弃了Dev底线,追求实现require functations;
One很简单,是真的太简单了,至少从arch-er角度,话又说回来了,能玩转则简单,玩不转...!
libvirtd 的URL;
messagebus 的ENDPOINT URL?
实际玩了,才能知道是否能装,简单玩转了,你后续还需要一股作气玩转你该玩转的,你想玩转的,不然就泄气了,啥求泄气了可都不好玩,至少没弹性了;
<preface,building your cloudVDC together with Ruiy,hypervisor use kvm,xen,esx5>
<一,openNebula述>
openNebula is the open-source industry standard for data center virtualization,offering a simple but feature-rich and flexible solution to build and manage enterprise clouds and virtualized data centers.openNebula is designed to be simple;
simple to install,update and operate by the admins,and simple to use by end users,build and manage enterprise cloud and virtualized data centers;
introductory guide gives an overview of openNebula and summarizes its main benefits for the different stakeholders involved in a cloud computing infrastructure;
being focused on simplicity,we integrate with existing technologies whenever possible;
OpenNebula works with Ceph,GlusterFS,Open vSwitch LDAP;
KEY features;
interface provided
1,cloud interface for cloud consumers,like the OCCI and EC2 query and ebs interfaces,and a simple sun-stone cloud user that can be used as a self-service portal;
2,administrator interfaces for cloud advanced users and operators,like a unix-like command line interface and th powerful sunstone GUI
3,extensible low-level API for cloud integrator in ruby,java and XMLRPC API
4,a marketplace for appliance builders with a catalog of virtual appliance ready to run in OpenNebula environments;
OpenNebula offer to cloud consumers?
powerful,scalable and secure multi-tenant cloud platform for fast delivery and elasticity of virtual resources.
Image catalogs:OpenNebula allows to store disk images in catalog(termed datastores)
Network catalogs:virtual networks can be also be organised in network catalog,and provide means to interconnect virtual machines;
VM Template catelog:the template catalog system allows to register virtual machine definitions in the system,to be instantiated later as virtual machine instances;
Virtual Resource control and monitoring:once a template is instantiated to a virtual machine,there are a number of operations that can be performed to control lifecycle of the virtual machine instances,such as migration(live and cloud),stop,resume,cancle,poweroff,ETC;
Multi-tier cloud application control and monitoring:openNebula allows to define,execute and manage multi-tiered elastic applications,or services composed of interconnected virtual machines with deployment dependencies between them and auto-scaling rules;
NetWork catalog(private dev net,public net,HPC infiniBand,private production)
Images catalog()
Template catelog(web server front-end,database component,load balancer)
OpenNebula offer to cloud operators
Users and Groups:OpenNebula features advanced multi-tenancy with powerful users and groups management,fine-grained ACLS for resource allocation,and resource quota management to track and limit computing,storage and networking utilization
Virtualization:various hypervisors are supported in the virtualization manager,with the ability to control the complete lifecycle of Virtual Machines and multiple hypervisors in the same cloud infrastructure
hosts:the host manager provides complete functionality for the management of the physical hosts in the cloud;
Monitoring:
OpenNebula offer to cloud builder?
OpenNebula offer to cloud integrators?
Understanding OpenNebula!
Infrastructure Perspective?
Organizational Perspective
Quickstart:OpenNebula on CentOS 6 and kvm
Frontend and Nodes:
Frontend server will execute the OpenNebula services,and the Nodes will be used to execute virtual machines;
Nodes will be used to execute virtual machines.
Packages layout:
openNebula-server:OpenNebula daemons
OpenNebula:OpenNebula CLI commands
opennebula-java:OpenNebula java API
opennebula-node-kvm: Installs dependencies required by OpenNebula in the nodes
opennebula-gate:Send information from Virtual Machines to OpenNebula
opennebula-flow:Manage OpenNebula Services
opennebula-content:Package for OpenNebula Guests
opennebula-common and opennebula-ruby opennebula-occi which is RESTful service to manage the cloud
opennebula-sunstone;
OpenNebula components repo
http://downloads.opennebula.org/repo/CentOS/6/stable/x86_64/
<ONE实战,Install frontEnd>
1,SELINUX /etc/sysconfig/selinux
2,epel repo
3,OpenNebula repository
cat << EOT > /etc/yum.repos.d/opennebula.repo
[opennebula]
name=opennebula
baseurl=http://downloads.opennebula.org/repo/CentOS/6/stable/x86_64
enabled=1
gpgcheck=0
EOT
yum clean all && yum makecache;
4,install required packages
5,configure and start the services
two main processes that must be started,the main OpenNebula daemon:oned and the graphical user interface:sunstone
sunstone listen only in the loopback interface by default for security reasons,to change it edit /etc/one/sunstone-server.conf and change:host 127.0.0.1 to host:0.0.0.0
service opennebula/opennebula-sunstone start
6,configure NFS
warning:ship this section if you are using a single server for both the frontend and worker node roles
export /var/lib/one/ from the frontend to the worker nodes,to do so add the following to the /etc/exports file in the frontend
/var/lib/one/ * (rw,sync,no_subtree_check,root_squash)
7,configure ssh public Key
OpenNebula will need to SSH passwordlessly from any node (including the frontend) to any other node
Add the following sinppet to ~/.ssh/config as oneadmin so it doesn't prompt to add the keys to the known_hosts file:
su - oneadmin
cat << EOT > ~/.ssh/config
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOT
$ hmod 600 ~/.ssh/config
<installation OpenNebula Node>
add OpenNebula repository
cat << EOT >/etc/yum.repos.d/opennebula.repo
[opennebula]
name = opennebula
baseurl = http://downloads.opennbula.org/repo/Centos/6/stable/x86_64
enabled=1
gpgcheck=0
EOT
切换到su -l oneadmin
在oneadmin用户主目录下修改 config 配置实用mysql存储 one的配置信息;
8,configure the Network
Warning:Backup all the files that are modified in this section before making changes to them;
eth0 connected to bridge
configure NFS
Warning:skip this section if you are using a single server for both the frontend and worker node roles
mount the datastores export,add the following to your /etc/fstab
OpenNebulaFrontendIP.:/var/lib/one /var/lib/one nfs soft,intr,rsize=8192,wsize=8192,noauto
Warning:
<basic usage,>
Waning:All the operations in this section can be done using sunstone instead of the command line,point your browser to:http://frontend:9869
default password for oneadmin user be found in ~/.one/one_auth which is randomly generated on every installtion
to interact with OpenNebula,you have to do it from the oneadmin account in the frontend.we will assume all the following commands are performed from that account.to login as oneadmin execute su - oneadmin
1,adding a host
to start running VMs,you should first register a worker node for OpenNebula
issure this commannd for one of your nodes
adding virtual resources
once it's working you need to create a network ,an image and a virtual machine template
to create networks,we need to create first a network template file mynetwork.one
oneimage create
oneimage create --name "Centos-6.5_x86_64" --path "http://appliances.c12g.com/Centos-6.5/centos6.5.qcow2.gz" --driver qcow2 --datastore default;
will need to wait unitl the image is ready to be used.monitor its state by running oneimage list
in order to dynamically add ssh to virtual machines we must add our ssh key to the user template,by editing the user template
<注,tips by Ruiy>
one CLI操作总结
<一,添加物理机节点,跑opennebula-node-kvm>
1,在one cloud Platform CLI 添加物理机
onehost create "被添加物理机,即computer Nodes 的ip,是运行one cloud 的opennebula-node-kvm components" -i kvm -v kvm -n dummy;
调试instructor,
onehost list
日志 /var/log/one/oned.log
<二,添加虚拟资源>
创造虚拟网络
1,编辑网络模板文件
Ruiy.one文件,信息内容如下:
NAME = "private"
TYPE = FIXED
BRIDGE = bro
LEASES = [ IP= ]
LEASES = [ IP= ]
使用onevnet + 上面创建的网络模板文件创建虚拟网络
onevnet create Ruiy.one
2,创建镜像
oneimage create --name "CentOS-6.5_x86_64" --path "http://appliances.c12g.com/CentOS-6.5/centos6.5.qcow2.gz" --driver qcow2 --datastore qcow2 --datastore default
3,创建虚机模板(按跑服务 or 资源配置性能......)
onetemplate create --name "Centos-6.5" --cpu 1 -vcpu 1 --memory 512 --arch x86_64 --disk "Centos-6.5_x86_64" --nic "private" --vnc --ssh;
<注,>
当image state 为running才能使用,此处因为我们使用的镜像资源是网络的(支持本地iso/img镜像资源),需要先下载下来,查看命令为oneimage list;
4,dynamiclaay add ssh keys to virtual machines >>we must add our ssh key to the user template,by editing the user template
su -l oneadmin && cat ~/.ssh/id_dsa.pub
EDITOR=vi oneuser update oneadmin
添加SSH_PUBLIC_KEY="此处的内容是刚刚cat ~/.ssh/id_dsa.pub的内容信息,使用cat ~/.ssh/id_dsa.pub的当前用户必须是oneadmin"
<三,运行虚机>
在云计算中实例化一个虚机模板就相当于运行虚机
1,onetemplate instantiate "Centos-6.5" --name "by Ruiy VMs"
此处的第三个参数是在你用onetemplate 命令创建模板的时候所取 的名字,你可以使用onetemplate list查看下以存在的模板
execute onevm list and watch the virtual machine going from PENDING to PROLOG to RUNNING,
if the vm fails,check the resource in the log /var/log/one/<VM_ID>/vm.log
onehost list;
One手动玩转的更多相关文章
- openstack手动玩转
<一,preface Important Project Network> openstack or all most cloud env Network desgine is so m ...
- 教你从头到尾利用DQN自动玩flappy bird(全程命令提示,GPU+CPU版)【转】
转自:http://blog.csdn.net/v_JULY_v/article/details/52810219?locationNum=3&fps=1 目录(?)[-] 教你从头到尾利用D ...
- Codeforces Round #177 (Div. 1) 题解【ABCD】
Codeforces Round #177 (Div. 1) A. Polo the Penguin and Strings 题意 让你构造一个长度为n的串,且里面恰好包含k个不同字符,让你构造的字符 ...
- Codeforces Round #182 (Div. 1)题解【ABCD】
Codeforces Round #182 (Div. 1)题解 A题:Yaroslav and Sequence1 题意: 给你\(2*n+1\)个元素,你每次可以进行无数种操作,每次操作必须选择其 ...
- C#又能出来装个B了。一步一步微信跳一跳自动外挂
PS:语言只是载体.思维逻辑才是王道 前天看见了个python的脚本.于是装python.配置环境变量.装pip.折腾了一上午,最终装逼失败. 于是进入博客园,顶部有篇文章吸引了我 .NET开发一个微 ...
- 用C#实现微信“跳一跳”小游戏的自动跳跃助手
一.前言: 前段时间微信更新了新版本后,带来的一款H5小游戏“跳一跳”在各朋友圈里又火了起来,类似以前的“打飞机”游戏,这游戏玩法简单,但加上了积分排名功能后,却成了“装逼”的地方,于是很多人花钱花时 ...
- 【资料总结】| Deep Reinforcement Learning 深度强化学习
在机器学习中,我们经常会分类为有监督学习和无监督学习,但是尝尝会忽略一个重要的分支,强化学习.有监督学习和无监督学习非常好去区分,学习的目标,有无标签等都是区分标准.如果说监督学习的目标是预测,那么强 ...
- Python 实现auto linlink 连连看
先上知乎上大神所写: 你看过/写过哪些有意思的代码? 然后别急着看blog,玩一把游戏再说! 看知乎评论,有人说他用了一个下午时间就写出来了. wo kao!!! 我断断续续写了一周的下午才搞定,然后 ...
- CCC2018游记
day (-1) 晚上睡觉没盖被子 day 0 2018年2月13日 下午放学回来感到一阵头痛,一量体温结果发烧了,感觉很蓝瘦,居然在CCC前一天生病. 本来注册了账号想打practise的,结果又 ...
随机推荐
- Java组合与继承生成的类中构造函数的执行顺序
[程序实例] import java.util.*; class Meal{ Meal() { System.out.println("Meal Constructor"); } ...
- jquery 滚动条 scroll 和 animate出现的问题总结
这两天刚刚学习了jquery就想把平时做看到的一些相关效果用新的知识写写看.知识平时看着都懂,实际操作中问题才会层出不穷. <!DOCTYPE html> <html> < ...
- 解决html5新标签【placeholder】低版本浏览器下不兼容问题
placeholder属性是HTML5 中为input添加的.在input上提供一个占位符,文字形式展示输入字段预期值的提示信息(hint),该字段会在输入为空时显示. 实例:1 <input ...
- 只要关闭浏览器,session就消失了
程序一般都是在用户做log off的时候发个指令去删除session,然而浏览器从来不会主动在关闭之前通知服务器它将要被关闭,因此服务器根本不会有机会知道浏览器已经关闭.服务器会一直保留这个会话对象直 ...
- 创建Chromium WebUI接口
转载自:http://www.chromium.org/developers/webui Chrome的WebUI是那种,在Chrome中输入 "chrome://xxxx"就能打 ...
- Java设计模式——Observer(观察者)模式
在多个对象之间建立一对多的关系,以便当一个对象状态改变的时候.其它全部依赖于这个对象的对象都能得到通知,并被自己主动更新. 适用情况: 当一个抽象模型有两个方面,当中一个方面依赖于还有一方面. 将这二 ...
- [Javascript] Array methods in depth - indexOf
indexOf is used to search for a value or reference inside of an array. In this lesson we first look ...
- Android/Linux boot time优化
基于analyze_boot.py分析Android/Linux的kernel boot时间 1.修改HiKey的BoardConfig.mk文件,使能initcall_debug,增加dmesg b ...
- 开发日志_Jan.9
今天主要工作为修改昨天的碰撞引擎不符合预期的部分. 经过了昨天的工作,碰撞算法已经初见雏形.但是主要有两个问题: 碰撞反弹的方向与预期不符合 碰撞后球与机器人存在一个"黏在一起"的 ...
- C# 前台线程与后台线程区别
using System; using System.Drawing; using System.Windows.Forms; using System.Threading; namespace Wi ...