Skip to content

Commit

Permalink
Fix Azure pool creation
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Mar 26, 2024
1 parent 7ef2e55 commit 2ee4d11
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -16,6 +16,8 @@

package nextflow.cloud.azure.batch

import static com.microsoft.azure.batch.protocol.models.ContainerType.DOCKER_COMPATIBLE

import java.math.RoundingMode
import java.nio.file.Path
import java.time.Instant
Expand All @@ -37,7 +39,6 @@ import com.microsoft.azure.batch.protocol.models.CloudTask
import com.microsoft.azure.batch.protocol.models.ComputeNodeFillType
import com.microsoft.azure.batch.protocol.models.ContainerConfiguration
import com.microsoft.azure.batch.protocol.models.ContainerRegistry
import com.microsoft.azure.batch.protocol.models.ContainerType
import com.microsoft.azure.batch.protocol.models.ElevationLevel
import com.microsoft.azure.batch.protocol.models.ImageInformation
import com.microsoft.azure.batch.protocol.models.JobUpdateParameter
Expand Down Expand Up @@ -88,8 +89,6 @@ import nextflow.util.MemoryUnit
import nextflow.util.MustacheTemplateEngine
import nextflow.util.Rnd
import org.joda.time.Period

import static com.microsoft.azure.batch.protocol.models.ContainerType.DOCKER_COMPATIBLE
/**
* Implements Azure Batch operations for Nextflow executor
*
Expand Down Expand Up @@ -661,7 +660,7 @@ class AzBatchService implements Closeable {
*
* https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/batch/batch-docker-container-workloads.md#:~:text=Run%20container%20applications%20on%20Azure,compatible%20containers%20on%20the%20nodes.
*/
final containerConfig = new ContainerConfiguration();
final containerConfig = new ContainerConfiguration().withType(DOCKER_COMPATIBLE);
final registryOpts = config.registry()

if( registryOpts && registryOpts.isConfigured() ) {
Expand All @@ -670,7 +669,7 @@ class AzBatchService implements Closeable {
.withRegistryServer(registryOpts.server)
.withUserName(registryOpts.userName)
.withPassword(registryOpts.password)
containerConfig.withContainerRegistries(containerRegistries).withType(DOCKER_COMPATIBLE)
containerConfig.withContainerRegistries(containerRegistries)
log.debug "[AZURE BATCH] Connecting Azure Batch pool to Container Registry '$registryOpts.server'"
}

Expand Down

0 comments on commit 2ee4d11

Please sign in to comment.