Forum archive
GlassFish v3 tklpatch
Update: I've built the basic outline of a GlassFish v3 appliance with tklpatch. While already operational, it could certainly do with some improvements. The GlassFish tklpatch is now finished! Note that GlassFish requires a minimum of 1GB of RAM (2GB recommended), so make sure to size your virtual machines accordingly.
Because GlassFish v3 and the latest Sun JDK 6 are not available via the standard repositories, my tklpatch uses a manual installation. The resulting ISO is 275MB, which is a considerable jump on the standard TurnKey Core at 112MB. The attached tklpatch (glassfish.tar) is not a complete tklpatch, please run the glassfish.sh script provided in the TAR file and read the instructions below.
Firstly we are going to set ourselves up with a development environment. Secondly we will build our appliance.
A) Installing the development environment
- Download the TurnKey Core edition from /
- Install in VirtualBox with 512MB of RAM on a >=5GB disk with two network adapters, a HostOnly (to allow access from host) and a NAT (to allow internet access).
- Run the virtual machine using the TurnKey Core ISO
- Install to Hard Disk
- Select the install to hard disk option
- Use guided partitioning
- Write changes to disks
- Set root password
- Unmount ISO, restart
B) Download and install development software
- SSH into the turnkey client
- Update the repository
root@core:~# apt-get update
- Install TKLPatch
root@core:~# apt-get install tklpatch
C) Create a Glassfish v3 Appliance
Note: We need to install Sun JDK manually to get the latest version as required by GlassFish. We also need to install GlassFish manually as it isn't in the repositories (yet).
- Download the Sun Java SE JDK 6u18 from the internet. Choose the *.bin (non-RPM) download from http://java.sun.com/javase/downloads/index.jsp
- Download Glassfish v3 Final full (not web profile) from https://glassfish.dev.java.net/downloads/v3-final.html
- Download the attached glassfish.tar file
- Use SCP over SSH (FileZilla) to copy the three downloaded files above into the virtual machine. Also copy over the TurnKeyLinux Core ISO.
- Extract the tar file
root@core:~# tar -xvf glassfish.tar
- Run the glassfish.sh script to build your ISO
root@core:~# ./glassfish.sh
- Test in a virtual machine!
That's it! Some notes:
- The application server is automatically started by a script at /etc/init.d/glassfish which has configuration files in the /home/glassfish/autodomains directory.
- The application server runs under the glassfish user not as root.
- The default passwords provided by GlassFish are used.
BTW, I created an entry of glassfish in the TKLPatch section of the development wiki linking here, feel free to update it as you see fit.