<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手动玩转的更多相关文章

  1. openstack手动玩转

    <一,preface Important Project Network> openstack or all most cloud env Network desgine  is so m ...

  2. 教你从头到尾利用DQN自动玩flappy bird(全程命令提示,GPU+CPU版)【转】

    转自:http://blog.csdn.net/v_JULY_v/article/details/52810219?locationNum=3&fps=1 目录(?)[-] 教你从头到尾利用D ...

  3. Codeforces Round #177 (Div. 1) 题解【ABCD】

    Codeforces Round #177 (Div. 1) A. Polo the Penguin and Strings 题意 让你构造一个长度为n的串,且里面恰好包含k个不同字符,让你构造的字符 ...

  4. Codeforces Round #182 (Div. 1)题解【ABCD】

    Codeforces Round #182 (Div. 1)题解 A题:Yaroslav and Sequence1 题意: 给你\(2*n+1\)个元素,你每次可以进行无数种操作,每次操作必须选择其 ...

  5. C#又能出来装个B了。一步一步微信跳一跳自动外挂

    PS:语言只是载体.思维逻辑才是王道 前天看见了个python的脚本.于是装python.配置环境变量.装pip.折腾了一上午,最终装逼失败. 于是进入博客园,顶部有篇文章吸引了我 .NET开发一个微 ...

  6. 用C#实现微信“跳一跳”小游戏的自动跳跃助手

    一.前言: 前段时间微信更新了新版本后,带来的一款H5小游戏“跳一跳”在各朋友圈里又火了起来,类似以前的“打飞机”游戏,这游戏玩法简单,但加上了积分排名功能后,却成了“装逼”的地方,于是很多人花钱花时 ...

  7. 【资料总结】| Deep Reinforcement Learning 深度强化学习

    在机器学习中,我们经常会分类为有监督学习和无监督学习,但是尝尝会忽略一个重要的分支,强化学习.有监督学习和无监督学习非常好去区分,学习的目标,有无标签等都是区分标准.如果说监督学习的目标是预测,那么强 ...

  8. Python 实现auto linlink 连连看

    先上知乎上大神所写: 你看过/写过哪些有意思的代码? 然后别急着看blog,玩一把游戏再说! 看知乎评论,有人说他用了一个下午时间就写出来了. wo kao!!! 我断断续续写了一周的下午才搞定,然后 ...

  9. CCC2018游记

    day (-1) 晚上睡觉没盖被子 day 0  2018年2月13日 下午放学回来感到一阵头痛,一量体温结果发烧了,感觉很蓝瘦,居然在CCC前一天生病. 本来注册了账号想打practise的,结果又 ...

随机推荐

  1. sublime3 使用技巧

    Ctrl+O(Command+O)可以实现头文件和源文件之间的快速切换 Ctrl+Shift+T可以打开之前关闭的tab页,这点同chrome是一样的 Ctrl+R定位函数:Ctrl+G定位到行: 插 ...

  2. [原创]安卓使用Termux做渗透测试(演示sqlmap安装,并附上一个神器)

    由于手机kali太大,并且MIUI8+Android6.0的我.用手机kali不是太方便(懒得捣鼓),所以另找道路,用手机作渗透测试. 1.下载一个Termux,并授予ROOT权限. 2.打开之后输入 ...

  3. 探究css !important的应用之道

    定义及语法: !important是CSS1就定义的语法,作用是提高指定样式规则的应用优先权. 语法格式:{ cssRule !important },即将!important写在定义的最后面, 例如 ...

  4. 输入内容, 列出可选的项: QComboBox

    #include "widget.h" #include "ui_widget.h" #include <QtGui/QCompleter> #in ...

  5. 【iOS开发之OC和JS互调】

    1.OC中调用JS代码 公司的移动端需要加载一个现有的网页,并且要在原网页要做一些小的调整,如将网页的标题改一下加载到手机的app上,此时就可以在app的oc代码中加入JS代码来实现.如下例子,我要加 ...

  6. GridView控件的光棒效应

    // 光棒效应 protected void gvBookInfos_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.Ro ...

  7. javascript sort 用法

    <html> <head> <title></title> <script type="text/javascript" sr ...

  8. .NET程序集签名

    强命名程序集的一个好处是防篡改.假如我有一个程序集MyDll.dll,如果我用我自己的私钥进行签名将程序集中的内容进行哈希处理,其他人如果不知道我的私钥的话,就不能篡改我的这个程序集进行某些恶意的行为 ...

  9. 模板模式(Template)

    行为型:Template(模板模式) 作为一个曾经爱好写文章,但是不太懂得写文章的人,我必须承认,开头是个比较难的起步. 模板模式常规定义:模板模式定义了一个算法步骤,把实现延迟到子类. 事实上模板模 ...

  10. dinic网络流模板

    src:源点 sink:汇点 #include<queue> #include<iostream> #include<string.h> #include<s ...