<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. [原创]Python入门到简单网站目录扫描器编写(上)

    1.字符串,整型,浮点型.区别以及用法 |------字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串. 可以不严格的说,你可以认为引号包括的,都属于字符串 ...

  2. nginx 配置自签名的ssl证书

    最近要搭一个https的测试环境,使用nginx做反向代理. 网上找过不少资料,但过程不是很完整,吃了不少亏,故把自己的操作过程总结下来.如果你刚好遇到这个问题,希望对你有帮助! ********** ...

  3. java(17) - 增强for循环、装箱拆箱、可变参数

    一.增强型for循环: 语法格式: 打印: A B C D E 当遍历集合或数组时,如果需要访问集合或数组的下标时,最好使用旧的方法来便利或循环,而不要用增强型for循环,因为它丢失了下标信息. 对于 ...

  4. struts2.1.*中再实现了一个servlet的方法

    学习Struts2也有一段时间了,今天用Servlet写了一个验证码,然后搬到Struts2中,惊奇地发现Servlet无法访问,出现404错误!后来折腾了半天,终于找出原因了.这也算我学习中的一个重 ...

  5. 【Android】Activity的菜单机制和方法解析

    Activity有一套机制来实现对菜单的管理,方法如下: 1. 初始化菜单 public boolean onCreateOptionsMenu(Menu menu) 此方法用于初始化菜单,其中men ...

  6. SURF特征

    了解了SIFT特征后,来学习SURF特征. 虽说是SIFT的一个变种,可是跟SIFT还是有差别的 差别有例如以下: 1.尺度空间的构建(近似)不同. 2.同意尺度空间多层图像同一时候被处理 3.特征点 ...

  7. CentOS7--64安装python的psutil模块

    1.以root身份登陆CentOS依次 执行以下命令: wget https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.g ...

  8. Web的工作机制

    简要的介绍一下Web的工作机制,以便对开发JavaWeb项目有个更好的理解. 一.Web的概念     1.1    何为Web:Web是万维网(World Wide Web)的简称.Web出现以前, ...

  9. c#中的面向对象基础知识总结

    面向对象 1.面向过程----->面向对象 1.  面向过程:面向的是完成这件事儿的过程,强调的是完成这件事儿的动作. 面向对象:意在写出一个通用的代码,屏蔽差异. 我们在代码中描述一个对象,通 ...

  10. jquery获取checkbox被选中的值

    只用一个循环,就可以找出被选中的checkbox的值 var s; $("[name = b]:checkbox").each(function () {              ...