Modify connect service to work in non cloud mode. Still work in cloud mode. If system property tenant.masterhost is setted, we are in cloud mode, else not