In previous posts, I showed how to use Oracle's SQL*Developer as part of a CI (Continuous Integration) server. Since I use AWS (Amazon Web Services) to host my development servers, I had to find a way to run SQL*Developer on AWS. One conflict I discovered was that SQL*Developer requires a GUI (Graphical User Interface) and I couldn't find an AWS server that had a GUI.
After reviewing and testing many alternatives, I settled on Real VNC running on Ubuntu with LXDE. Real VNC has a free Windows viewer and a free Android viewer. It worked the first time I installed it and has worked flawlessly since. Because I am using an Amazon VPC with a VPN sever, I did not use the encryption capability of the VNC server.
LXDE is a lightweight X-Windows desktop environment. It has a small foot print and doesn't spawn many processes. This was important for ease of installation and efficient execution on the Ubuntu server. LXDE is also conveniently bundled into an Ubuntu version called Lubuntu.
1) Create an AWS instance using an "Ubuntu Server 14.04" AMI. The settings for this will vary, depending on your deployment environment in AWS. I found that a "t2.small" can run my entire build server, including VNC, SQL*Developer, Jenkins, and Oracle database. After creating it, you should be able to "ssh" to the new instance.
2) Add Ubuntu Java Repository and get the latest updates
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get dist-upgrade
(Select "install the package maintainer's version")
3) Install packages for LXDE (lubuntu-core), VNC (vnc4server), Firefox (firefox), GUI editor (leafpad), and packages needed to install OracleXE (allien, libaio1, unixodbc)
sudo apt-get install lubuntu-core vnc4server firefox leafpad alien libaio1 unixodbc
4) To setup VNC, I used this tutorial from "HowtoForge"
5) I was able to setup an Oracle XE database using this blog from Mike Heeren
6) Using a similar approach as Mike Heeren, I setup SQL*Developer. I started by using Firefox to download SQL*Developer into the "Downloads" directory. This implies you are successfully running a VNC client connection to the server on Amazon.
7) Convert and install SQL*Developer
sudo alien --scripts -d sqldeveloper-18.104.22.168.84-1.noarch.rpm
sudo dpkg --install sqldeveloper_22.214.171.124.84-2_all.deb
8) Run SQL*Developer for the first time
sudo mkdir /home/.sqldeveloper/
(Java Path is /usr/lib/jvm/java-7-oracle)
9) Then, to run SQL*Developer without "sudo":
sudo chown ubuntu .sqldeveloper
10) At this point, SQL*Developer should run from the "Programming" menu in LXDE. (Click the CRT icon in the lower left to activate the menu.)
11) Because of a bug in the distribution, the "sdcli" script needs to be updated before SQL*Developer will run in command line mode:
(Change . "sqldeveloper" to . "/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper")
12) To setup Jenkins, I used this guide from Kohsuke Kawaquchi himself:
Congratulations. You should have a complete Lubuntu build server running on AWS.
An example Ubuntu AMI:
More information on LXDE:
An example Amazon VPC scenario:
An example VPN AMI: