Skip to content

A collection of Karaf scripts and aliases to extend shell functionality and to show how to script the platfrom.

Notifications You must be signed in to change notification settings

paoloantinori/fuse_karaf_scripts

Repository files navigation

A collection of Karaf script to add functionality to JBoss Fuse Platform

To install:

# just source the raw version of the file

JBossFuse:karaf@root> idof jline
Command not found: idof

JBossFuse:karaf@root> source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/idof.karaf
((list -s | grep $args | tac) split '[ [ ]]' | head -n 2 | tail -n 1 | tac) trim

JBossFuse:karaf@root> idof jline
255

TOC:

  • lang_utils.karaf: Generic helper aliases for other scripts, sequences, counters, etc...
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/lang_utils.karaf
# sample usage
countdown 10
  • byteman.karaf: Enables Byteman packages in bootdelegation classloader via a fragment
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/byteman.karaf
  • container_create_options.karaf: Print Container Create Options
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/container_create_options.karaf
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/encrypt.karaf
  • features-dump.karaf: Prints the content of all the available features known to runtime
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/features-dump.karaf
# sample usage
features-dump 
  • find-pid.karaf: Search for a key in ConfigAdmin for specified Fabric container and tells you which profile includes it
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/find-pid.karaf
# sample usage
find-pid "org.ops4j.pax" "root" "1.0" 
  • get-version-profile-version.karaf: Tells you Fabric default version
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/get-version-profile-version.karaf
# sample usage
default-version
  • groovy.karaf: Installs Groovy shell as a command
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/groovy.karaf
# sample usage
install_groovy
groovy:me '3 * 3'
a = "var in karaf scope" ; groovy:me var_in_groovy "$a" "var_in_groovy * 3" # ex. showing forwarding of karaf vars to groovy context
  • idof.karaf: Return numerical id of a bundle given a Symbolic-Name
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/idof.karaf
# sample usage
idof jline
  • import-resources-6.1.karaf , import-resources-6.2.karafandimport-resources-6.3.karaf`: Import filesystem resources into a Fabric Profile
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/import-resources-6.1.karaf
# or
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/import-resources-6.2.karaf
# or
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/import-resources-6.3.karaf
# sample usage
import-resource "paolo" "1.0" "broker.xml" "/tmp/paolotest.xml"
  • log-levels.karaf: Prints the current level of all the known Loggers registered on the platform
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/log-levels.karaf
# sample usage
log-levels
  • log-entry.karaf: Adds a log entry into configured log file.
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/log-entry.karaf
# sample usage
log-entry this will be added to logs
  • log-set-multi.karaf: Set a log level to each logger containing keyword (ignore case) in its name.
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/log-set-multi.karaf
# sample usage
log-set-multi DEBUG jolokia curator
  • profiles-dump.karaf: Recursively prints the content of all Fabirc profiles
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/profiles-dump.karaf
# sample usage
profiles-dump
  • scr-deactivate-by-id.karaf: Deactivate a single SCR component, passing id
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/scr-deactivate-by-id.karaf
# sample usage
scr-deactivate-by-id 64
  • symbolic-names.karaf: Produces a list of only symbolic-names of installed bundles
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/symbolic-names.karaf
# sample usage
symbolic-names
  • startup-levels.karaf: Produces a list of startup levels of all bundles
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/startup-levels.karaf
# sample usage
startup-levels
  • wirings.karaf: Produces a list of OSGi import and export wirings
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/wirings.karaf
# sample usage
wirings 1
  • zk-enable-autopurge.karaf: Enable autopurge functionality for ZK
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/profiles-dump.karaf
# sample usage
# Needs to be manually invoked due to a timing issue with dynamic-import!!!
  • zk-identify-leader.karaf: Prints ZK network map
source http://cdn.rawgit.com/paoloantinori/fuse_karaf_scripts/master/zk-identify-leader.karaf
# sample usage
# zk-map

About

A collection of Karaf scripts and aliases to extend shell functionality and to show how to script the platfrom.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published