Using a VMware Appliance
1. INTRODUCTION.
I have started this blog as a consequence of my participation in the VMware Ultimate Virtual Appliance Challenge. I have built the Derby Database Appliance to participate in this challenge. If you feel that it is useful for you, please vote for me in the previous link.
This blog is to explain more details about how to use the Derby Database Appliance. The objective of the virtual appliance is learning and testing the Apache Derby relational database using Java, JDBC and SQL. The virtual appliance has installed the operating system Linux Ubuntu 5.10 and Eclipse IDE with Derby nature.
VMware is a world-class company that provides virtual technology to optimize and manage the IT infrastructure, from the desktop to the data center, by virtualizing the computing, storage and networking systems with VMware software. This company sells virtual technology products such as VMware Workstation, Vmware ACE, VMware Infrastructure 3, and other. VMware Player is one of the VMware free products and you can run with this, tens of virtual appliances and in the near future hundreds of them.
We can understand the concept of a virtual appliance with 2 basic questions:
The first question is "What is a virtual appliance?" and VMware explains: a virtual appliance is similar to a 'traditional' computing appliance and is designed with a specific function in mind. The major difference is that instead of being built on a physical computing device, a virtual appliance is built using virtual machine and can be run on VMware Player, VMware Workstation, VMware Server, or VMware ESX Server. A virtual appliance starts with a pre-installed and pre-configured operating system. In addition to the base operating system, a virtual appliance contains a pre-installed and pre-configured application. The application may have multiple components and services to provide the required functionality. The key benefit to building virtual appliances is that developers/vendors no longer need to build, test, and ship physical hardware devices while they still maintain the benefits of providing a ‘sealed’, purpose-built solution.
The second question is "What do you need to run a virtual appliance?" and the answer is that you need 3 things to run the Derby Database Appliance and any other virtual appliance.
Section 2. How do you can use the Derby Database Appliance to Java programming language?
1. Power on the VMware Player in your computer and select the Derby Database Appliance with the Player browser in your file system (Ubuntu file in Ubuntu_Derby folder.)
Considering that the file name is j2se_linux.bin
$ fakeroot make-jpkg j2se_linux.bin
It generates a .deb file and supposing that it is j2se_linux.deb
$ sudo dpkg -i j2se_linux.deb
Now to activate j2se in Ubuntu 5.10, type:
$ sudo update-alternatives --config java
Select the number of j2se and click on Enter key.
To verify that j2se is present, type:
Note 7: This document was developed in 2006-2007.
Regards,
Cruz Castillo
I have started this blog as a consequence of my participation in the VMware Ultimate Virtual Appliance Challenge. I have built the Derby Database Appliance to participate in this challenge. If you feel that it is useful for you, please vote for me in the previous link.
This blog is to explain more details about how to use the Derby Database Appliance. The objective of the virtual appliance is learning and testing the Apache Derby relational database using Java, JDBC and SQL. The virtual appliance has installed the operating system Linux Ubuntu 5.10 and Eclipse IDE with Derby nature.
VMware is a world-class company that provides virtual technology to optimize and manage the IT infrastructure, from the desktop to the data center, by virtualizing the computing, storage and networking systems with VMware software. This company sells virtual technology products such as VMware Workstation, Vmware ACE, VMware Infrastructure 3, and other. VMware Player is one of the VMware free products and you can run with this, tens of virtual appliances and in the near future hundreds of them.
We can understand the concept of a virtual appliance with 2 basic questions:
The first question is "What is a virtual appliance?" and VMware explains: a virtual appliance is similar to a 'traditional' computing appliance and is designed with a specific function in mind. The major difference is that instead of being built on a physical computing device, a virtual appliance is built using virtual machine and can be run on VMware Player, VMware Workstation, VMware Server, or VMware ESX Server. A virtual appliance starts with a pre-installed and pre-configured operating system. In addition to the base operating system, a virtual appliance contains a pre-installed and pre-configured application. The application may have multiple components and services to provide the required functionality. The key benefit to building virtual appliances is that developers/vendors no longer need to build, test, and ship physical hardware devices while they still maintain the benefits of providing a ‘sealed’, purpose-built solution.
The second question is "What do you need to run a virtual appliance?" and the answer is that you need 3 things to run the Derby Database Appliance and any other virtual appliance.
- PC or Laptop with al least 1 GHz. and 512 Mb. of RAM memory. You would run the appliance with an equipment of 500 Mz. and 256 Mb. of RAM but the process is slower.
- Download and install in your computer the VMware Player (25 Mb.), it is free. Please, choose the correct version to your computer. There are Windows and Linux versions.
- You need enough free hard disk space to the files of the appliance. The normal size of the virtual files is over 1 Gb. to 6 Gb., although there are virtual appliances of 300 Mb. or 10 Gb., too. It depends of the applications type of the virtual appliance.
The interesting idea is that you can run in your computer other Operating System with pre-installed and pre-configured applications without setting up the environment variables of your computer. For example, if you have Windows in your computer, you can run a virtual appliance with Linux and pre-installed and pre-configured applications in 5 minutes more or less and without setting up the environment variables of your computer. In my case, I have built the Derby Database Appliance and it has pre-installed and pre-configured Linux Ubuntu 5.10, Apache Derby Database, and Eclipse IDE with derby nature. Today, there are tens of appliances with different themes and you can download them in the VMware Challenge virtual appliances website.
2. COMPONENTS OF THE DERBY DATABASE APPLIANCE.Ubuntu 5.10 is a complete Linux-based operating system, freely available and you have the right to modify your software until it works the way you want it to. Ubuntu is suitable for both desktop and server use. It includes more than 16,000 pieces of software, but the core desktop installation fits on a single CD. Also, Ubuntu is available in over 40 languages.
Apache Derby is a small database implemented in Java and the developers can easily embed it (with the embedded JDBC driver) in any Java-based solution. Also, Derby works in client/server environment with the network client JDBC driver.
Eclipse IDE is an open source platform and application frameworks for building software. The Eclipse Platform is written in the Java language and comes with extensive plug-in construction toolkits and examples. Eclipse based tools give developers freedom of choice in a multi-language, multi-platform, multi-vendor environment. Eclipse provides a plug-in based framework that makes it easier to create, integrate and utilize software tools, saving time and money.
3. HOW TO USE THE DERBY DATABASE APPLIANCE.Apache Derby is a small database implemented in Java and the developers can easily embed it (with the embedded JDBC driver) in any Java-based solution. Also, Derby works in client/server environment with the network client JDBC driver.
Eclipse IDE is an open source platform and application frameworks for building software. The Eclipse Platform is written in the Java language and comes with extensive plug-in construction toolkits and examples. Eclipse based tools give developers freedom of choice in a multi-language, multi-platform, multi-vendor environment. Eclipse provides a plug-in based framework that makes it easier to create, integrate and utilize software tools, saving time and money.
I have been a beginner user in Linux, Java and Derby Database but the VMware virtual technology gave me the opportunity to learn and to test these topics very quickly.
I use to be a frequent user of Windows OS but now I have discovered the Linux OS with Ubuntu 5.10. Please, follow the next steps to use the Derby Databas Appliance:
I use to be a frequent user of Windows OS but now I have discovered the Linux OS with Ubuntu 5.10. Please, follow the next steps to use the Derby Databas Appliance:
- Download and install in your computer the VMware Player ( 25 Mb.)
- Download and unzip the Derby Database Appliance file (Derby_Ubuntu.zip of 1.19 Gb.) The site to download the file is a torrent site and you need a torrent client installed in your computer (BitTorrent, UTorrent, Azureus or BitComet) to download the file. When you unzip the file in your computer, it generates a folder (Ubuntu_Derby) with the files of the virtual appliance and a text file (Ubuntu_Derby users) with the usernames and the passwords.
- To run the Derby Database Appliance, power on the VMware Player in your computer and select the Derby Database Appliance (Ubuntu file in Ubuntu_Derby folder) with the Player browser in your file system.
- The Linux Ubuntu 5.10 starts to load the kernel files and it takes 5 minutes aproximately. After, we have the first Gnome screen to select a user. Please, select the user icon that you wish with the mouse, type the password in the box and click Enter key ("guest" user has a beautiful beach icon and "tester" user has an astronaut icon), it takes other 3 minutes aproximately and now we are ready to use the Derby Database Appliance.
Note 1: The Derby Database Appliance has 3 users and each user has defined characteristics to use.
The "guest" user (username=guest / password=guest) is to learn basic tips of Linux Ubuntu 5.10.
The "tester" user (username=tester / password=tester) is to learn Java languaje and to test the Derby Database.
The "root" user (username=root / password=root) is the super user to manage Linux Ubuntu 5.10.
The "guest" user (username=guest / password=guest) is to learn basic tips of Linux Ubuntu 5.10.
The "tester" user (username=tester / password=tester) is to learn Java languaje and to test the Derby Database.
The "root" user (username=root / password=root) is the super user to manage Linux Ubuntu 5.10.
Note 2: The Derby Database Appliance is configured with NAT option to connect to the Internet. First, you need turn on your Internet connection in your computer. After, you need power on the Derby Database Appliance with the VMware Player. When you click on a link, the Firefox web browser starts. If you want start the Firefox directly, click on the blue world icon at the top of the Genome desktop. When you have the window of the browser, you ned to type the web address that you wish and click Enter key to browse on the Internet.
Note 3: When you want power off the Derby Database Appliance you can select in the Gnome desktop of the user System > Log Out > Select Shut down > Click on OK button. It takes 5 minutes to power off the virtual appliance.
4. DETAILED EXPLANATION IN FOUR SECTIONS.
I am going to explain more details of the Derby Database Appliance in the next four sections:
Section 1. How do you can use the Derby Database Appliance to learn basic tips to Linux Ubuntu 5.10?
Section 2. How do you can use the Derby Database Appliance to Java programming language?
Section 3. How do you can use the Derby Database Appliance to learn and to test the Derby database?
Section 4. Building a team with Linux Ubuntu 5.10 to test Derby Database.
Section 1. How do you can use the Derby Database Appliance to learn basic tips to Linux Ubuntu 5.10?
Section 2. How do you can use the Derby Database Appliance to Java programming language?
Section 3. How do you can use the Derby Database Appliance to learn and to test the Derby database?
Section 4. Building a team with Linux Ubuntu 5.10 to test Derby Database.
Section 1. How do you can use the Derby Database Appliance to learn basic tips to Linux Ubuntu 5.10?
1. Power on the VMware Player in your computer and select the Derby Database Appliance with the Player browser in your file system (Ubuntu file in Ubuntu_Derby folder.)
2. Start the Derby Database Appliance with the “guest” user (username=guest / password=guest)
3. In the desktop of the guest user there are 3 documents to learn basic tips to Linux Ubuntu 5.10. Please read the documents.
4. Please, start the Firefox web browser in the desktop and you can see the official documentation of Linux Ubuntu 5.10 (Brezzy Badger.) Here there is official documentation with interesting information such as Introduction, Quick Tour of Ubuntu, and Ubuntu Start Guide.
5. There is other readable site to know about Ubuntu community docs. Here you can see themes such as installing and using software, maintaining and administering your system, and hardware and drives.
Section 2. How do you can use the Derby Database Appliance to Java programming language?
1. Power on the VMware Player in your computer and select the Derby Database Appliance with the Player browser in your file system (Ubuntu file in Ubuntu_Derby folder.)
2. Start the Derby Database Appliance with the “tester” user (username=tester / password=tester)
3. In the desktop of the "tester" user there are 6 documents. Please read the documents 1, 2 and 3 to learn how to run a java program in Eclipse IDE.
4. Start Eclipse with click on Eclipse IDE icon on the desktop of "tester" user.
5. Please, read again the document 3. There is a detailed description about how to run a java program in Eclipse IDE. You can copy and paste code lines or you can type code lines in the editors to run a Java program in Eclipse IDE.
6. Please, start the Firefox web browser in the desktop and you can see the next websites about Java programming language:
- The Java Tutorial now updated to 5.0 of Sun Microsystems.
- What is Java in 2006 (3 articles) in O'Reilly website.
- An online Java preparation course in Massachusetts Institute of Technology. It is an excellent course with Lecture Notes, Labs, Projects, Study Materials and Related Resources.
- News, articles, books, blogs and other topics with relation to Java in the O'Reilly website.
- Find bugs in Java programs.
Section 3. How do you can use the Derby Database Appliance to learn and to test the Derby database?
1. Power on the VMware Player in your computer and select the Derby Database Appliance with the Player browser in your file system (Ubuntu file in Ubuntu_Derby folder.)
2. Start the Derby Database Appliance with the “tester” user (username=tester / password=tester)
3. In the desktop of the "tester" user there are 6 documents. Please read the documents 4 and 5 to learn how to run JDBC applications in Eclipse IDE with derby nature. Verify how to add derby nature to Eclipse IDE.
4. Please, start the Firefox web browser in the desktop and you can see the Apache Derby tutorial to learn themes such as Install software, ij Basics, Embedded Derby and Derby Network Server. Also, you can learn how to use Derby with other products like Apache Geronimo and Tomcat.
5. Start Eclipse with click on Eclipse IDE icon on the desktop of "tester" user.
6. Please, read again the document 3 to Derby Embedded mode and the document 4 to Derby Network Server mode. There are detailed descriptions about how to run JDBC applications in Eclipse IDE with derby nature. You can copy and paste code lines or you can type code lines in the editors to run JDBC applications in Eclipse IDE. I recommend you to make this activity in two stages. The first stage with Derby Embedded mode and the second stage with Derby Network Server mode. Each stage would be of 4 weeks learning, developing, and testing your own examples. Try to understand the theory about the 2 modes of Derby in the 2 previous links.
7. You can practice SQL statements with ij Tool. ij is an interactive SQL scripting tool that comes with Derby. It can be used with the Derby Embedded JDBC driver or with a client JDBC driver, such as the Derby Network Client.
8. Also, you can see the next web sites about JDBC applications:
- Introduction to JDBC (3 articles) in O'Reilly website.
- JDBC Technology Code Samples in Sun Microsystems.
Section 4. Building a team with Linux Ubuntu 5.10 to test Derby Database.
To build a team (note 4) you need VMware workstation 5.5 and install J2SE in 3 virtual machines.
1. Start Ubuntu_Derby Appliance with VMware workstation.
2. Install J2SE (note 5) in /opt of Ubuntu_Derby virtual machine.
3. Create 2 clones of the previous virtual machine with the names Ubuntu_Derby_server and Ubuntu_Derby_client (now, we have 3 virtual machines.)
4. Configure the environment variables (note 6) in bash.bashrc file of /etc for each one of the 3 virtual machines.
5. Create and set up with VMware workstation a team named Derby_team with Ubuntu_Derby_server and Ubuntu_Derby_client virtual machines to test Derby database in Network server mode.
6. With Ubuntu_Derby virtual machine ( the original appliance) we can run the Derby example programs to test embedded mode and network server mode (localhost.)
7. With Derby_team (server and client) we can run the Derby example programs to test network server mode.
Note 4: To know more about how to create a team and run Derby example programs, please see the Laboratory of Database with Cloudscape/Derby and VMware workstation 5.5. There, there is a detailed explanation using Windows 2000 like guest OS in the virtual machines. Now, the process is the same but with Linux Ubuntu 5.10 like guest OS in our 3 virtual machines.
Note 5: To install J2SE in Ubuntu 5.10, dowload the linux.bin version of the Sun website to /opt of the file system, open a Terminal in the desktop of Ubuntu and type:
$ sudo apt-get install java-package fakerootConsidering that the file name is j2se_linux.bin
$ fakeroot make-jpkg j2se_linux.bin
It generates a .deb file and supposing that it is j2se_linux.deb
$ sudo dpkg -i j2se_linux.deb
Now to activate j2se in Ubuntu 5.10, type:
$ sudo update-alternatives --config java
Select the number of j2se and click on Enter key.
To verify that j2se is present, type:
$ java -version
Note 6: To configure the environment variables of each virtual machine, you can see configure Embedded Derby and configure Derby Network Server. Note 7: This document was developed in 2006-2007.
Regards,
Cruz Castillo
