In this article we will understand how to use IntelliJ to connect debugger to a running Eucalyptus cloud and debug certain cloud operations inside the IDE.
One of the many benefit/use of such debugger is that one could put breakpoints at several places in the code and step over the line of code while watching the debug output and sometime also watching variables for certain values.
Eucalyptus developer who develop code for the project uses these feature to test and fix their code. It also help other open source enthusiast to write bug fixes and code features for the software.
a) Reader should have sufficient experience in reading JAVA and should have a programming background to understand the logical flow of code.
b) IntelliJ IDE 13
c) Eucalyptus 3.4.2 cloud
e) JAVA JDK 1.7.x
f) gradle 1.11
1) Install IntelliJ IDE 13 on your system and configure it with JAVA JDK 1.7.x
2) Configure Eucalyptus CLC to accept debugger connection by modifying CLOUD_OPTS in /etc/eucalyptus/eucalyptus.conf like this:
After modifying the value please restart the CLC service for the changes to take affect:
service eucalyptus-cloud restart
The debug port would be 5005 and same can be verified by following command on CLC:
netstat -tulpn | grep 5005
3) On your system install git and fork the eucalyptus repository by following instructions here:
Now clone the local eucalyptus repository to your system using following command:
git clone https://github.com/jeevanullas/eucalyptus.git --recursive
4) In order to use IntelliJ IDE with the eucalyptus we would need to build IntelliJ project files using gradle. Instructions listed in the following google group thread would help one to build these files
For ease of understanding following steps needs to be followed after downloading build.gradle and settings.gradle in your home directory:
4.1) Navigate inside the directory eucalyptus that gets created after step (3) and checkout the 3.4. master branch.
git checkout origin/maint/3.4/master
4.2) Now navigate inside the clc/ directory and clone the cloud-libs repository. This is a must do step in order to build the clc project
git clone --depth=1 -b testing git://github.com/eucalyptus/