Enter a Shipmaster and a Bosun MASTER BOSUN: Here, Master ...
FIWARE Policy Manager - Bosun
-
Upload
guillermo-jimenez-prieto -
Category
Software
-
view
247 -
download
0
Transcript of FIWARE Policy Manager - Bosun
Policy Manager: Managing facts, rules and actionsGuillermo Jiménez, Fernando LópezIMDEA // TIDCloud Chapter. [email protected], @[email protected], @flopezaguilar
TECHNOLOGIESPythonDjango
Pyclips frameworkClips
Redis
RabbitMQMySQL
POLICIES• Policy Manager provides different policies to get VM
automation in the cloud.
• It could be uses to get notification about different facts and actions.
• Those facts and actions are executed when certain conditions are taking place.
EXAMPLE POLICIES• Data resources collected from the virtual machines.
• CPU, Memory, Hard Disk and network usage.
• User could define some conditions and actions to be performed.
• This allows infinite possibilities: • load balancing policies moving VMs to nodes with less utilization,
• increase resources or nodes number
• availability policies (restart VM) when it crashes.
• generate this VM in different nodes, etc.
FEATURES
Policy Manager implements a REST API to manage rules.
User could write his own rules.
Rules are written in a simple human language: JSON.
User can implement his own actions from a notification.
Api-Agent
Rules Engine
CLIENTFiware-cloto
Fiware-cloto
Nova, Murano, etc
OpenStack ServicesUser Server
Actions
Api-Agent
Rules Engine
Fact-Gen
(defRule)
store(Conditions and actions)
(actions)
get(Conditions, actions)
(Facts)
(AverageFacts)
suscribe(URL, serverId)
PUT ContextData(CPU, RAM, HDD, Network?)
External Service
START POST(conditions, actions, serverId)
Fiware-Facts
Redis
store(AverageFacts)
Fiware-cloto
POST(subscriptions)
RabbitMQ
EnvironmentManager
get(AverageFacts)
Environments *
(actions)
eval(AverageFacts, Conditions, actions)
(conditions, actions)
(actions)
Context Broker
POLICY MANAGER RULESDefinition of a rule:
{ "action": { "actionName": "notify-scale", "operation": "scaleUp" }, "name": "AlertCPU", "condition": { "cpu": { "value": 98.3, "operand": "greater" }, "mem": { "value": 95, "operand": "greater equal" }, "hdd": { "value": 95, "operand": "greater equal" }, "net": { "value": 95, "operand": "greater equal" } }}
POLICY API INFORMATIONREST API
POLICY API AUTHENTICATION
Each request requires credentials and require a header containing a valid Token from OpenStack keystone.
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
POLICY API OPERATIONS• General Operations.
• Get the information of the API.• Update the window size.
• Elasticity rules.• Create a new elasticity rule.• Update an elasticity rule. • Delete an elasticity rule. Get an elasticity
rule.
• Servers. Get the list of all servers' rules.• Get the list of all rules of a server.• Update the context of a server.
• Subscription to rules.• Create a new subscription.• Delete a subscription.• Get a subscription.
Kind of actionsnotify-scale
• scaleUp
• scaleDown
notify-email
"action": {
"actionName": "notify-scale",
"operation": "scaleUp"
},
"action": {
"actionName": "notify-scale",
"operation": "scaleDown"
},
"action": {
"actionName": "notify-email",
"email": “[email protected]”,
"body": “Example description”
},
POLICY MANAGER RULES
More possible actions:• Check VM alive
• Restart VM
• Move to another node
• Stop VM
• All actions you can implement.
POLICY MANAGER RULES
Kind of operands about server measures (cpu, mem, hdd and disk):
• greater• greater equal• less• less equal
"condition": {
"cpu": {
"value": 98.3,
"operand": "greater"
},
"mem": {
"value": 95,
"operand": "greater equal"
},
"hdd": {
"value": 95,
"operand": "greater equal"
},
"net": {
"value": 95,
"operand": "greater equal"
}
}
POLICY MANAGER RULES
DEMO
N
-
• Policy Manager:https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Policy_Manager_Open_RESTful_API_Specification
• Pyclips Webpage: http://pyclips.sourceforge.net
• Django project: https://www.djangoproject.com
• Redis: http://redis.io
• RabbitMQ: http://www.rabbitmq.com
• MySQL: http://mysql.com
REFERENCES
17
http://fiware.orghttp://lab.fiware.orgFollow @Fiware on Twitter !
Join us!