forked from OpenStackCookbook/OpenStackCookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathceilometer-compute.sh
executable file
·72 lines (54 loc) · 1.52 KB
/
ceilometer-compute.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# ceilometer-compute.sh
# Authors: Kevin Jackson (@itarchitectkev)
# Source in common env vars
. /vagrant/common.sh
##############################
# Chapter 9 - More OpenStack #
##############################
# Install Ceilometer Things
sudo apt-get -y install ceilometer-agent-compute
# Configure /etc/nova/nova.conf
cat > /etc/ceilometer/ceilometer.conf <<EOF
[DEFAULT]
policy_file = /etc/ceilometer/policy.json
verbose = true
debug = true
insecure = true
##### AMQP #####
notification_topics = notifications,glance_notifications
rabbit_host=172.16.0.200
rabbit_port=5672
rabbit_userid=guest
rabbit_password=guest
rabbit_virtual_host=/
rabbit_ha_queues=false
[database]
connection=mongodb://ceilometer:[email protected]:27017/ceilometer
[api]
host = 172.16.0.200
port = 8777
[keystone_authtoken]
identity_uri = https://192.168.100.200:35357
admin_tenant_name = service
admin_user = ceilometer
admin_password = ceilometer
revocation_cache_time = 10
insecure = True
[service_credentials]
os_auth_url = https://192.168.100.200:5000/v2.0
os_username = ceilometer
os_tenant_name = service
os_password = ceilometer
insecure = True
[publisher_rpc]
metering_secret = foobar
EOF
echo "# Ceilometer
instance_usage_audit=True
instance_usage_audit_period=hour
notify_on_state_change=vm_and_task_state
notification_driver=nova.openstack.common.notifier.rpc_notifier" | sudo tee -a /etc/nova/nova.conf
cd /etc/init
ls nova* | cut -d '.' -f1 | while read S; do stop $S; start $S; done
service ceilometer-agent-compute restart