Create a provider to use Azure Batch (#133)
* Started work on provider * WIP Adding batch provider * Working basic call into pool client. Need to parameterize the baseurl * Fixed job creation by manipulating the content-type * WIP Kicking off containers. Dirty * [wip] More meat around scheduling simple containers. * Working on basic task wrapper to co-schedule pods * WIP on task wrapper * WIP * Working pod minimal wrapper for batch * Integrate pod template code into provider * Cleaning up * Move to docker without gpu * WIP batch integration * partially working * Working logs * Tidy code * WIP: Testing and readme * Added readme and terraform deployment for GPU Azure Batch pool. * Update to enable low priority nodes for gpu * Fix log formatting bug. Return node logs when container not yet started * Moved to golang v1.10 * Fix cri test * Fix up minor docs Issue. Add provider to readme. Add var for vk image.
This commit is contained in:
committed by
Robbie Zhang
parent
1ad6fb434e
commit
d6e8b3daf7
53
providers/azurebatch/deployment/main.tf
Normal file
53
providers/azurebatch/deployment/main.tf
Normal file
@@ -0,0 +1,53 @@
|
||||
resource "azurerm_resource_group" "batchrg" {
|
||||
name = "${var.resource_group_name}"
|
||||
location = "${var.resource_group_location}"
|
||||
}
|
||||
|
||||
module "aks" {
|
||||
source = "aks"
|
||||
|
||||
//Defaults to using current ssh key: recomend changing as needed
|
||||
linux_admin_username = "aks"
|
||||
linux_admin_ssh_publickey = "${file("~/.ssh/id_rsa.pub")}"
|
||||
|
||||
client_id = "${var.client_id}"
|
||||
client_secret = "${var.client_secret}"
|
||||
|
||||
resource_group_name = "${azurerm_resource_group.batchrg.name}"
|
||||
resource_group_location = "${azurerm_resource_group.batchrg.location}"
|
||||
}
|
||||
|
||||
module "storage" {
|
||||
source = "storage"
|
||||
pool_bootstrap_script_path = "./scripts/poolstartup.sh"
|
||||
|
||||
resource_group_name = "${azurerm_resource_group.batchrg.name}"
|
||||
resource_group_location = "${azurerm_resource_group.batchrg.location}"
|
||||
}
|
||||
|
||||
module "azurebatch" {
|
||||
source = "azurebatch"
|
||||
|
||||
storage_account_id = "${module.storage.id}"
|
||||
pool_bootstrap_script_url = "${module.storage.pool_boostrap_script_url}"
|
||||
|
||||
resource_group_name = "${azurerm_resource_group.batchrg.name}"
|
||||
resource_group_location = "${azurerm_resource_group.batchrg.location}"
|
||||
|
||||
dedicated_node_count = 1
|
||||
low_priority_node_count = 2
|
||||
}
|
||||
|
||||
module "virtualkubelet" {
|
||||
source = "virtualkubelet"
|
||||
virtualkubelet_docker_image = "${var.virtualkubelet_docker_image}"
|
||||
|
||||
cluster_client_key = "${module.aks.cluster_client_key}"
|
||||
cluster_client_certificate = "${module.aks.cluster_client_certificate}"
|
||||
cluster_ca = "${module.aks.cluster_ca}"
|
||||
cluster_host = "${module.aks.host}"
|
||||
|
||||
azure_batch_account_name = "${module.azurebatch.name}"
|
||||
|
||||
resource_group_location = "${azurerm_resource_group.batchrg.location}"
|
||||
}
|
||||
Reference in New Issue
Block a user