Deploy Talend ESB Service

In my previous post Talend ESB RESTful Service, I have covered how to create a RESTful Service in Talend ESB

This post will cover deploying a Talend ESB RESTful service as a OSGI Bundle for ESB in Talend runtime environment on Ubuntu server.

My Ubuntu server is running and I can connect using ssh or send files using filezilla, Talend ESB require JDK 7 which can be installed by running below command.

sudo apt-get install openjdk-7-jdk

Environment variable JAVA_HOME must be set because Talend Runtime will first look out for Java installation.

Execute below command to find out alternative Java path.

sudo update-alternatives --config java

Select path of preferred installation and update environment file by adding below code.

sudo vi /etc/environment
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"

Reload file and Test

source /etc/environment
echo $JAVA_HOME

I am using FileZilla to send Runtime_ESBSE to Ubuntu server after compressing it, but server directory must have required permission to copy Runtime_ESBSE.zip file.

Screenshot 2016-01-24 03.15.23

Use chmod to give sufficient permissions.

sudo chmod 777 -R etl

Screenshot 2016-02-10 01.38.35.png

Install unzip to extract Runtime_ESBSE on server.

sudo apt-get update
sudo apt-get install unzip
unzip Runtime_ESBSE.zip
rm Runtime_ESBSE.zip

Execute trun command to launch Runtime environment. 

cd Runtime_ESBSE/container/bin
./trun

Screenshot 2016-02-10 02.23.15.png

We are ready to deploy Talend ESB RESTful Service MyFirstAPI job to Talend Runtime environment for that we must build job from studio as OSGI Bundle for ESB

Screenshot 2016-02-10 02.31.40

Select archive file path, Build type as OSGI Bundle For ESB and click Finish

Screenshot 2016-02-10 02.33.23

Use FileZila to upload file path in Runtime_ESBSE/container/deploy folder

Screenshot 2016-02-10 02.36.55

On Runtime container use list command to check status of your service.

karaf@trun()> list

we can also verify by hitting API endpoint using CURL

curl -i -H "Accept: application/json" 
-H "Content-Type: application/json" 
http://localhost:8088/talend/valid

Screenshot 2016-02-10 02.45.41.png

Now we are able to deploy ESB job as service in Talend Runtime container using apache karaf but to make it run as a operating system service we must install Karaf Wrapper feature.

Installing the wrapper

  1. Browse to the container/bin folder of the Talend Runtime installation directory, then launch the container by executing the trun file as a root user
  2. To install the wrapper feature, simply type:
    karaf@trun()> feature:install wrapper

    Once installed, wrapper feature will provide wrapper:install new command in the trun, which allows you to install Talend Runtime as a service.

  3. To register the container as a service in automatic start mode, simply type:
    karaf@trun()> wrapper:install -s AUTO_START -n talend 
    -d Talend -D "Talend ESB Runtime Service"

    To install the service:
    $ ln -s /dev/etl/talend/Runtime_ESBSE/container/bin/talend-service /etc/init.d/

    To start the service when the machine is rebooted:
    $ update-rc.d talend-service defaults

    To disable starting the service when the machine is rebooted:
    $ update-rc.d -f talend-service remove

    To start the service:
    $ /etc/init.d/talend-service start

    To stop the service:
    $ /etc/init.d/talend-service stop

    To uninstall the service :
    $ rm /etc/init.d/talend-service

Advertisements

2 Comments Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s