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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Container Configuration on Azure Batch Pool StartTask #7001

Open
seniorpaul opened this issue May 19, 2020 · 2 comments
Open

Support for Container Configuration on Azure Batch Pool StartTask #7001

seniorpaul opened this issue May 19, 2020 · 2 comments

Comments

@seniorpaul
Copy link

seniorpaul commented May 19, 2020

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Azure Batch Pools can be Docker compatible if they have a container configuration supplied to them; Batch Pools also support a "StartTask" that can also be container based. Unfortunately, the current Terraform API version does not support this fully. It would be good if the the start task container_configuratin supported the same container settings as that supported for standard tasks. I've linked to the Azure API for TaskContainerSettings as well.

New or Affected Resource(s)

  • azurerm_batch_pool

Potential Terraform Configuration

resource "azurerm_batch_pool" "test" {
  name                = "testaccpool"
  resource_group_name = "${azurerm_resource_group.test.name}"
  account_name        = "${azurerm_batch_account.test.name}"
  display_name        = "Test Acc Pool Auto"
  vm_size             = "Standard_A1"
  node_agent_sku_id   = "batch.node.ubuntu 16.04"

  storage_image_reference {
    publisher = "microsoft-azure-batch"
    offer     = "ubuntu-server-container"
    sku       = "16-04-lts"
    version   = "latest"
  }
  start_task {
    command_line         = "/bin/sh -c ''"
    max_task_retry_count = 5
    wait_for_success     = true
	
    container_configuration {
      containerRunOptions = "--workdir /app"
      imageName = "containerregisty.azurecr.io/imagename:latest",
      workingDirectory = "taskWorkingDirectory"
    }
  }
  container_configuration {
    container_image_names = ["ubuntu", "hello-world"]
    container_registries = [
      {
        registry_server = "registry-server-url"
        user_name = "registry-username"
        password = "registry-password"
      }
    ]
  }
}

References

https://docs.microsoft.com/en-gb/azure/batch/batch-docker-container-workloads
https://docs.microsoft.com/en-us/rest/api/batchmanagement/pool/create#starttask
https://docs.microsoft.com/en-us/rest/api/batchmanagement/pool/create#taskcontainersettings

@tonytilbo
Copy link

Is there any update on this open issue?

@ironf1st
Copy link

ironf1st commented Jan 6, 2022

This is still an outstanding missing feature for Batch Pools. Currently there is no way to do container configurations or container tasks via azurerm.

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

Successfully merging a pull request may close this issue.

4 participants