git clone https://@opensourceprojects.eu/git/p/c2net/cpl/paas4sla/sdk/code c2net-cpl-paas4sla-sdk-code
Read Me
:ecloud: pass:q[*_ECloud_*]
= Toolbox
== Intro
This folder provides several tools required for developing and facilitating
the development of ECloud components.
== Requirements
In order to use those tools the following software has to be installed in your
working machine (Ubuntu 16.04 highly recommended):
* Docker (version 1.10.3)
* Nodejs (version 4.3.2)
* CoffeeScript
In the *Quick Start Guide* you have information about how to install those
requirements.
== Installing tool dependencies
Once the requirements have been installed you can proceed with the installation
of the tools. For doing so, you have to execute:
_Execute_:
./install-dependencies.sh
You can check in the dependencies-installation.log file information about this
procedure.
== Manifest validator
The `manifest-validator` tool checks the correctness (from a *syntactic* point
of view) of your manifest files.
== manifest-validator.sh
This validator checks if a set of `JSON` manifest file fulfills the {ecloud} manifest
specification. More specifically, it checks that is *syntactically* correct.
As argument you have to pass the path to the folder where are located the manifest files.
Those manifests have to be named `Manifest.json`. The script processess folders recursively
from the root folder path you pass.
_Usage_:
./manifest-validator.sh <list of paths to root folder with manifest files>
== Runtime tools
A generic `runtime-tool` is provided, which offers several commands for
manipulating ECloud runtimes locally.
=== runtime-tool.sh install
This tool downloads a runtime Docker image from {ecloud}'s runtime repository and
loads it using a local Docker daemon, if it is available.
_Usage_:
./runtime-tool.sh install -n <runtime-name>
_Example_:
./runtime-tool.sh install -n eslap://eslap.cloud/runtime/native/1_0_0
=== runtime-tool.sh bundle
Exports a locally available Docker image and generates a ready-to-register
runtime bundle with the image and the associated manifest.
NOTE: Local image tags will be ignored and only used to locate the image, since
the generated bundle will contain a properly tagged Docker image matching the
runtime name specified in the runtime manifest, as expected by {ecloud}.
_Usage_:
runtime-tool.sh bundle -i <image-id|image-name> -m <path-to-runtime-manifest>
_Example_:
runtime-tool.sh bundle -i my-nodejs-custom -m ./my-manifest.json
where the runtime name specified in the manifest is, for example:
[source, json]
....
{
"spec": "http://eslap.cloud/manifest/runtime/1_0_0",
"name": "eslap://some.domain/runtime/nodejs-libxyz/1_0_0",
"derived" : {
"from" : "eslap://eslap.cloud/runtime/native/1_0_0"
},
"sourcedir": "/eslap/component",
"entrypoint": "/eslap/runtime-agent/scripts/start-runtime-agent.sh",
"metadata": {
"description": "My custom runtime",
"os_name": "Ubuntu",
"os_version": "14.04",
"os_release": "Trusty Tahr",
"software": {
"libxyz": {
"version": "1.2.3"
}
}
}
}
....
will generate the runtime bundle
with a Docker image tagged as `some.domain/runtime/nodejs-libxyz:1_0_0`.