Browse code

Merge "Adds trove-conductor service to trove."

Jenkins authored on 2013/10/15 06:35:02
Showing 1 changed files
... ...
@@ -109,12 +109,15 @@ function configure_trove() {
109 109
     # (Re)create trove conf files
110 110
     rm -f $TROVE_CONF_DIR/trove.conf
111 111
     rm -f $TROVE_CONF_DIR/trove-taskmanager.conf
112
+    rm -f $TROVE_CONF_DIR/trove-conductor.conf
113
+
112 114
     iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_password $RABBIT_PASSWORD
113 115
     iniset $TROVE_CONF_DIR/trove.conf DEFAULT sql_connection `database_connection_url trove`
114 116
     iniset $TROVE_CONF_DIR/trove.conf DEFAULT add_addresses True
115 117
 
116 118
     iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT rabbit_password $RABBIT_PASSWORD
117 119
     iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT sql_connection `database_connection_url trove`
120
+    iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT control_exchange trove
118 121
     sed -i "s/localhost/$NETWORK_GATEWAY/g" $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample
119 122
 
120 123
     # (Re)create trove taskmanager conf file if needed
... ...
@@ -127,6 +130,17 @@ function configure_trove() {
127 127
         iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS
128 128
         iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT
129 129
     fi
130
+
131
+    # (Re)create trove conductor conf file if needed
132
+    if is_service_enabled tr-cond; then
133
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT rabbit_password $RABBIT_PASSWORD
134
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT sql_connection `database_connection_url trove`
135
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT nova_proxy_admin_user radmin
136
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT nova_proxy_admin_tenant_name trove
137
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS
138
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT
139
+        iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT control_exchange trove
140
+    fi
130 141
 }
131 142
 
132 143
 # install_troveclient() - Collect source and prepare
... ...
@@ -152,12 +166,13 @@ function init_trove() {
152 152
 function start_trove() {
153 153
     screen_it tr-api "cd $TROVE_DIR; bin/trove-api --config-file=$TROVE_CONF_DIR/trove.conf --debug 2>&1"
154 154
     screen_it tr-tmgr "cd $TROVE_DIR; bin/trove-taskmanager --config-file=$TROVE_CONF_DIR/trove-taskmanager.conf --debug 2>&1"
155
+    screen_it tr-cond "cd $TROVE_DIR; bin/trove-conductor --config-file=$TROVE_CONF_DIR/trove-conductor.conf --debug 2>&1"
155 156
 }
156 157
 
157 158
 # stop_trove() - Stop running processes
158 159
 function stop_trove() {
159 160
     # Kill the trove screen windows
160
-    for serv in tr-api tr-tmgr; do
161
+    for serv in tr-api tr-tmgr tr-cond; do
161 162
         screen -S $SCREEN_NAME -p $serv -X kill
162 163
     done
163 164
 }