Browse code

Merge "Provide credentials via ceilometer config file"

Jenkins authored on 2012/11/15 06:11:58
Showing 1 changed files
... ...
@@ -66,6 +66,13 @@ function configure_ceilometer() {
66 66
     cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR
67 67
     iniset $CEILOMETER_CONF DEFAULT policy_file $CEILOMETER_CONF_DIR/policy.json
68 68
 
69
+    # the compute and central agents need these credentials in order to
70
+    # call out to the public nova and glance APIs
71
+    iniset $CEILOMETER_CONF DEFAULT os_username ceilometer
72
+    iniset $CEILOMETER_CONF DEFAULT os_password $SERVICE_PASSWORD
73
+    iniset $CEILOMETER_CONF DEFAULT os_tenant_name $SERVICE_TENANT_NAME
74
+    iniset $CEILOMETER_CONF DEFAULT os_auth_url $OS_AUTH_URL
75
+
69 76
     iniset $CEILOMETER_CONF keystone_authtoken auth_protocol http
70 77
     iniset $CEILOMETER_CONF keystone_authtoken admin_user ceilometer
71 78
     iniset $CEILOMETER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
... ...
@@ -82,7 +89,7 @@ function install_ceilometer() {
82 82
 # start_ceilometer() - Start running processes, including screen
83 83
 function start_ceilometer() {
84 84
     screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF\""
85
-    screen_it ceilometer-acentral "export OS_USERNAME=ceilometer OS_PASSWORD=$SERVICE_PASSWORD OS_TENANT_NAME=$SERVICE_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL && cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_CONF"
85
+    screen_it ceilometer-acentral "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_CONF"
86 86
     screen_it ceilometer-collector "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_CONF"
87 87
     screen_it ceilometer-api "cd $CEILOMETER_DIR && $CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
88 88
 }