Teiid Komodo is now part of the Syndesis project. This works a component inside Syndesis to provide data integration capabilities. This document is for developers who like to setup a workspace locally for testing or for development purposes.
Prerquisites for Developers
- Install JDK 1.8 or higher
- Install maven 3.2+
- Install Go Lang These instructions are for Linux, find similar for your platform.
- Install minishift 3.9+; which is available for all the major operating systems (Linux, OS X and Windows). The following examples assume that you have Minishift installed and can be called with minishift from the command line. So, minishift is supposed to be available in your search path, i.e. located in a directory contained in your $PATH environment variable (Linux, macOS) or in a directory from your system path (Windows)
- Clone the Syndesis libraries. (Note this is Ramesh's branch, until code is merged into Syndesis repo, we would need to use this. Once the code is merged we can use Syndesis repo directly
git clone --branch=teiid-syndesis email@example.com:rareddy/syndesis.git
- Clone Teiid Komodo Repository
git clone firstname.lastname@example.org:teiid/teiid-komodo.git
- Now follow below script
cd syndesis # install syndesis in minishift tools/bin/syndesis minishift --install --project syndesis --vm-driver virtualbox # wait until the Minishift is started and you logged using oc login, then proceed with next step # Build syndesis templates with Komodo images install/generator/run.sh # build the Syndesis operrator project to pick up the new template with Komodo Image tools/bin/syndesis build -m operator -i # invoke the operator with new template, replace will replace previous duplicate ones oc replace -f install/operator/deploy/syndesis.yml
At this point Syndesis should be running with
komodo-server in it, now if you are working on any changes for development in komodo, make you code edits, once done execute below
cd teiid-komodo mvn install -Pimage [-DskipTests]
Once the above build is done, it will replace the existing
komodo-server instance with lastest one that has been just built with your latest changes.
By default, the built images are deployed with java virtual machine debugging enabled, using port 5005. This allows for developers to remotely connect to the running vdb-builder using an IDE like Eclipse.
The port 5005 is not offered by any of the routes, although a route can be setup if preferred. A quick alternative is to port-forward the port to the localhost using the following command:
oc port-forward komodo-server-x-yyyy 5005:5005
where vdb-builder-x-yyyy is the latest deployed
If using Eclipse, open the Debugging Configurations window and create a new Remote Java Application configuration. Setting the host to localhost and the port to 5005, the configuration can then be executed. The debug perspective will indicate the connection has been successfully undertaken and all breakpoints will be fired by the vdb-builder image.
DNS Resolution in Minishift
A Minishift VM creates its own network adapter for connecting to the host OS which in turn allows full network connectivity. Resolving of DNS hostnames is performed using the same system. Sometimes it is possible for the Minishift instance to be started without full DNS resolution being available. In this case, hostnames, such as 'archive.apache.org', fail to resolve causing the s2i build of teiid-komodo to fail. Restarting the minishift instance can rectify this.
In Minishift, the VM is unable to see hostnames documented in the host OS' /etc/hosts file yet it is possible to resolve IP addresses. Only if the hostnames are inserted in the VM's own /etc/hosts will they be resolved correctly.
Openshift Storage Space
Openshift and Docker are responsible for generating a significant amount of content which can fill up HDD space, including docker images and persistent volumes. If space becomes too low then errors can start to appear. Cleaning up docker images in Minishift can require secure-shell into the VM then manually deleting the images using the native docker commands. Likewise, persistent volumes can require manually deletion of their directories.
Memory and Storage Capacity Variables
By default, Minishift starts with 2GB of memory and 20GB of storage. This can quickly prove insufficient for developing teiid-komodo. It is advisable to increase these values, eg.
minishift config set disk-size 60GB
minishift config set memory 6GB