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/SimonNtz/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 !
- Initialization with benchmarking specs and product:
```
curl -H "Content-Type: application/json" -X POST /<server_ip>:81/SLA_INIT -d
'{
"specs_vm"={
"mapper":[4, 16000,100], ## example of instance size with :
"reducer":[1, 1000,100] ## cpu, ram, disk
},
"product_list"=[
"S1A_IW_GRDH_1SDV_20151226T182813_20151226T182838_009217_00D48F_5D5F"
],
"result" = '{
"s3_credentials":[
<host_base>,
<buket_id>,
<access_key>,
<secret_key>
]
}
}'
```
- Product generation with SLA:
```
curl -H "Content-Type: application/json" -X POST /<server_ip>:81/SLA_CLI -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_base>,
<buket_id>,
<access_key>,
<secret_key>
]
},
}'
```