The OSCM shell controller is a script based framework adapter for integrating OSCM with any type of cloud.
It is flexibly usable, covering any cases of instance and application provisioning. This controller allows for modifying, provisioning and deprovisioning of cloud applications and instances, executing service operations, assigning and deassigning users and querying detailed status information. The latter is accessible for privileged users in the subscription details view in the marketplace portal.
Furthermore, the OSCM shell controller supports for gathering event data of cloud service consumption. This enables the supplier to charge back the usage costs by using respective event price models.
This quick start guide is intended to help you getting started with OSCM shell controller. This controller is deployed together with OSCM. Instructions for installing OSCM can be found in the readme of the oscm-deployer.
The OSCM shell controller is based on shell script execution. The script files are expected in a shared folder on the docker host and mounted in the oscm-app container. Each script has to be defined with a technical service parameter in order to connect it with the controller. Check-out this description for more details about how to mount the scripts into the oscm-app container.
The controller provides for logging detailed information of scripts execution. The logfile is located inside oscm-app container, and can be inspected by checking /opt/apache-tomee/logs/app-shell.log
file.
The required format is simple and semi-structured based on JSON. Following rules apply:
accessInfo
and output
, both supporting HTML and plain text. output
is expected in response of status script. eventId
and multiplier
field according the technical service definition. {
"status": "ok",
"message": "Script executed successfully",
"data": {
"output": "Custom output for the status tab",
"accessInfo": "<a href=\"http://accessInfo.url\">http://accessInfo.url </a>"
},
"usageData": [
{
"eventId": "EVENT_DISK_GIGABYTE_HOURS",
"multiplier": 100
},
{
"eventId": "EVENT_CPU_HOURS",
"multiplier": 300
},
{
"eventId": "EVENT_RAM_MEGABYTE_HOURS",
"multiplier": 250
}
]
}
More information on possible script usage and expected format can be found in these examples.
Enjoy it!