rdudyala | b086cf3 | 2016-08-11 00:07:45 -0400 | [diff] [blame^] | 1 | Dynamic Pipeline-Agent Module: |
| 2 | 1.Packages : |
| 3 | pika |
| 4 | yaml |
| 5 | subprocess |
| 6 | logging |
| 7 | operator |
| 8 | json |
| 9 | ConfigParser |
| 10 | |
| 11 | package can be installed using the command: |
| 12 | -> pip install pika |
| 13 | Remaing packages will come by default with OS package or can be installed |
| 14 | using command |
| 15 | -> sudo apt-get <package-name> |
| 16 | |
| 17 | 2.Files: |
| 18 | a. utils.py: Consists of utility function for parsing and updating pipeline.yaml |
| 19 | b. pipeline.yaml:Sample pipeline.yaml file with minimum source and sink information tags, |
| 20 | c. pipeline.py: Does validation of pipeline.yaml configuration. |
| 21 | d. pipeline_agent.py: Main file of the module while will listen on Rabbitmq exchange "pubsub" |
| 22 | e. pipeline_agent.conf : Conf file should consist of the following information: |
| 23 | i.Rabbitmq server datails(host,port,username,passwd) |
| 24 | ii.LOGGING info(logging level,file name) |
| 25 | iii.Ceilometer services needed to be restarted after pipeline.yaml changes. |
| 26 | f. README |
| 27 | |
| 28 | 3.To run the module: |
| 29 | ->sudo python pipeline_agent.py |
| 30 | |
| 31 | 4.Format to send conf msg to the module: |
| 32 | i.For updating conf : |
| 33 | -> msg={"sub_info":sub_info,"target":target,"action":"ADD"} |
| 34 | ii.for deleting conf : |
| 35 | -> msg={"sub_info":sub_info,"target":target,"action":"DEL"} |
| 36 | |
| 37 | The above two msgs should be in json fomrat and should send to same rabbitmq-server where pipeline_agent.py is running |
| 38 | with "pubsub" exchage. |
| 39 | ex: |
| 40 | sub_info = ["cpu_util", "memory"] |
| 41 | target = "kafka://1.2.3.2:18" |