Is this possible to deploy OSGI bundle into karaf container via script? - perl

I want to deploy the OSGI bundle into karaf container through script file. The script could be PERL or ANT. Here the steps to deploy it into the container.
karaf>ssh -p 8101 admin#localhost
Enter password :admin
karaf>osgi:install -s file:<location-file>
karaf>logout
I have tried via PERL script but unable to give password in script file itself.
Is there any alternative way to enter ssh console without password? Or Is this possible to deploy OSGI bundle via script?

There comes a client shell script, you should be able to pass a "shell script" to it via command line, so no need to use ssh since the client script already does connect to the karaf shell internally.
For scripting with Karaf you might also want to take a look at Karaf Documentation about scripting

Related

Rundeck - Execute ansible playbook on a remote ansible server

New in Rundeck
What i'm trying to achieve with rundeck is the following -
to let a windows user connect rundeck and execute predefined ansible playbooks that are located on a remote ansible server. Doing this will not require the user to connect the ansible server (i dont need to share password) and only approved user that can login to rundeck can run the scripts
Is it possible to install Rundeck on a windows machine and execute ansible scripts that are located on a remote ansible server?
Can i see the playbook output on rundeck UI?
If not, should I run rundeck on the local ansible server?
Can i have all the above using the community Rundeck version ?
By design Rundeck and Ansible must coexist in the same server to use the Ansible plugin but, you can dispatch Ansible commands (ansible-playbook) on remote servers using the command step.

How to display monitoring windows of Hawkular?

I am a beginner to Hawkular and struggling to display the Hawkular web ui. My OS is Windows 10 and Cassandra datastax-ddc-64bit-3.7.0 is installed successfully.
Both Wildfly 10 and hawkular-services-dist-0.23.0.Final are unzip in c driver.
This is my Hawkular installation process.
add user in Hawkular home folder <hawkular-services-dist-0.23.0.Final\bin>
add-user.bat -a -u username -p password -g read-write,read-only
execute standalone.bat in hawkular home folder <hawkular-services-dist-0.23.0.Final\bin>
standalone.bat
I download hawkular-wildfly-agent-installer file from Wildfly agent Installer link of welcome windows, localhost:8080
I execute jar command like below
java -jar hawkular-wildfly-agent-installer.jar —target-location=c:\wildfly-10.0.0.Final --username username —password password
And I start wildfly 10 with the following option in wildfly_home folder <c:\wildfly-10.0.0.Final\bin>
standalone.bat –Djboss.socket.binding.port-offset=100
These steps throw no exceptions. However I can not see any monitoring option display, only welcome window.
How can I display the Hawkular monitoring window?
There is no built-in GUI for showing metrics in Hawkular services. Hawkular exposes REST endpoints to fetch data, that you can directly use within an application of your own (they are detailed here: for Metrics, for Alerts). But there's also a couple of available tools to display metrics:
You can use Grafana with the Hawkular datasource plugin.
There's also HawkFX, a jruby client, but I'm not sure if it has been tested on windows.
And an Android client, though I never used it myself

How do I install a windows service that runs as an administrator without GUI?

If we assume that a service must be run as administrator, is it possible to install it using a command line (sc.exe, powershell - all is available)?
Bonus: Is it possible to do without providing password?
sc.exe config 'servicename-notdisplayname' obj='\Administrator' password='secret'
Still no luck avoiding password, as it's required when starting the service.

Spring XD - Unable to undeploy & destroy stream through --cmdfile option

Today i have started automating certain Spring-XD tasks like, stream creation, deployment, and undeploying the same.
For this, all my undeploy and destroy commands sit in one file, but when i run the following
$xd-shell --cmdfile auto_cleanup_14032016_235706.txt
I'm getting the following output:
WARNING: Command 'stream destroy --name ingestion_14032016_235706_<>' was found but is not currently available (type 'help' then ENTER to learn about this command)
But When i run the same command inside the interactive shell xd-shell -- It seems to work fine. :(
You will notice this Warning when xd-shell fails to connect to Spring XD admin. Unless specified xd-shell assumes the admin server to be on localhost.
Add below statement to the top of your cmdfile.
admin config server http://spring-xd-admin-server:9393
Also provide the credentials to spring xd admin if required.

How can I specify run.bat options when running JBoss as a service?

In Windows Server 2008 R2, I can run JBoss successfully from the command line specifying options suchs as "-b 0.0.0.0". However, I want to run JBoss as a Windows service. I understand that I run /Path/To/JBoss/bin/service.bat install from the command line and this basically runs the start.bat whenever the computer starts. How do I configure the service to start with the command line arguments of -b 0.0.0.0?
Possible duplicate of How can I bind a JBoss AS 6 running as service to 0.0.0.0?
You could just hardcode -b 0.0.0.0 inside run.bat.
BTW, consider using Java Service Wrapper or YAJSW as RunJBossAsAServiceOnWindows wiki suggests. It allows to specify various service params in config.