User Tools

Site Tools


opennebula_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
opennebula_install [2012/06/04 17:10]
SLUUG Administration
opennebula_install [2012/06/12 20:50] (current)
SLUUG Administration
Line 1: Line 1:
-=== OpenNebula Install Notes === +==== OpenNebula Install Notes ==== 
-== work in progress - 04JUN12 ==+=== work in progress - 04JUN12 ​===
  
-aptitude install xen-hypervisor+  * Debian wheezy, install xen hypervisor, openvswitch 
 +   
 +<​code>​ 
 +  # aptitude install xen-hypervisor
  
-aptitude install openvswitch-brcompat ​+  # aptitude install openvswitch-brcompat ​openvswitch-datapath-source 
 +</​code>​ 
 +  * Manually build/​install openvswitch-datapath for your kernel
  
 +<​code>#​ m-a a-i openvswitch-datapath</​code>​
 +
 +Various dependencies
 (  openvswitch-brcompat openvswitch-common{a} openvswitch-switch{a} uuid-runtime{a} ) (  openvswitch-brcompat openvswitch-common{a} openvswitch-switch{a} uuid-runtime{a} )
  
-openvswitch-datapath-source+  * Reboot 
 + 
 +== OpenNebula == 
 + 
 +  * This will install all of the opennebula packages on one server 
 + 
 +  # aptitude install opennebula-{node,​sunstone,​tools} opennebula 
 + 
 +  * Once installed edit /​etc/​one/​oned.conf\\ 
 +You will need to comment out the KVM drivers, and uncomment the Xen drivers: 
 +<​file>​ 
 +    IM_MAD = [ 
 +        name       = "​im_xen",​ 
 +        executable = "​one_im_ssh",​ 
 +        arguments ​ = "​xen"​ ] 
 + 
 +    VM_MAD = [ 
 +        name       = "​vmm_xen",​ 
 +        executable = "​one_vmm_exec",​ 
 +        arguments ​ = "​xen",​ 
 +        default ​   = "​vmm_exec/​vmm_exec_xen.conf",​ 
 +        type       = "​xen"​ ] 
 +</​file>​ 
 +  * Edit /​etc/​sudoers.d/​opennebula-node to insure oneadmin can run ovs-vsctl\\ 
 +<​code> ​ # visudo -f /​etc/​sudoers.d/​opennebula-node </​code>​ 
 +add line\\ ​  
 +<​file> ​ %cloud ​   ALL=(ALL) NOPASSWD: /​usr/​bin/​ovs-vsctl * </​file>​ 
 + 
 +  * You will need to su to oneadmin and edit the ssh authorized_keys\\ 
 +<​code>​ 
 +  # su - oneadmin 
 +  # cat .ssh/​id_rsa.pub > authorized_keys 
 +  # ssh localhost 
 +</​code>​ 
 +  * Make sure you can login with no password. 
 + 
 +Once logged in do the following\\  
 +<​code>​ 
 +  ~$ onevm list 
 +    ID USER     ​GROUP ​   NAME         STAT CPU     ​MEM ​       HOSTNAME ​       TIME 
 + 
 +  ~$ exit 
 +</​code>​ 
 +If you do not get the above blank list, then verify /​var/​log/​one/​oned.log and see where the issue is. 
 + 
 + 
 +== Add a new host == 
 +It is critical that your opennebula front end can resolve the name of your hypervisors. In this scenario we will use the /etc/hosts file to do this for us.\\  
 + 
 +<​code>#​ vim /​etc/​hosts 
 + 
 +127.0.0.1 xenhost 
 + 
 +:wq 
 +</​code>​ 
 + 
 +For clustering or high availability you can assign host to closers. For our purposes we will over look this for now.\\ 
 + 
 +Switch over to the oneadmin user and add your hosts.\\ 
 +To add a host you use the onehost create command. This command needs to know the information manager (im) driver, the virtual machine monitor (vmm) driver and the network driver that the host is using. In our case we will be adding a xen hypervisor, that is set up to use open vSwitch for its network driver. 
 + 
 +<​code>#​ su - oneadmin 
 +~$ onehost create xenhost -i im_xen -v vmm_xen -n ovswitch 
 +</​code>​ 
 + 
 +Once complete you should now see your host on the onehost list, you can also use onehost show <​hostid>​ to show the details of your host:\\ 
 + 
 +<​code>​ 
 +oneadmin@xenhost:​~$ onehost list 
 +  ID NAME         ​CLUSTER ​    ​RVM ​  ​TCPU ​  ​FCPU ​  ​ACPU ​  ​TMEM ​  ​FMEM ​  AMEM STAT 
 +   1 xenhost ​    ​- ​            ​0 ​     0      0    100     ​0K ​    ​0K ​    ​0K ​  on 
 + 
 +oneadmin@xenhost:​~$ onehost show xenhost 
 +HOST 1 INFORMATION ​                                                              
 +ID                    : 1                    
 +NAME                  : xenhost ​            
 +CLUSTER ​              : -                    
 +STATE                 : MONITORED ​           
 +IM_MAD ​               : im_xen ​              
 +VM_MAD ​               : vmm_xen ​             
 +VN_MAD ​               : ovswitch ​            
 +LAST MONITORING TIME  : 1339032919 ​          
 + 
 +HOST SHARES ​                                                                     
 +MAX MEM               : 16678912 ​            
 +USED MEM (REAL) ​      : 13844480 ​            
 +USED MEM (ALLOCATED) ​ : 0                    
 +MAX CPU               : 800                  
 +USED CPU (REAL) ​      : 107                  
 +USED CPU (ALLOCATED) ​ : 0                    
 +MAX DISK              : 0                    
 +USED DISK (REAL) ​     : 0                    
 +USED DISK (ALLOCATED) : 0                    
 +RUNNING VMS           : 0                    
 + 
 +MONITORING INFORMATION ​                                                          
 +ARCH="​x86_64"​ 
 +CPUSPEED="​3100"​ 
 +FREECPU="​693"​ 
 +FREEMEMORY="​2834432"​ 
 +HOSTNAME="​xenhost"​ 
 +HYPERVISOR="​xen"​ 
 +MODELNAME="​AMD FX(tm)-8120 Eight-Core Processor " 
 +NETRX="​0"​ 
 +NETTX="​0"​ 
 +TOTALCPU="​800"​ 
 +TOTALMEMORY="​16678912"​ 
 +USEDCPU="​107"​ 
 +USEDMEMORY="​13844480"​
  
-/usr/​share/​doc/​openvswitch-datapath-source/​README.Debian+</code>
  
 +== Storage ==
  
-Front-end+We will mount the RAID array to datastores and use this for all storage. ​
  
-ruby >= 1.8.7 
  
-storage 
  
 http://​opennebula.org/​documentation:​rel3.4:​lvm http://​opennebula.org/​documentation:​rel3.4:​lvm
opennebula_install.1338847822.txt.gz · Last modified: 2012/06/04 17:10 by SLUUG Administration