incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r813522 - in /incubator/tashi/site: docs/documentation-single.html xdocs/documentation-single.xml
Date Thu, 10 Sep 2009 17:38:52 GMT
Author: mryan3
Date: Thu Sep 10 17:38:52 2009
New Revision: 813522

URL: http://svn.apache.org/viewvc?rev=813522&view=rev
Log:
Updated single machine documentation


Modified:
    incubator/tashi/site/docs/documentation-single.html
    incubator/tashi/site/xdocs/documentation-single.xml

Modified: incubator/tashi/site/docs/documentation-single.html
URL: http://svn.apache.org/viewvc/incubator/tashi/site/docs/documentation-single.html?rev=813522&r1=813521&r2=813522&view=diff
==============================================================================
--- incubator/tashi/site/docs/documentation-single.html (original)
+++ incubator/tashi/site/docs/documentation-single.html Thu Sep 10 17:38:52 2009
@@ -100,6 +100,7 @@
                                                                         <p>There are
several dependencies you need to setup Tashi, they include:</p>
                                                                                         
       <ul>
 <li>Apache Thrift</li>
+<li>RPyC</li>
 <li>Xen or Qemu/KVM</li>
 <li>Python 2.4 or greater</li>
 <li>MySQL or sqlite if you wish to use them as the data backend</li>
@@ -117,9 +118,12 @@
 Copying generated code to 'tashi.services' package...
 Generatign Python code for 'messagingthrift'...
 Copying generated code to 'tashi.messaging.messagingthrift' package...
+Generating Python code for 'layoutlocality.thrift'...
+Copying generated code to 'tashi.services' package...
 Symlinking in clustermanager...
 Symlinking in nodemanager...
 Symlinking in tashi-client...
+Symlinking in primitive...
 Building nmd...
 Done
 </pre></div>
@@ -144,26 +148,20 @@
                                                                                         
       <p>I recommend running in debug mode if you haven't got it up and running yet.</p>
                                                                                         
       <p>Then, add your first host to Tashi.  If your box's hostname was "mryan3-d4"
and you used the pickled data format, you'd do:</p>
                                                                                         
       <div class="lit"><pre>
-In [1]: from tashi.services.ttypes import Host
-
-In [2]: from tashi.services.ttypes import HostState
+In [1]: from tashi.rpycservices.rpyctypes import Host, HostState
 
-In [3]: data.hosts[1] = Host(d={'id':1,'name':'mryan3-d4','state': HostState.Normal,'up':False})
+In [2]: data.baseDataObject.hosts[1] = Host(d={'id':1,'name':'mryan3-d4','state': HostState.Normal,'up':False})
 
-In [4]: data.save()
+In [3]: data.baseDataObject.save()
 
-In [5]:
+In [4]:
 </pre></div>
-                                                                                        
       <p><i>If you get an error about "'unexpected keyword argument 'd'", you'll
have to downgrade to an older version of Thrift.  As noted above, the version that Tashi was
built against was from April 11th, 2008, but there are many versions that will work with Tashi.</i></p>
                                                                                         
       <p>If you were using MySQL (or sqlite), you'd have to populate a row in the database
with columns named "id", "name", "state", and "up".</p>
-                                                                                        
       <p>Then quit the CM and restart it to force the creation of host locks.</p>
-                                                                                        
       <p>Add a user that matches both your user name and id:</p>
+                                                                                        
       <p>Then you may either create a host lock or quit the CM and restart it to force
the creation of host locks.</p>
                                                                                         
       <div class="lit"><pre>
-In [1]: from tashi.services.ttypes import User
+In [4]: import threading
 
-In [2]: data.users[13090] = User(d={'id':13090,'name':'mryan3'})
-
-In [3]: data.save()
+In [5]: data.baseDataObject.hosts[1]._lock = threading.Lock()
 </pre></div>
                                                                                         
       <p>Now, you can start the node manager (NM).  You may have to run this as root
if you have trouble gettings VMs to start as a normal user:</p>
                                                                                         
       <div class="lit"><pre>
@@ -183,7 +181,7 @@
 </pre></div>
                                                                                         
       <p>Now that those are running, you can start the scheduler:</p>
                                                                                         
       <div class="lit"><pre>
