diff --git a/docs/plugins/discovery-azure.asciidoc b/docs/plugins/discovery-azure.asciidoc index e3bdc83e470..825c258133b 100644 --- a/docs/plugins/discovery-azure.asciidoc +++ b/docs/plugins/discovery-azure.asciidoc @@ -56,9 +56,11 @@ discovery: .Binding the network host ============================================== +WARNING: The keystore file must be placed in a directory accessible by elasticsearch like the `config` directory. + It's important to define `network.host` as by default it's bound to `localhost`. -You can use {ref}/modules-network.html[core network host settings]. For example `_non_loopback_` or `_en0_`. +You can use {ref}/modules-network.html[core network host settings]. For example `_en0_`. ============================================== diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java b/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java index 0764ec99c12..076ce52ff80 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java +++ b/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java @@ -20,19 +20,21 @@ package org.elasticsearch.cloud.azure.management; import com.microsoft.windowsazure.Configuration; +import com.microsoft.windowsazure.core.Builder; +import com.microsoft.windowsazure.core.DefaultBuilder; import com.microsoft.windowsazure.core.utils.KeyStoreType; import com.microsoft.windowsazure.management.compute.ComputeManagementClient; import com.microsoft.windowsazure.management.compute.ComputeManagementService; import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse; import com.microsoft.windowsazure.management.configuration.ManagementConfiguration; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.cloud.azure.AzureServiceDisableException; import org.elasticsearch.cloud.azure.AzureServiceRemoteException; import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import java.io.IOException; +import java.util.ServiceLoader; /** * @@ -40,7 +42,7 @@ import java.io.IOException; public class AzureComputeServiceImpl extends AbstractLifecycleComponent implements AzureComputeService { - private final ComputeManagementClient computeManagementClient; + private final ComputeManagementClient client; private final String serviceName; @Inject @@ -54,28 +56,36 @@ public class AzureComputeServiceImpl extends AbstractLifecycleComponent