Hi Ignasi, Thanks so much for your response. It has been very helpful. The hardest thing was to get the authentication right, so for future references I would like to send the following code instructios:
1 - Add azurecompute into the pom.xml 2 - Generate the certificate <https://github.com/jclouds/jclouds-labs/blob/master/azurecompute/README.md> (will create the pem, cert, p12 files and the P12_EXPORT_PASSWORD) 3 - Upload to Azure portal (I used the old portal, I could not find the option in the new one) <https://github.com/jclouds/jclouds-labs/blob/master/azurecompute/README.md> 4 - The following code will authenticate and get the Compute Service. ComputeServiceContext context = ContextBuilder.newBuilder("azurecompute") .credentials("/path/to/azure.p12", "P12_EXPORT_PASSWORD") .endpoint("https://management.core.windows.net/6ac5048e-6e83-4c99-a1a8-YOUR-SUSBCRIPTION-ID") .modules(modules) .overrides(overrides) .buildView(ComputeServiceContext.class); ComputeService computeService = context.getComputeService(); Thanks for guiding me into the right direction. Regards, Ruben On Fri, Oct 16, 2015 at 8:36 AM, Ignasi Barrera <[email protected]> wrote: > Hi! > > The way you start instances in Azure is the same in all providers. > jclouds provides a portable layer you can use to create instances in > different clouds using the same code. I recommend you read the > "compute getting started guide" [1] to have a better understanding of > how it works. > > You can also try the compute-basics example [2]. The code is simple > and to the point, and you can compile and run it to deploy also on > azure (although you'll need to explicitly add the azurecompute > dependency to the pom.xml). Have a look at the azurecompute readme [3] > for the details on how to generate the credentials and what identity > and credential jclouds expects. > > HTH! > > I. > > > [1] http://jclouds.apache.org/start/compute/ > [2] https://github.com/jclouds/jclouds-examples/tree/master/compute-basics > [3] https://github.com/jclouds/jclouds-labs/tree/master/azurecompute > > On 14 October 2015 at 11:03, Ruben Rubio Rey <[email protected]> wrote: > > Hi Everyone, > > > > I am exploring the capabilities for Azure but azurecompute still under > > development. As far I understand we should use AzureComputeApi. > > > > Could anyone please tell me how to create a new instance using > > AzureComputeApi ? > > > > Regards, > > Ruben > > >