-mryan3@mryan3-d4:~/scratch/tashi$ python ./src/tashi/agents/examplepolicy.py 
+mryan3@mryan3-d4:~/scratch/tashi$ ./bin/primitive.py
 
 </pre></div>
                                                                                         
       <p>Make sure an image is placed in /var/tmp/images (or wherever you configured
it to be):</p>
@@ -194,6 +192,15 @@
 drwxrwxrwt 7 root   root         4096 2009-02-19 12:20 ..
 -rw-r--r-- 1 mryan3 mryan3 2440556544 2009-02-19 12:22 CentOS-5.2-i386.qcow2
 </pre></div>
+                                                                                        
       <p>Also, create a file called /etc/qemu-ifup.1.  If you want to add the tap device
to a bridge, you can make it contain something like this:</p>
+                                                                                        
       <div class="lit"><pre>
+#!/bin/sh
+
+/sbin/ifconfig $1 0.0.0.0 up
+/usr/sbin/brctl addif mybridge $1
+exit 0
+</pre></div>
+                                                                                        
       <p>Otherwise, you can simply make it an empty executable script.</p>
                                                                                         
       <p>And finally, you can use the client to try to create a VM:</p>
                                                                                         
       <div class="lit"><pre>
 mryan3@mryan3-d4:~/scratch/tashi$ ./bin/tashi-client.py createVm --name foobar --disks CentOS-5.2-i386.qcow2
@@ -219,6 +226,7 @@
 }
 </pre></div>
                                                                                         
       <p><i>Disk images can be created by simply using Qemu/KVM on a workstation
and placing the qcow file in the appropriate directory.</i></p>
+                                                                                        
       <p>The permission problems around the NM are usually related to creating the
TAP device.  Try running the "QEMU command:" reported by the NM manually if you continue to
have problems.</p>
                                                                                         
       <p>The VM will use a TAP device on your system and will be accessible over it.
 If you statically configure the guest for this test, that will work.  It is also possible
to setup a bridge and run a DHCP server on the host to provide IP addresses to the guest.
 In either case, you should be able to log into your guest shortly after that command completes.</p>
                                                                                         
       <div class="lit"><pre>
 mryan3@mryan3-d4:~/scratch/tashi$ ssh root@192.168.127.223
@@ -230,6 +238,12 @@
 Last login: Thu Jan  8 10:25:10 2009
 [root@localhost ~]# 
 </pre></div>
+                                                                                        
       <p>It is also possible to access the VM via VNC:</p>
+                                                                                        
       <div class="lit"><pre>
+mryan3@mryan3-d4:~/scratch/tashi$ ./bin/tashi-client vmmspecificcall --instance foobar --arg
startvnc
+VNC started on mryan3-d4:5900
+mrayn3@mryan3-d4:~/scratch/tashi$ vncviewer mryan3-d4
+</pre></div>
                                                                             </td>
                 </tr>
             </table>

Modified: incubator/tashi/site/xdocs/documentation-single.xml
URL: http://svn.apache.org/viewvc/incubator/tashi/site/xdocs/documentation-single.xml?rev=813522&r1=813521&r2=813522&view=diff
==============================================================================
--- incubator/tashi/site/xdocs/documentation-single.xml (original)
+++ incubator/tashi/site/xdocs/documentation-single.xml Thu Sep 10 17:38:52 2009
@@ -31,6 +31,7 @@
 <p>There are several dependencies you need to setup Tashi, they include:</p>
 <ul>
 <li>Apache Thrift</li>
+<li>RPyC</li>
 <li>Xen or Qemu/KVM</li>
 <li>Python 2.4 or greater</li>
 <li>MySQL or sqlite if you wish to use them as the data backend</li>
@@ -48,9 +49,12 @@
 Copying generated code to 'tashi.services' package...
 Generatign Python code for 'messagingthrift'...
 Copying generated code to 'tashi.messaging.messagingthrift' package...
+Generating Python code for 'layoutlocality.thrift'...
+Copying generated code to 'tashi.services' package...
 Symlinking in clustermanager...
 Symlinking in nodemanager...
 Symlinking in tashi-client...
+Symlinking in primitive...
 Building nmd...
 Done
 </pre></div>
@@ -75,26 +79,20 @@
 <p>I recommend running in debug mode if you haven't got it up and running yet.</p>
 <p>Then, add your first host to Tashi.  If your box's hostname was "mryan3-d4" and
you used the pickled data format, you'd do:</p>
 <div class="lit"><pre>
-In [1]: from tashi.services.ttypes import Host
-
-In [2]: from tashi.services.ttypes import HostState
+In [1]: from tashi.rpycservices.rpyctypes import Host, HostState
 
