<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. LeetCode - 204. Count Primes - 埃拉托斯特尼筛法 95.12% - (C++) - Sieve of Eratosthenes

    原题 原题链接 Description: Count the number of prime numbers less than a non-negative number, n. 计算小于非负数n的 ...

  2. 2017年开年的第一次比较大的安全事件: MongoDB “赎金事件”,如何看待互联网安全问题

    今天上午(2017年1月7日),我的微信群中同时出现了两个MongoDB被黑掉要赎金的情况,于是在调查过程中,发现了这个事件.这个事件应该是2017年开年的第一次比较大的安全事件吧,发现国内居然没有什 ...

  3. FreeMarker---数据类型

    1.a.ftl 你好,${user},今天你的精神不错! ----------------------------- 测试if语句: <#if user=="老高"> ...

  4. javascript实现限制上传文件的大小

    目录 基本思路 示例 [一].基本思路 在FireFox.Chrome浏览器中可以根据document.getElementById(“id_file”).files[0].size 获取上传文件的大 ...

  5. android应用中设置自动大写

    给要添加view里面添加android:capitalize="sentences"属性

  6. CentOS7 安装chrome浏览器

    本篇文章主要记录如何在CentOS7.0上安装chrome. 1.配置yum下载源: 在目录 /etc/yum.repos.d/ 下新建文件 google-chrome.repo, 并且在该文件中添加 ...

  7. linux修改主机名-IP

    1.查看当前主机名  hostname 2. ifconfig   显示所有网络接口的信息  ifconfig eth0   显示网卡eth0的信息 3.临时修改主机名 hostname rusky. ...

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

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

  9. 百度前端笔试题目--css 实现一个带尖角的正方形

    今天在牛客网上看到这道题,发现自己并不会,看来自己css都没怎么学习,也不怎么会用.看了下答案,不是很明白,也在网上搜集了一些资料和解法,感觉一些同学博客上也写了一些解法和拓展,所以就在这里借鉴一下咯 ...

  10. 解决VS2008闪退的问题

    问题:打开VS2008项目后,应该是加载完所有文件,立即断掉了IDE,查看事件器,发现图片中的错误描述,google了很久没有找到解决方案,后来还是自己动手解决这个问题花了一早上的时间,哎,只要把工程 ...