rdudyala | b086cf3 | 2016-08-11 00:07:45 -0400 | [diff] [blame] | 1 | # Readme to build custom image. |
| 2 | VM Building: |
| 3 | 1.Download ubuntu 14.04 server version and create a VM using virt-manager(kvm hypervisor). |
| 4 | Note: Can use virtual box also instead of virt-manger. |
| 5 | 2.Create user ubuntu with sudo previlages. |
| 6 | 3.git clone https://gerrit.opencord.org/monitoring |
| 7 | 4.Go to /home/ubuntu/monitoring/xos/synchronizer/ceilometer/ceilometer_service_custom_image/startup-scripts |
| 8 | Edit i.STARTUP_PATH points to startup-scripts dir, |
| 9 | ii.IP variable in ceilometer_init_script.sh for accessing keystone from outside the vm. |
| 10 | iii.PUB_SUB_PATH point to ceilometer_pub_sub dir |
| 11 | 5.Go to /home/ubuntu/monitoring/xos/synchronizer/ceilometer/ceilometer_service_custom_image |
| 12 | 6.run install.sh |
| 13 | ./install.sh |
| 14 | 7.With step 4 ceilometer setup(keystone,musql,rabbitmq),zookeeper and kafka will be installed. |
| 15 | 8.Go to /home/ubuntu/monitoring/xos/synchronizer/ceilometer/ceilometer-plugins |
| 16 | i.cp -rf network/ext_services/ /usr/lib/python2.7/dist-packages/ceilometer/network/ |
| 17 | ii.Update entry_point.txt: |
| 18 | copy the contents of ceilometer_entry_points.txt to /usr/lib/python2.7/dist-packages/ceilometer-6.0.0.egg-info/entry_points.txt under [ceilometer.notification] |
| 19 | 9. Update /home/ubuntu/monitoring/xos/synchronizer/ceilometer/ceilometer_pub_sub/pub_sub.conf with proper IP and port numbers and rabbitmq credentials. |
| 20 | 10.update /etc/ceilmeter/pipeline.yaml with required publisher info for coressponding meters. |
| 21 | ex: |
| 22 | sources: |
| 23 | - name: meter_source |
| 24 | interval: 600 |
| 25 | meters: |
| 26 | - "*" |
| 27 | - "!vsg" |
| 28 | - "!vsg.*" |
| 29 | sinks: |
| 30 | - meter_sink |
| 31 | - name: meter_sink |
| 32 | transformers: |
| 33 | publishers: |
| 34 | - notifier:// |
| 35 | - kafka://localhost:9092?topic=ceilometer |
| 36 | |
| 37 | 11.This setup by default created ceilometer topic for kafka.If any other topic is needed to use in this setup please |
| 38 | create the topic before using it wih the following command. |
| 39 | /opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic <topic name> |
| 40 | 12.Reboot the system. |
| 41 | 13.After rebooting pleasing check following services are running using ps command: |
| 42 | i.ceilometer services. |
| 43 | ii.kafka and zookeeper services |
| 44 | iii.sub_main.py script for pub-sub. |
| 45 | 14.Shoutdown the VM. |
| 46 | 15.Copy the vm image to tmp folder. |
| 47 | 16.convert and compress the image using the following command: |
| 48 | $sudo qemu-img convert -O qcow2 -c ceilometer-trusty-server-multi-nic.qcow2 ceilometer-trusty-server-multi-nic.compressed.qcow2 |
| 49 | 17.The compressed image can be run as a openstack vm for ceilometer service. |
| 50 | 18.-- |