{"id":677,"date":"2014-03-03T00:41:35","date_gmt":"2014-03-02T22:41:35","guid":{"rendered":"http:\/\/exorientelux.biz\/cgi-bin\/weblog_basic\/index.php?p=677"},"modified":"2014-03-21T23:01:57","modified_gmt":"2014-03-21T23:01:57","slug":"virtualbox-tutorial-dedicated-to-the-creation-of-an-distributed-environment-for-java-developing","status":"publish","type":"post","link":"http:\/\/tmb.nginet.de\/?p=677","title":{"rendered":"VirtualBox tutorial dedicated to the creation of an distributed environment for Java developing"},"content":{"rendered":"<p><strong>Background<\/strong><br \/>\nThis VirtualBox tutorial is about the creation of an distributed environment for Java developing. Background is, that I am teaching Advanced Java Programming (named PROG2 at ZHAW). Topics of the PROG2 lecture are:<\/p>\n<ol>\n<li>Multi-Threading (Basic and Advanced Threading Concepts)<\/li>\n<li>Input\/Output (JDBC, File-IO, TPC\/UDP, Client-Server)<\/li>\n<li>Testing (Mockups, Mokito)<\/li>\n<li>Graphical User Interfaces (Swing\/AWT\/Android)<\/li>\n<\/ol>\n<p>Motivations for this tutorial do exist many, but the first and foremost was the desire to test networked Java applications in a (close to real) distributed environment.<\/p>\n<p><strong>Basic System Layout<\/strong><br \/>\nThe basic setup is inspired by the virtual environment proposed for a local OpenStack deployment, described in detail in tutorial &#8222;<a href=\"http:\/\/docs.openstack.org\/training-guides\/content\/building-training-cluster.html#virtualbox-manual\">Creating a VirtualBox-based Test Infrastructure<\/a>&#8222;. It consists of:<\/p>\n<ol>\n<li>One Master Node (aka Controller Node)<\/li>\n<li>Two Worker Nodes (Compute Nodes)<\/li>\n<\/ol>\n<p><strong>Basic System Configuration<\/strong><\/p>\n<ol>\n<li>Hardware: VT Enabled PC<\/li>\n<li>Host Operating Systems: OpenSuse<\/li>\n<li>Virtualization: VirtualBox<\/li>\n<li>Virtual Networking: Host only connections. a VirtualBox concept for providing purely internal networks between your host and Virtual Machines<\/li>\n<li>Guest Operating Systems: Ubuntu Server (LTS or not doesn&#8217;t make a difference here)<\/li>\n<\/ol>\n<p><em>Hardware Support for Virtualization<\/em><br \/>\nWhether or not your local host machine provides hardware support for Virtualization Technologies (VT, vmx or svm) can be found out by running this command in a terminal &#8222;cat \/proc\/cpuinfo |grep -E &#8222;vmx|svm&#8220;&#8220;. Here is what I got on my Dell Ultrabook (VMX support is indicated in bold)<\/p>\n<p>tmb@tmbuell:~&gt; cat \/proc\/cpuinfo |grep -E &#8222;vmx|svm&#8220;<br \/>\nflags : fpu vme de (&#8230;) eagerfpu pni pclmulqdq dtes64 monitor ds_cpl <strong>vmx<\/strong> smx est (&#8230;)\u00a0flags : fpu vme de pse tsc (&#8230;) ds_cpl <strong>vmx<\/strong> smx est flags : fpu vme de pse (&#8230;) monitor ds_cpl <strong>vmx<\/strong> smx est tm2 (&#8230;) bmi2 ms invpcid rtm\u00a0flags : fpu vme de pse tsc msr (&#8230;) monitor ds_cpl <strong>vmx<\/strong> smx est tm2 ssse3<\/p>\n<p><em>The Guest OS<\/em><br \/>\ntmb@tmbuell:~&gt; less \/etc\/SuSE-release<br \/>\nopenSUSE 13.1 (x86_64)<br \/>\nVERSION = 13.1<br \/>\nCODENAME = Bottle<br \/>\n# \/etc\/SuSE-release is deprecated and will be removed in the future, use \/etc\/os-release instead<\/p>\n<p><em>Virtualization based on VirtualBox<\/em><br \/>\nInstalling VirtualBox on OpenSuse is trivial using zypper and a terminal:<br \/>\ntmb@tmbuell:~&gt; zypper install virtualbox<br \/>\nzypper search virtualbox<br \/>\nLoading repository data&#8230;<br \/>\nReading installed packages&#8230;<\/p>\n<p>S | Name | Summary | Type<br \/>\n&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;<br \/>\ni | python-virtualbox | Python bindings for virtualbox | package<br \/>\ni | virtualbox | VirtualBox is an Emulator | package<br \/>\n| virtualbox | VirtualBox is an Emulator | srcpackage<br \/>\ni | virtualbox-devel | Devel files for virtualbox | package<br \/>\n| virtualbox-guest-kmp-default | Guest kernel modules for VirtualBox | ackage<br \/>\ni | virtualbox-guest-kmp-desktop | Guest kernel modules for VirtualBox | package<br \/>\n| virtualbox-guest-kmp-pae | Guest kernel modules for VirtualBox | package<br \/>\ni | virtualbox-guest-tools | VirtualBox guest tools | package<br \/>\ni | virtualbox-guest-x11 | VirtualBox X11 drivers for mouse and video | package<br \/>\n| virtualbox-host-kmp-default | Host kernel module for VirtualBox | package<br \/>\ni | virtualbox-host-kmp-desktop | Host kernel module for VirtualBox | package<br \/>\n| virtualbox-host-kmp-pae | Host kernel module for VirtualBox | package<br \/>\ni | virtualbox-qt | Qt GUI part for virtualbox | package<br \/>\n| virtualbox-websrv | WebService GUI part for virtualbox | package<\/p>\n<p><em>Viruaal Machine Creation and Configuration<\/em><br \/>\nThe selected environment requires the creation of several VMs, whereas most of them do share the same basic characteristics and configuration. A smart approach is to configure and then to use &#8222;Cloning&#8220; to create duplicates.<\/p>\n<p>Since we&#8217;ll have several VMs that are associated with each other we have to configure a set of Virtual Networks. For that launch Virtual Box, navigate to  File>Preferences>Network. Then choose the option to add &#8222;Host-Only Networks&#8220;. Create three Host-Only Network Connections; Vboxnet0-Vboxnet2.<\/p>\n<p>Configure Vboxnet0 with IPv4 Address 10.10.10.1 and IPv4 Network Mask 255.255.255.0, Vboxnet1 with IPv4 Address 10.20.20.1 and IPv4 Network Mask 255.255.255.0, and Vboxnet2 IPv4 Address 192.168.100.1 and IPv4 Network Mask 255.255.255.0.<\/p>\n<p><strong>Stay Tuned, More To Come On<\/strong><br \/>\nNetwork Configuration, SSH Access, Port Forwarding, Guest installation, Sharing between Guests and Guest, and Guest and Hosts (Shared Folder, USB, SFTP), Guest Additions, Java installation, Git and GitHub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Background This VirtualBox tutorial is about the creation of an distributed environment for Java developing. Background is, that I am teaching Advanced Java Programming (named PROG2 at ZHAW). Topics of the PROG2 lecture are: Multi-Threading (Basic and Advanced Threading Concepts) Input\/Output (JDBC, File-IO, TPC\/UDP, Client-Server) Testing (Mockups, Mokito) Graphical User Interfaces (Swing\/AWT\/Android) Motivations for this [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5,15],"tags":[32,36,52,60],"class_list":["post-677","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-linux","category-zhaw","tag-git","tag-java","tag-software-development","tag-virtualbox"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/posts\/677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=677"}],"version-history":[{"count":4,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions"}],"predecessor-version":[{"id":722,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions\/722"}],"wp:attachment":[{"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tmb.nginet.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}