This repo consists of a SAR product generation infrastructure designed for SLA enforcement. It is packaged in an Nuvla application. Its image processing job are done via the call of a relative app namely SAR_app. The main run starts an ELK stack and an Flask REST server which is the interface for job request.
In order to successfully execute the application, you should have:
-
An account on Nuvla. Follow this link where you'll find how to create the account.
-
Cloud credentials added in your Nuvla user profile
-
Python
>=2.6 and <3
and python package managerpip
installed. Usually can be installed withsudo easy_install pip
. -
SlipStream python ss-client installed:
pip install slipstream-client
.
-
Clone this repository with
$ git clone https://github.com/SixSq/SAR-framework.git
-
Set the environment variables
$ export SLIPSTREAM_USERNAME=<nuv.la username> $ export SLIPSTREAM_PASSWORD=<nuv.la password>
and run the SAR framework on Nuvla with
$ ./SAR_server_run.sh
-
Wait for the 'ready' state
-
Recover the server's ip and start working with it !
- Initialization with benchmarking specs and product:
```
curl -H "Content-Type: application/json" -X POST http://<server_ip>/dmm/init -d
'{
"specs_vm": {
"mapper": [4, 16000, 100],
"reducer": [1, 1000, 100]
},
"product_list": [
"S1A_IW_GRDH_1SDV_20151226T182813_20151226T182838_009217_00D48F_5D5F",
"S1A_IW_GRDH_1SDV_20160424T182813_20160424T182838_010967_010769_AA98"
],
"result": {
"s3_credentials": {
"host": "<s3 endpoint>",
"bucket": "<bucket name>",
"key": "xxx",
"secret": "yyy"}}
}
}'
```
- Product generation with SLA:
```
curl -H "Content-Type: application/json" -X POST http://<server_ip>/dmm/run -d
'{
"SLA":{
"requirements": [
<Time bound>,
<OFFER>], # still hardcoded to "CannedOffer_1"
"product_list": [
"S1A_IW_GRDH_1SDV_20151226T182813_20151226T182838_009217_00D48F_5D5F",
"S1A_IW_GRDH_1SDV_20160424T182813_20160424T182838_010967_010769_AA98"
]
},
"result": {
"s3_credentials": {
"host": "<s3 endpoint>",
"bucket": "<bucket name>",
"key": "xxx",
"secret": "yyy"}}
}'
```