jazz/11-09-13: README.Debian

File README.Debian, 3.7 KB (added by jazz, 13 years ago)

README file of opennebula package

Line 
1=========================================
2opennebula Debian package
3=========================================
4
5initial setup
6-----------------------------------------
7
8'opennebula' Debian package contains OpenNebula Controller which will
9manage all nodes from your cloud. After installation of this package,
10OpenNebula daemon is not ready to startup and will print:
11-------------------
12  You should have ONE_AUTH set the first time you start
13  OpenNebula as it is used to set the credentials for
14  the adminitrator user.
15-------------------
16
17You have to choose an password for internal oneadmin OpenNebula user
18(ie. != from opennebula account).
19
20  root@controller> su - oneadmin
21  oneadmin@controller> vi $HOME/.one/one_auth
22-------------------
23oneadmin:<password>
24-------------------
25
26You can then start OpenNebula daemon and scheduler by issuing :
27
28  root@controller> /etc/init.d/opennebula start
29
30
31Add a new host (node) in OpenNebula pool
32-----------------------------------------
33
341. Install 'opennebula-node' debian package in destination host
35
36  root@node01> apt-get install opennebula-node
37
382. Copy controller ssh key to node01
39
40  root@controller> su - oneadmin
41  oneadmin@controller> cat $HOME/.ssh/id_rsa.pub
42  <COPY YOUR CONTROLLER SSH PUBKEY>
43
44  root@node01> su - oneadmin
45  oneadmin@node01> vi $HOME/.ssh/authorized_keys
46  <PAST YOUR CONTROLLER SSH PUBKEY>
47
483. Test an connection from controller to node01
49
50  root@controller> su - oneadmin
51  oneadmin@controller> ssh oneadmin@node01
52    The authenticity of host 'node01 (192.168.0.2)' can't be established.
53    RSA key fingerprint is [].
54    Are you sure you want to continue connecting (yes/no)? [yes]
55    Warning: Permanently added 'node01,192.168.0.2' (RSA) to the list of known hosts.
56  oneadmin@node01>
57
584. Add this host into OpenNebula pool
59
60  oneadmin@controller> onehost add node01 im_kvm vmm_kvm tm_ssh
61
625. Check node registration on controller
63
64  oneadmin@controller> onehost list
65  ID NAME              CLUSTER  RVM   TCPU   FCPU   ACPU    TMEM    FMEM STAT
66   0 node01            default    0    400    388    400    3.9G    2.5G   on
67
68
69Sample setup
70-----------------------------------------
71Here is a sample setup which is adapted from
72<http://www.opennebula.org/documentation:rel2.0:vmg>
73It's based on a simple and small image of TTYLinux <http://minimalinux.org/ttylinux/>
74
75Download a tarball from OpenNebula project :
76
77  oneadmin@controller> cd
78  oneadmin@controller> mkdir one-templates
79  oneadmin@controller> cd one-templates
80  oneadmin@controller> wget http://dev.opennebula.org/attachments/download/170/ttylinux.tar.gz
81  oneadmin@controller> tar xvzf ttylinux.tar.gz
82
83Then, create a first virtual network (using virbr0 as bridge by default) :
84
85  oneadmin@controller> vi small_network.net
86-------------------
87NAME = "Small network"
88TYPE = FIXED
89# virbr0 = bridge device used by libvirt /etc/libvirt/qemu/networks/default.xml
90BRIDGE = virbr0
91LEASES = [ IP="192.168.122.2"]
92-------------------
93  oneadmin@controller> onevnet create small_network.net
94  oneadmin@controller> onevnet list
95  ID USER     NAME              TYPE BRIDGE P #LEASES
96   0 oneadmin Small network    Fixed virbr0 N       0
97
98Finally, you can create the template configuration for this small VM :
99
100  oneadmin@controller> vi ttylinux.one
101-------------------
102NAME   = ttylinux
103CPU    = 0.1
104MEMORY = 64
105DISK   = [
106  source   = "/var/lib/one/one-templates/ttylinux.img",
107  target   = "hda",
108  readonly = "no" ]
109NIC    = [ NETWORK = "Small network" ]
110-------------------
111  oneadmin@controller> onevm create ttylinux.one
112
113VM has been autostarted and deployed on one of your host.
114You can SSH to it (login is root and password is password) :
115
116  oneadmin@controller> onevm show ttylinux|grep IP
117  IP=192.168.122.2
118  oneadmin@controller> ssh root@192.168.122.2
119