Hi all,
I’m trying to install Talend ESB 6.3.1 using Ansible. This works up to a point.
The last few steps are causing me the grief.
Once TESB has been installed there are manual steps to complete the installation as below. I have tried using expect/responses/
- name: start talend ESB trun
become: yes
become_user: ‘{{ talend_user }}’
expect:
command: /bin/sh {{ talend_software_dir }}/{{ talend_esb_dir }}/esb/container/bin/trun
timeout: 240
responses:
Question: - ‘feature:install war’
- ‘feature:install wrapper’
- ‘wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER -d Talend-ESB-Container -D “Talend ESB Container Service”’
Error thrown
TASK [start talend ESB trun] ***********************************************************************************************************************************
fatal: [10.138.52.101]: FAILED! => {“changed”: true, “cmd”: “/bin/sh /data/talend/talendesb/esb/container/bin/trun”, “delta”: “0:04:00.561246”, “end”: “2017-09-14 09:37:57.722055”, “failed”: true, “msg”: “command exceeded timeout”, “rc”: null, “start”: “2017-09-14 09:33:57.160809”, “stdout”: “trun: JAVA_HOME not set; results may vary\r\n\u001b[33m ______ __ __ \u001b[0m\r\n\u001b[33m /_ / / /_ ___ / / \u001b[0m\r\n\u001b[33m / / / _ / / -_) _ \\/ _ / \u001b[0m\r\n\u001b[33m /_/ \\_,_/_/\\__/_//_/\\_,_/ \u001b[0m\r\n (version 6.3.1) \r\n\r\nHit '\u001b[1m<tab>\u001b[0m' for a list of available commands\r\nand '\u001b[1m[cmd] --help\u001b[0m' for help on a specific command.\r\nHit '\u001b[1m<ctrl-d>\u001b[0m' or '\u001b[1msystem:shutdown\u001b[0m' to shutdown the TRUN.\r\n\r\n\u001b[1mkaraf\u001b[0m@trun()> ", "stdout_lines": ["trun: JAVA_HOME not set; results may vary", "\u001b[33m ______ __ __ \u001b[0m", "\u001b[33m /_ __/__ _/ /__ ___ ___/ / \u001b[0m", "\u001b[33m / / / _
/ / -) _ \/ _ / \u001b[0m", "\u001b[33m // \,//\__////\,/ \u001b[0m”, " (version 6.3.1) ", “”, “Hit ‘\u001b[1m\u001b[0m’ for a list of available commands”, “and ‘\u001b[1m[cmd] --help\u001b[0m’ for help on a specific command.”, “Hit ‘\u001b[1m\u001b[0m’ or ‘\u001b[1msystem:shutdown\u001b[0m’ to shutdown the TRUN.”, “”, "\u001b[1mkaraf\u001b[0m@trun()> "]}
to retry, use: --limit @/home/pbirksmith/Workspace/app-automation/talend_esb_install.retry
To run these steps manually I need to follow the following
- Run trun command
/bin/sh /data/talend/talendesb/esb/container/bin/trun
This starts up a shell as below
[talenduser@talend-jobserver-1 bin]$ /bin/sh /data/talend/talendesb/esb/container/bin/trun
trun: JAVA_HOME not set; results may vary
/_ / / /_ ___ / /
/ / / _ `/ / -) _ / _ /
// _,//_////_,_/
(version 6.3.1)
Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or ‘system:shutdown’ to shutdown the TRUN.
karaf@trun()>
At this point I need to run commands that install specific features and services
E.g.
karaf@trun()> feature:install war
karaf@trun()> feature:install wrapper
karaf@trun()> feature:install webconsole
karaf@trun()> wrapper:install -s AUTO_START -n TALEND-ESB-CONTAINER -d Talend-ESB-Container -D “Talend ESB Container Service”
Creating file: /data/talend/talendesb/esb/container/bin/TALEND-ESB-CONTAINER-wrapper
Creating file: /data/talend/talendesb/esb/container/bin/TALEND-ESB-CONTAINER-service
Creating file: /data/talend/talendesb/esb/container/bin/TALEND-ESB-CONTAINER.service
Creating file: /data/talend/talendesb/esb/container/etc/TALEND-ESB-CONTAINER-wrapper.conf
Creating missing directory: /data/talend/talendesb/esb/container/lib/wrapper
Creating file: /data/talend/talendesb/esb/container/lib/wrapper/libwrapper.so
Creating file: /data/talend/talendesb/esb/container/lib/wrapper/karaf-wrapper.jar
Creating file: /data/talend/talendesb/esb/container/lib/wrapper/karaf-wrapper-main.jar
Setup complete. You may wish to tweak the JVM properties in the wrapper configuration file:
/data/talend/talendesb/esb/container/etc/TALEND-ESB-CONTAINER-wrapper.conf
before installing and starting the service.
RedHat/Fedora/CentOS Linux system detected (SystemV):
To install the service:
$ ln -s /data/talend/talendesb/esb/container/bin/TALEND-ESB-CONTAINER-service /etc/init.d/
$ chkconfig TALEND-ESB-CONTAINER-service --add
To start the service when the machine is rebooted:
$ chkconfig TALEND-ESB-CONTAINER-service on
To disable starting the service when the machine is rebooted:
$ chkconfig TALEND-ESB-CONTAINER-service off
To start the service:
$ service TALEND-ESB-CONTAINER-service start
To stop the service:
$ service TALEND-ESB-CONTAINER-service stop
To uninstall the service :
$ chkconfig TALEND-ESB-CONTAINER-service --del
$ rm /etc/init.d/TALEND-ESB-CONTAINER-service
Any help on this would be greatly appreciated.
Cheers
Peter Birksmith