Skip to content
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

How to upload applicationPackage to be installed on each node of the pool #287

Open
jGuru opened this issue Nov 5, 2019 · 2 comments
Open

Comments

@jGuru
Copy link

jGuru commented Nov 5, 2019

The Java SDK only has methods to create logical application package reference on the portal but do not have any method to upload .zip file for the application.
i.e.
I wanted to create a new batch account with .zip file in my local.
How can I do that?

Thanks

@bgklein
Copy link
Contributor

bgklein commented Nov 6, 2019

Using Java you can create application packages with azure-mgmt-batch

            BatchAccount batchAccount = azure.batchAccounts().define(batchAccountName)
                    .withRegion(region)
                    .withNewResourceGroup(rgName)
                    .defineNewApplication(applicationName)
                        .defineNewApplicationPackage(applicationPackageName)
                        .withAllowUpdates(true)
                        .withDisplayName(applicationDisplayName)
                        .attach()
                    .withNewStorageAccount(storageAccountName)
                    .create();

Once it is created you can do a get operation on the ApplicationPackage to get the storage url to upload your bits to (with the storage SDK).

Then you need to call activate on the ApplicationPackage

@jGuru
Copy link
Author

jGuru commented Nov 9, 2019

Thanks for your response.
I have created the batch account already with the above-given code.
I will explore the Storage SDK then will get back to you.

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

2 participants