blob: efcefda2e2ee2cd20c98a2d715ec4a7fa022decf [file] [log] [blame]
Benjamin Diaz4009bf32019-04-26 16:35:32 -03001..
2 Copyright 2018 Whitestack, LLC
3 *************************************************************
Benjamin Diaz7f11ecf2018-09-14 12:03:38 -03004
Benjamin Diaz4009bf32019-04-26 16:35:32 -03005 This file is part of OSM policy management module
6 All Rights Reserved to Whitestack, LLC
Benjamin Diaz7f11ecf2018-09-14 12:03:38 -03007
Benjamin Diaz4009bf32019-04-26 16:35:32 -03008 Licensed under the Apache License, Version 2.0 (the "License"); you may
9 not use this file except in compliance with the License. You may obtain
10 a copy of the License at
Benjamin Diaz7f11ecf2018-09-14 12:03:38 -030011
Benjamin Diaz4009bf32019-04-26 16:35:32 -030012 http://www.apache.org/licenses/LICENSE-2.0
Benjamin Diaz7f11ecf2018-09-14 12:03:38 -030013
Benjamin Diaz4009bf32019-04-26 16:35:32 -030014 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 License for the specific language governing permissions and limitations
18 under the License.
19 For those usages not covered by the Apache License, Version 2.0 please
20 contact: bdiaz@whitestack.com or glavado@whitestack.com
21
22OSM POL Module
23****************
24
25POL is a policy management module for OSM.
26It configures and handles autoscaling policies and vnf defined alarms.
27
28Components
29**********
30
31POL module has the following components:
32
33* POL Alarming Service: Handles VNF alarms.
34* POL Autoscaling Service: Handles autoscaling policy configuration, alarms creation and executing scaling actions through LCM.
35* POL Agent: Listens message bus and calls action in corresponding service.
36
37Configuration
38*************
39
40Configuration is handled by the file [pol.yaml] (osm_pol/core/pol.yaml). You can pass a personalized configuration file
41through the `--config-file` flag.
42
43Example:
44
45 osm-policy-agent --config-file your-config.yaml
46
47Configuration variables can also be overridden through environment variables by following the convention:
48OSMPOL_<SECTION>_<VARIABLE>=<VALUE>
49
50Example:
51
52 OSMPOL_GLOBAL_LOGLEVEL=DEBUG
53
54Development
55***********
56
57The following is a reference for making changes to the code and testing them in a running OSM deployment.
58
59::
60
61 git clone https://osm.etsi.org/gerrit/osm/POL.git
62 cd POL
63 # Make your changes here
64 # Build the image
65 docker build -t opensourcemano/pol:develop -f docker/Dockerfile .
66 # Deploy that image in a running OSM deployment
67 docker service update --force --image opensourcemano/pol:develop osm_pol
68 # Change a specific env variable
69 docker service update --force --env-add VARIABLE_NAME=new_value osm_pol
70 # View logs
71 docker logs $(docker ps -qf name=osm_pol.1)
72
73
74Developers
75**********
76
77* Benjamín Díaz <bdiaz@whitestack.com>, Whitestack, Argentina
78
79Maintainers
80***********
81
82* Benjamín Díaz, Whitestack, Argentina
83
84Contributions
85*************
86
87For information on how to contribute to OSM POL module, please get in touch with
88the developer or the maintainer.
89
90Any new code must follow the development guidelines detailed in the Dev Guidelines
91in the OSM Wiki and pass all tests.
92
93Dev Guidelines can be found at:
94
95 [https://osm.etsi.org/wikipub/index.php/Workflow_with_OSM_tools]