Skip to content

Use Azure Java SDK 0.7.0 #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dadoonet opened this issue Sep 12, 2014 · 1 comment
Closed

Use Azure Java SDK 0.7.0 #38

dadoonet opened this issue Sep 12, 2014 · 1 comment
Assignees

Comments

@dadoonet
Copy link
Member

It sounds like latest Azure Java SDK now has support for Compute instance management: See Azure/azure-sdk-for-java#218 (comment)

So we could try to remove our specific HTTP code (with certificate management) and replace it using this dependency:

<groupId>com.microsoft.azure</groupId>
<artifactId>azure-management-compute</artifactId>
<version>0.7.0</version>

Note that the SDK supports different keystore types (jceks, jks, pkcs12), so we can add a new option keystore_type (default to pkcs12). BTW, we should may be rename keystore to keystore_path. Or better, we could also follow Microsoft SDK convention. See: https://github.com/Azure/azure-sdk-for-java/wiki/Devbox-setup#configure-system-environment-variable and https://github.com/Azure/azure-sdk-for-java/blob/master/core/src/main/java/com/microsoft/windowsazure/management/configuration/ManagementConfiguration.java#L32

They are using:

  • management.subscription.id
  • management.keystore.path
  • management.keystore.password
  • management.keystore.type
  • management.cloud.service.name

So the elasticsearch.yml file could become:

cloud:
    azure:
        management:
             subscription.id: XXX-XXX-XXX-XXX
             cloud.service.name: es-demo-app
             keystore:
                   path: /path/to/azurekeystore.pkcs12
                   password: WHATEVER
                   type: pkcs12

With the SDK we can replace a lot of code with something like this:

Configuration configuration = ManagementConfiguration.configure(new URI(ENDPOINT),
        SUBSCRIPTION_ID, KEYSTORE_PATH, KEYSTORE_PASSWORD, KeyStoreType.pkcs12);

ComputeManagementClient computeManagementClient = ComputeManagementService.create(configuration);
HostedServiceGetDetailedResponse detailed = computeManagementClient.getHostedServicesOperations().getDetailed(SERVICE_NAME);

for (HostedServiceGetDetailedResponse.Deployment deployment : detailed.getDeployments()) {
    String name = deployment.getName();
    System.out.println("name = " + name);
}

It's definitely better than using our own code. We can benefit from that:

  • insurance that the code is updated when Azure API changes
  • other features we are not using today
@dadoonet dadoonet self-assigned this Sep 12, 2014
@dadoonet dadoonet changed the title Use Azure Java SDK 0.6.0 Use Azure Java SDK 0.7.0 Feb 4, 2015
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 4, 2015
Microsoft team has released a new specific project to deal with storage with a much cleaner API than the previous version.

See https://github.com/azure/azure-storage-java
Documentation is here: http://azure.microsoft.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/

Note that the produced ZIP file has been reduced from 5mb to 1.3mb.

Related to elastic#38
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 4, 2015
Microsoft team has released a new specific project to deal with storage with a much cleaner API than the previous version.

See https://github.com/azure/azure-storage-java
Documentation is here: http://azure.microsoft.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/

Note that the produced ZIP file has been reduced from 5mb to 1.3mb.

Related to elastic#38
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 12, 2015
Microsoft team has released a new specific project to deal with storage with a much cleaner API than the previous version.

See https://github.com/azure/azure-storage-java
Documentation is here: http://azure.microsoft.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/

Note that the produced ZIP file has been reduced from 5mb to 1.3mb.

Related to elastic#38
dadoonet added a commit that referenced this issue Feb 12, 2015
Microsoft team has released a new specific project to deal with storage with a much cleaner API than the previous version.

See https://github.com/azure/azure-storage-java
Documentation is here: http://azure.microsoft.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/

Note that the produced ZIP file has been reduced from 5mb to 1.3mb.

Related to #38

(cherry picked from commit 4467254)
dadoonet added a commit that referenced this issue Feb 12, 2015
Microsoft team has released a new specific project to deal with storage with a much cleaner API than the previous version.

See https://github.com/azure/azure-storage-java
Documentation is here: http://azure.microsoft.com/en-us/documentation/articles/storage-java-how-to-use-blob-storage/

Note that the produced ZIP file has been reduced from 5mb to 1.3mb.

Related to #38

(cherry picked from commit 4467254)
(cherry picked from commit b2f1e4d)
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 16, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

Closes elastic#38
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 16, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38
@dadoonet
Copy link
Member Author

Closing in favor of #63.

@dadoonet dadoonet removed the update label Feb 16, 2015
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 23, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 27, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 27, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38

(cherry picked from commit 72c77d3)
(cherry picked from commit d2541ab)
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Feb 27, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38

(cherry picked from commit 72c77d3)
dadoonet added a commit to dadoonet/elasticsearch-cloud-azure that referenced this issue Mar 28, 2015
This first version adds `azure-management` 0.7.0 instead of using our own XML implementation.
We can now have more control and give more options to the users.

We now support different keystore types using `cloud.azure.management.keystore.type`:

* `pkcs12`
* `jceks`
* `jks`

Closes elastic#38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant