Terminal View
In response of the great interest related to Shellshock, Dirigible provided several possibilities to use low level OS commands.
After going to the well known trial instance at http://trial.dirigible.io from the menu, go to Window->Show View->Other open the Other tree-node and choose Terminal.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
You can use the line at the bottom to enter a shell command. It is obviously dependent on the operating system, hence the format is for:
Linux: bash -c "ps -ef|grep java"
Windows: cmd /c "dir"
Image may be NSFW.
Clik here to view.
There is a default time-out limit once reached the execution of the command will be stopped. If you want to change this limit go to Window->Preferences->Terminal
Image may be NSFW.
Clik here to view.
Command Services
When the initial excitement from playing with the first few shell commands you remember passes, probably you will ask: Why the heck I need a terminal view in a cloud toolkit, which proclaims the In-System Programming and Content-Centric concepts? Isn't it everything text based artifacts contained in a repository and executed by the built-in containers? Why I need OS access?
Yes. You do not need it... unless something exceptional happens or you need to integrate in your cloud application exactly a shell command. One prominent use case could be to integrate a new yet cool framework, which currently is not and will not be soon a part of Dirigible standard delivery.
To do this, you can create a Scripting Service following the standard way by choosing the "Terminal Command" template.
Image may be NSFW.
Clik here to view.
The default template of a command returns the system information and has Linux and Windows variants:
{ "description":"test command printing the os name and version", "contentType":"plain/text", "useContent":"false", "workDir":".", "commands": [ { "osName": "Linux", "command":"bash -c \"cat /proc/version\"" } , { "osName": "Windows", "command":"cmd /c \"systeminfo\"" } ], "envAdd": [ { "name":"java.env1", "value":"toBeAdded" } ], "envRemove": [ { "name":"java.env2" } ] }
Once you Activate it, you can immediately test - click on it and see the result in the preview window:
Image may be NSFW.
Clik here to view.
As you can see the terminal commands follow the same paradigm as the other scripting services as well as have remotely accessible endpoints constructed by the well known pattern.
http(s)://[host]:[port]/dirigible/command/[project_name]/[command_name].command
Do you have already a plan for your next "native" service?
Enjoy!
References:
The project site: http://www.dirigible.io
The source code is available at GitHub - http://github.com/SAP/cloud-dirigible
Forum: http://forum.dirigible.io
Twitter: https://twitter.com/dirigible_io
Youtube: https://www.youtube.com/channel/UCYnsiVQ0M9iQLqP5DXCLMBA/
Help: http://help.dirigible.io
Samples: http://samples.dirigible.io
Google Group: https://plus.google.com/111171361109860650442/posts
Blog: http://dirigible-logbook.blogspot.com/
Dirigible on SAP HANA Cloud Platform
Dirigible - Extensions vs Configurations