-In [3]: data.hosts[1] = Host(d={'id':1,'name':'mryan3-d4','state': HostState.Normal,'up':False})
+In [2]: data.baseDataObject.hosts[1] = Host(d={'id':1,'name':'mryan3-d4','state': HostState.Normal,'up':False})
 
-In [4]: data.save()
+In [3]: data.baseDataObject.save()
 
-In [5]:
+In [4]:
 </pre></div>
-<p><i>If you get an error about "'unexpected keyword argument 'd'", you'll have
to downgrade to an older version of Thrift.  As noted above, the version that Tashi was built
against was from April 11th, 2008, but there are many versions that will work with Tashi.</i></p>
 <p>If you were using MySQL (or sqlite), you'd have to populate a row in the database
with columns named "id", "name", "state", and "up".</p>
-<p>Then quit the CM and restart it to force the creation of host locks.</p>
-<p>Add a user that matches both your user name and id:</p>
+<p>Then you may either create a host lock or quit the CM and restart it to force the
creation of host locks.</p>
 <div class="lit"><pre>
-In [1]: from tashi.services.ttypes import User
+In [4]: import threading
 
-In [2]: data.users[13090] = User(d={'id':13090,'name':'mryan3'})
-
-In [3]: data.save()
+In [5]: data.baseDataObject.hosts[1]._lock = threading.Lock()
 </pre></div>
 <p>Now, you can start the node manager (NM).  You may have to run this as root if you
have trouble gettings VMs to start as a normal user:</p>
 <div class="lit"><pre>
@@ -114,7 +112,7 @@
 </pre></div>
 <p>Now that those are running, you can start the scheduler:</p>
 <div class="lit"><pre>
-mryan3@mryan3-d4:~/scratch/tashi$ python ./src/tashi/agents/examplepolicy.py 
+mryan3@mryan3-d4:~/scratch/tashi$ ./bin/primitive.py
 
 </pre></div>
 <p>Make sure an image is placed in /var/tmp/images (or wherever you configured it to
be):</p>
@@ -125,6 +123,15 @@
 drwxrwxrwt 7 root   root         4096 2009-02-19 12:20 ..
 -rw-r--r-- 1 mryan3 mryan3 2440556544 2009-02-19 12:22 CentOS-5.2-i386.qcow2
 </pre></div>
+<p>Also, create a file called /etc/qemu-ifup.1.  If you want to add the tap device
to a bridge, you can make it contain something like this:</p>
+<div class="lit"><pre>
+#!/bin/sh
+
+/sbin/ifconfig $1 0.0.0.0 up
+/usr/sbin/brctl addif mybridge $1
+exit 0
+</pre></div>
+<p>Otherwise, you can simply make it an empty executable script.</p>
 <p>And finally, you can use the client to try to create a VM:</p>
 <div class="lit"><pre>
 mryan3@mryan3-d4:~/scratch/tashi$ ./bin/tashi-client.py createVm --name foobar --disks CentOS-5.2-i386.qcow2
@@ -150,6 +157,7 @@
 }
 </pre></div>
 <p><i>Disk images can be created by simply using Qemu/KVM on a workstation and
placing the qcow file in the appropriate directory.</i></p>
+<p>The permission problems around the NM are usually related to creating the TAP device.
 Try running the "QEMU command:" reported by the NM manually if you continue to have problems.</p>
 <p>The VM will use a TAP device on your system and will be accessible over it.  If
you statically configure the guest for this test, that will work.  It is also possible to
setup a bridge and run a DHCP server on the host to provide IP addresses to the guest.  In
either case, you should be able to log into your guest shortly after that command completes.</p>
 <div class="lit"><pre>
 mryan3@mryan3-d4:~/scratch/tashi$ ssh root@192.168.127.223
@@ -161,6 +169,12 @@
 Last login: Thu Jan  8 10:25:10 2009
 [root@localhost ~]# 
 </pre></div>
+<p>It is also possible to access the VM via VNC:</p>
+<div class="lit"><pre>
+mryan3@mryan3-d4:~/scratch/tashi$ ./bin/tashi-client vmmspecificcall --instance foobar --arg
startvnc
+VNC started on mryan3-d4:5900
+mrayn3@mryan3-d4:~/scratch/tashi$ vncviewer mryan3-d4
+</pre></div>
 
 </section>
 



Mime
View raw message