0.01
No commit activity in last 3 years
No release in over 3 years
Capistrano functions for communicating with karaf
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

capistrano-karaf

Functions to use karaf in capistrano.

Opensshproxy

As the ssh server in karaf isn't really reliable, i've created a custom backend for SSHKit to connect to the ssh server on the host and connect to localhost. It will also retry commands 3 times in case of a command error.

To use the backend i recommend following configuration:

In your Capistrano config file add the following:

```
require 'capistrano-karaf/backends/opensshproxy'        
set :sshkit_backend, Capistrano_karaf::Backend::SshProxy
```

This configures the correct backend. The backend is configurable with the following options:

  • :karaf_role the symbol of the class for karaf commands. Defaults to :karaf
  • :karaf_username the username to connect to karaf. Defaults to "smx"
  • :karaf_password the password to connect to karaf. Defaults to "smx"
  • :karaf_port the port number of the karaf ssh server. Defaults to 8101

For example:

```
server 'esb-a-test.sensors.elex.be',
    user: 'jenkins',
    roles: [:esb, :cfengine_update]

server 'esb-b-test.sensors.elex.be',
    user: 'jenkins',
    roles: [:esb, :cfengine_update]

server '10.32.16.22',
    user: 'jenkins',
    roles: [:karaf]
```

After those changes capistrano should use the backend for the configured targets.