2021-02-05 16:31:47 +03:00
|
|
|
# Copyright (C) Microsoft Corporation. All rights reserved.
|
|
|
|
# https://aka.ms/yaml
|
|
|
|
parameters:
|
|
|
|
- name: original_node_count
|
|
|
|
displayName: "Original Node Count"
|
|
|
|
type: number
|
|
|
|
default: 3
|
|
|
|
values:
|
|
|
|
- 3
|
|
|
|
- 14
|
|
|
|
- name: scale_up_node_count
|
|
|
|
displayName: "Scale Up Node Count +"
|
|
|
|
type: number
|
|
|
|
default: 2
|
|
|
|
values:
|
|
|
|
- 1
|
|
|
|
- 2
|
|
|
|
- 3
|
|
|
|
- 4
|
|
|
|
- 5
|
|
|
|
- 6
|
|
|
|
- name: region
|
|
|
|
displayName: "Region to run pipeline"
|
|
|
|
type: string
|
|
|
|
default: "eastus"
|
|
|
|
values:
|
2021-07-13 15:32:15 +03:00
|
|
|
- "australiaeast"
|
|
|
|
- "australiasoutheast"
|
|
|
|
- "brazilsouth"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "canadacentral"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "canadaeast"
|
|
|
|
- "centralus"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "eastasia"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "eastus"
|
|
|
|
- "eastus2"
|
|
|
|
- "francecentral"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "japaneast"
|
|
|
|
- "japanwest"
|
|
|
|
- "koreacentral"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "koreasouth"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "northeurope"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "northcentralus"
|
|
|
|
- "southcentralus"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "southeastasia"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "southeastindia"
|
2021-02-17 17:04:30 +03:00
|
|
|
- "uksouth"
|
2021-07-13 15:32:15 +03:00
|
|
|
- "ukwest"
|
|
|
|
- "westus"
|
|
|
|
- "westus2"
|
|
|
|
- "westus3"
|
|
|
|
- "westeurope"
|
|
|
|
- "westindia"
|
2021-02-05 16:31:47 +03:00
|
|
|
- name: run_terraform
|
|
|
|
displayName: "Select terraform example to run"
|
|
|
|
type: string
|
|
|
|
default: "azureblobfiler"
|
|
|
|
values:
|
|
|
|
- "1-filer"
|
|
|
|
- "proxy"
|
|
|
|
- "azureblobfiler"
|
|
|
|
- name: image
|
|
|
|
displayName: "Select vfxt image to run. Defaults to latest"
|
|
|
|
type: string
|
|
|
|
default: "microsoft-avere:vfxt:avere-vfxt-node:latest"
|
|
|
|
values:
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-node:latest"
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-node:6.0.0"
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-node:5.3.61"
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-node:5.3.51"
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-node:5.3.43"
|
2021-02-24 06:13:17 +03:00
|
|
|
- "microsoft-avere:vfxt-preview:avere-vfxt-node:latest"
|
|
|
|
- name: controller_image
|
|
|
|
displayName: "Controller Image Offering (default: latest public)"
|
|
|
|
type: string
|
|
|
|
default: "microsoft-avere:vfxt:avere-vfxt-controller:latest"
|
|
|
|
values:
|
|
|
|
- "microsoft-avere:vfxt:avere-vfxt-controller:latest"
|
|
|
|
- "microsoft-avere:vfxt-preview:avere-vfxt-controller:latest"
|
2021-02-05 16:31:47 +03:00
|
|
|
- name: run_vdbench
|
|
|
|
displayName: "Run vdbench - only runs with azureblobfiler"
|
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
- name: vdbench_config
|
|
|
|
displayName: "vdbench config - only runs with azureblobfiler"
|
|
|
|
type: string
|
|
|
|
default: "inmem"
|
|
|
|
values:
|
|
|
|
- "ondisk"
|
|
|
|
- "inmem"
|
|
|
|
- name: run_scale_up
|
|
|
|
displayName: "Run scale-up"
|
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
- name: run_scale_down
|
|
|
|
displayName: "Run scale-down (only runs if scale-up is selected)"
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
- name: run_destroy_and_cleanup
|
|
|
|
displayName: "Run terraform destroy and rg cleanup."
|
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
- name: ssh_pub_key
|
|
|
|
displayName: "Optional: Pass in public ssh key, it would be placed on controller."
|
|
|
|
type: string
|
|
|
|
default: "."
|
|
|
|
|
|
|
|
variables:
|
|
|
|
SSH_PUBLIC_KEY: '${{ parameters.ssh_pub_key}}'
|
2021-02-24 06:13:17 +03:00
|
|
|
|
2021-02-05 16:31:47 +03:00
|
|
|
jobs:
|
|
|
|
- job: Terraform_vFXT
|
|
|
|
timeoutInMinutes: 180
|
|
|
|
cancelTimeoutInMinutes: 40
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-latest
|
2021-02-24 06:13:17 +03:00
|
|
|
steps:
|
2021-02-05 16:31:47 +03:00
|
|
|
- template: templates/setup_ssh.yml
|
|
|
|
- template: templates/setup_envars.yml
|
|
|
|
parameters:
|
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
region: ${{ parameters.region }}
|
|
|
|
- template: templates/terraform_setup.yml
|
|
|
|
parameters:
|
|
|
|
original_node_count: ${{ parameters.original_node_count }}
|
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
image: ${{ parameters.image }}
|
2021-02-24 06:13:17 +03:00
|
|
|
controller_image: ${{ parameters.controller_image }}
|
|
|
|
|
2021-02-05 16:31:47 +03:00
|
|
|
- template: templates/terraform_cmd.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
cmd_terraform: apply
|
|
|
|
condition: succeeded()
|
2021-02-24 06:13:17 +03:00
|
|
|
|
2021-02-05 16:31:47 +03:00
|
|
|
- ${{ if ne(parameters.ssh_pub_key, '.') }}:
|
|
|
|
- template: templates/add_sshkey.yml
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.run_vdbench, true) }}:
|
|
|
|
- ${{ if eq(parameters.run_terraform, 'azureblobfiler') }}:
|
|
|
|
- template: templates/run_vdbench.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
cmd_terraform: apply
|
|
|
|
vdbench_config: ${{ parameters.vdbench_config }}
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.run_scale_up, true) }}:
|
|
|
|
- template: templates/terraform_scale_up_down.yml
|
|
|
|
parameters:
|
|
|
|
original_node_count: ${{ parameters.original_node_count }}
|
|
|
|
scale_up_node_count: ${{ parameters.scale_up_node_count }}
|
|
|
|
scale: up
|
|
|
|
- template: templates/terraform_cmd.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
cmd_terraform: apply
|
|
|
|
condition: succeeded()
|
2021-02-24 06:13:17 +03:00
|
|
|
|
2021-02-05 16:31:47 +03:00
|
|
|
- ${{ if eq(parameters.run_scale_up, true) }}:
|
|
|
|
- ${{ if eq(parameters.run_scale_down, true) }}:
|
|
|
|
- template: templates/terraform_scale_up_down.yml
|
|
|
|
parameters:
|
|
|
|
original_node_count: ${{ parameters.original_node_count }}
|
|
|
|
scale_up_node_count: ${{ parameters.scale_up_node_count }}
|
|
|
|
scale: "down"
|
|
|
|
- template: templates/terraform_cmd.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
cmd_terraform: apply
|
|
|
|
condition: succeeded()
|
|
|
|
- ${{ if eq(parameters.run_destroy_and_cleanup, true) }}:
|
|
|
|
- ${{ if eq(parameters.run_vdbench, true) }}:
|
|
|
|
- ${{ if eq(parameters.run_terraform, 'azureblobfiler') }}:
|
|
|
|
- template: templates/run_vdbench.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
cmd_terraform: destroy
|
|
|
|
vdbench_config: ${{ parameters.vdbench_config }}
|
|
|
|
- template: templates/terraform_cmd.yml
|
2021-02-24 06:13:17 +03:00
|
|
|
parameters:
|
2021-02-05 16:31:47 +03:00
|
|
|
run_terraform: ${{ parameters.run_terraform }}
|
|
|
|
cmd_terraform: destroy
|
|
|
|
- template: templates/rg_delete.yml
|