OpenNebula: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 38: | Line 38: | ||
# echo " StrictHostKeyChecking no" >> ~/.ssh/config | # echo " StrictHostKeyChecking no" >> ~/.ssh/config | ||
== | ==CXM== | ||
# cd ~ | |||
# git clone git://github.com/nagius/cxm | |||
# cd git/cxm/miscl | |||
# cp -r opennebula/tm opennebula/vmm /var/lib/one/remotes | |||
# cp cxm.conf /etc/ | |||
# ''N.B. Not sure what this does. Ignore for now:'' | |||
Change the post-migration hook in the cxm configuration to use one-migrate script. In /etc/xen/cxm.conf, change:e in /etc/xen/cxm.conf : | |||
POST_MIGRATION_HOOK="/usr/local/sbin/one-migrate" | |||
And update this script to fill the variable ONE_HOST with the hostname of your OpenNebula frontend. | |||
==Root OpenNebula Configuration== | |||
# Go to /var/lib/one/remotes/vmm/xen/xenrc and uncomment the line: | # Go to /var/lib/one/remotes/vmm/xen/xenrc and uncomment the line: | ||
export XM_CREDITS="sudo $XM_PATH sched-credit" | export XM_CREDITS="sudo $XM_PATH sched-credit" | ||
# Change /etc/one/ | # Change /etc/one/one.conf to uncomment the following (commenting the KVM lines): | ||
IM_MAD = [ | IM_MAD = [ | ||
name = "im_xen", | name = "im_xen", | ||
| Line 55: | Line 68: | ||
default = "vmm_exec/vmm_exec_xen.conf", | default = "vmm_exec/vmm_exec_xen.conf", | ||
type = "xen" ] | type = "xen" ] | ||
# Also add cxm to the TM_MAD directive so it reads: | |||
TM_MAD = [ | |||
executable = "one_tm", | |||
arguments = "-t 15 -d dummy,lvm,shared,qcow2,ssh,vmware,iscsi,cxm" ] | |||
# Add the cxm driver: | |||
VM_MAD = [ | |||
name = "vmm_cxm", | |||
executable = "one_vmm_exec", | |||
arguments = "-t 15 -r 0 cxm", | |||
default = "vmm_exec/vmm_exec_xen.conf", | |||
type = "xen" ] | |||
# Change the default disk driver for phy: in /etc/one/vmm_exec/vmm_exec_xen.conf : | |||
DISK = [ driver = "phy:" ] | |||
==Hosts== | ==Hosts== | ||
* onehost create cloud1 --im im_xen --vm | * onehost create cloud1 --im im_xen --vm vmm_cxm --net dummy | ||
* onehost create cloud2 --im im_xen --vm | * onehost create cloud2 --im im_xen --vm vmm_cxm --net dummy | ||
* onehost enable cloud1 | * onehost enable cloud1 | ||
* onehost enable cloud2 | * onehost enable cloud2 | ||
==Datastores== | |||
* onedatastore create | |||
NAME="london1cxm" | |||
DS_MAD="fs" | |||
TM_MAD="cxm" | |||
NO_DECOMPRESS="yes" | |||
SYSTEM="yes" | |||
* onecluster adddatastore London1 london1cxm | |||
==Clusters== | ==Clusters== | ||
| Line 70: | Line 109: | ||
* onecluster update 102 | * onecluster update 102 | ||
SYSTEM_DS="X" where X is the cxm datastore | SYSTEM_DS="X" where X is the cxm datastore | ||
Revision as of 13:31, 22 March 2013
Pre-Installation Tasks
- groupadd --gid 2001 oneadmin
- useradd --uid 201 -g oneadmin -d /var/lib/one -m oneadmin
- elinks http://downloads.opennebula.org/
Install
- dpkg --install *.deb
- apt-get -f install (to get dependencies)
- /usr/share/opennebula/install_gems
- cd /usr/share/opennebula
- ./install_novnc.sh
Configure
Host configuration
- apt-get install ruby
- Copy key to /root/.ssh/authorized_keys
- groupadd and useradd commands as above
- usermod -a -G disk oneadmin
- Add to /etc/sudoers:
oneadmin ALL=(ALL) NOPASSWD: /usr/sbin/xm * oneadmin ALL=(ALL) NOPASSWD: /usr/sbin/xentop * oneadmin ALL=(ALL) NOPASSWD: /sbin/lvs * oneadmin ALL=(ALL) NOPASSWD: /sbin/lvcreate * oneadmin ALL=(ALL) NOPASSWD: /sbin/lvremove * oneadmin ALL=(ALL) NOPASSWD: /bin/dd *
Front end
- mkdir ~/.one
- echo "oneadmin:password" > ~/.one/one_auth
- chmod 600 ~/.one/one_auth
- Change :host: to 0.0.0.0 and :port: to 80 in /etc/one/sunstone-server.conf
- echo "Host *" >> ~/.ssh/config
- echo " StrictHostKeyChecking no" >> ~/.ssh/config
CXM
- cd ~
- git clone git://github.com/nagius/cxm
- cd git/cxm/miscl
- cp -r opennebula/tm opennebula/vmm /var/lib/one/remotes
- cp cxm.conf /etc/
- N.B. Not sure what this does. Ignore for now:
Change the post-migration hook in the cxm configuration to use one-migrate script. In /etc/xen/cxm.conf, change:e in /etc/xen/cxm.conf : POST_MIGRATION_HOOK="/usr/local/sbin/one-migrate" And update this script to fill the variable ONE_HOST with the hostname of your OpenNebula frontend.
Root OpenNebula Configuration
- Go to /var/lib/one/remotes/vmm/xen/xenrc and uncomment the line:
export XM_CREDITS="sudo $XM_PATH sched-credit"
- Change /etc/one/one.conf to uncomment the following (commenting the KVM lines):
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" ]
- Also add cxm to the TM_MAD directive so it reads:
TM_MAD = [ executable = "one_tm", arguments = "-t 15 -d dummy,lvm,shared,qcow2,ssh,vmware,iscsi,cxm" ]
- Add the cxm driver:
VM_MAD = [ name = "vmm_cxm", executable = "one_vmm_exec", arguments = "-t 15 -r 0 cxm", default = "vmm_exec/vmm_exec_xen.conf", type = "xen" ]
- Change the default disk driver for phy: in /etc/one/vmm_exec/vmm_exec_xen.conf :
DISK = [ driver = "phy:" ]
Hosts
- onehost create cloud1 --im im_xen --vm vmm_cxm --net dummy
- onehost create cloud2 --im im_xen --vm vmm_cxm --net dummy
- onehost enable cloud1
- onehost enable cloud2
Datastores
- onedatastore create
NAME="london1cxm" DS_MAD="fs" TM_MAD="cxm" NO_DECOMPRESS="yes" SYSTEM="yes"
- onecluster adddatastore London1 london1cxm
Clusters
- onecluster create London1
- onecluster addhost London1 cloud1
- onecluster addhost London1 cloud2
- onecluster update 102
SYSTEM_DS="X" where X is the cxm datastore