diff --git a/README.md b/README.md index c5a6189b..e99ef15d 100644 --- a/README.md +++ b/README.md @@ -456,14 +456,14 @@ proxy_url = VALUE | [deployment\_storage\_account\_name](#input\_deployment\_storage\_account\_name) | Name of exising deployment storage account | `string` | `""` | no | | [enable\_application\_insights](#input\_enable\_application\_insights) | Enable Application Insights. | `bool` | `true` | no | | [function\_access\_restriction\_enabled](#input\_function\_access\_restriction\_enabled) | Allow public access, Access restrictions apply to inbound access to internal vent | `bool` | `false` | no | -| [function\_app\_dist](#input\_function\_app\_dist) | Function app code dist | `string` | `"release"` | no | +| [function\_app\_dist](#input\_function\_app\_dist) | Function app code dist | `string` | `"dev"` | no | | [function\_app\_identity\_name](#input\_function\_app\_identity\_name) | The user assigned identity name for the function app (if empty - new one is created). | `string` | `""` | no | | [function\_app\_log\_level](#input\_function\_app\_log\_level) | Log level for function app (from -1 to 5). See https://github.com/rs/zerolog#leveled-logging | `number` | `1` | no | | [function\_app\_storage\_account\_container\_prefix](#input\_function\_app\_storage\_account\_container\_prefix) | Weka storage account container name prefix | `string` | `"weka-tf-functions-deployment-"` | no | | [function\_app\_storage\_account\_prefix](#input\_function\_app\_storage\_account\_prefix) | Weka storage account name prefix | `string` | `"weka"` | no | | [function\_app\_subnet\_delegation\_cidr](#input\_function\_app\_subnet\_delegation\_cidr) | Subnet delegation enables you to designate a specific subnet for an Azure PaaS service. | `string` | `"10.0.1.0/25"` | no | | [function\_app\_subnet\_delegation\_id](#input\_function\_app\_subnet\_delegation\_id) | Required to specify if subnet\_name were used to specify pre-defined subnets for weka. Function subnet delegation requires an additional subnet, and in the case of pre-defined networking this one also should be pre-defined | `string` | `""` | no | -| [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"f574113c680e317e7bca869159e0d168"` | no | +| [function\_app\_version](#input\_function\_app\_version) | Function app code version (hash) | `string` | `"6668fae0609d33c3364957cf3e3bccf6"` | no | | [get\_weka\_io\_token](#input\_get\_weka\_io\_token) | The token to download the Weka release from get.weka.io. | `string` | `""` | no | | [hotspare](#input\_hotspare) | Number of hotspares to set on weka cluster. Refer to https://docs.weka.io/overview/ssd-capacity-management#hot-spare | `number` | `1` | no | | [install\_cluster\_dpdk](#input\_install\_cluster\_dpdk) | Install weka cluster with DPDK | `bool` | `true` | no | @@ -483,6 +483,7 @@ proxy_url = VALUE | [nfs\_protocol\_gateways\_number](#input\_nfs\_protocol\_gateways\_number) | The number of protocol gateway virtual machines to deploy. | `number` | `0` | no | | [nfs\_setup\_protocol](#input\_nfs\_setup\_protocol) | Config protocol, default if false | `bool` | `false` | no | | [placement\_group\_id](#input\_placement\_group\_id) | Proximity placement group to use for the vmss. If not passed, will be created automatically. | `string` | `""` | no | +| [post\_cluster\_setup\_script](#input\_post\_cluster\_setup\_script) | A script to run after the cluster is up | `string` | `""` | no | | [prefix](#input\_prefix) | Prefix for all resources | `string` | `"weka"` | no | | [private\_dns\_rg\_name](#input\_private\_dns\_rg\_name) | The private DNS zone resource group name. Required when private\_dns\_zone\_name is set. | `string` | `""` | no | | [private\_dns\_zone\_name](#input\_private\_dns\_zone\_name) | The private DNS zone name. | `string` | `""` | no | @@ -500,6 +501,7 @@ proxy_url = VALUE | [script\_post\_cluster\_creation](#input\_script\_post\_cluster\_creation) | Script to run after cluster creation | `string` | `""` | no | | [script\_pre\_start\_io](#input\_script\_pre\_start\_io) | Script to run before starting IO | `string` | `""` | no | | [set\_dedicated\_fe\_container](#input\_set\_dedicated\_fe\_container) | Create cluster with FE containers | `bool` | `false` | no | +| [set\_default\_fs](#input\_set\_default\_fs) | Set the default filesystem which will use the full available capacity | `bool` | `true` | no | | [sg\_custom\_ingress\_rules](#input\_sg\_custom\_ingress\_rules) | Custom inbound rules to be added to the security group. |
list(object({| `[]` | no | | [sg\_id](#input\_sg\_id) | The security group id. | `string` | `""` | no | | [smb\_cluster\_name](#input\_smb\_cluster\_name) | The name of the SMB setup. | `string` | `"Weka-SMB"` | no | diff --git a/function-app/code/functions/clusterize/clusterize.go b/function-app/code/functions/clusterize/clusterize.go index 7b7fe33d..0bf206c3 100644 --- a/function-app/code/functions/clusterize/clusterize.go +++ b/function-app/code/functions/clusterize/clusterize.go @@ -417,6 +417,8 @@ func Handler(w http.ResponseWriter, r *http.Request) { // NFS state nfsStateContainerName := os.Getenv("NFS_STATE_CONTAINER_NAME") nfsStateBlobName := os.Getenv("NFS_STATE_BLOB_NAME") + setDefaultFs, _ := strconv.ParseBool(os.Getenv("SET_DEFAULT_FS")) + postClusterSetupScript := os.Getenv("POST_CLUSTER_SETUP_SCRIPT") addFrontend := false if addFrontendNum > 0 { @@ -486,6 +488,8 @@ func Handler(w http.ResponseWriter, r *http.Request) { PostClusterCreationScript: postClusterCreationScript, TieringTargetSSDRetention: tieringTargetSsdRetention, TieringStartDemote: tieringStartDemote, + SetDefaultFs: setDefaultFs, + PostClusterSetupScript: postClusterSetupScript, }, Obs: common.AzureObsParams{ Name: obsName, diff --git a/function-app/code/go.mod b/function-app/code/go.mod index 77d6f79f..9c7a3fee 100644 --- a/function-app/code/go.mod +++ b/function-app/code/go.mod @@ -14,7 +14,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/lithammer/dedent v1.1.0 - github.com/weka/go-cloud-lib v0.0.0-20240925210243-4d37183d36eb + github.com/weka/go-cloud-lib v0.0.0-20241030124057-ec13a72a73b2 ) require ( diff --git a/function-app/code/go.sum b/function-app/code/go.sum index 206d909b..0d114055 100644 --- a/function-app/code/go.sum +++ b/function-app/code/go.sum @@ -55,8 +55,8 @@ github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/weka/go-cloud-lib v0.0.0-20240925210243-4d37183d36eb h1:tAlwwk4/527hAWRCEO/CEKHGoC1/KROOGTnBXfxJpKU= -github.com/weka/go-cloud-lib v0.0.0-20240925210243-4d37183d36eb/go.mod h1:FCQuk2bLvtDHe2Kjsu0oInJP1VOVsuxqPGHGMmVIPMg= +github.com/weka/go-cloud-lib v0.0.0-20241030124057-ec13a72a73b2 h1:yb0J9EPSfGxbq+9+7BwhuE4svGaAPM0iT7skK/pAA5M= +github.com/weka/go-cloud-lib v0.0.0-20241030124057-ec13a72a73b2/go.mod h1:FCQuk2bLvtDHe2Kjsu0oInJP1VOVsuxqPGHGMmVIPMg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= diff --git a/functions.tf b/functions.tf index c54499fa..90bfd570 100644 --- a/functions.tf +++ b/functions.tf @@ -166,6 +166,8 @@ locals { SMB_PROTOCOL_GATEWAY_FE_CORES_NUM = var.smb_protocol_gateway_fe_cores_num S3_PROTOCOL_GATEWAY_FE_CORES_NUM = var.s3_protocol_gateway_fe_cores_num TRACES_PER_FRONTEND = var.traces_per_ionode + SET_DEFAULT_FS = var.set_default_fs + POST_CLUSTER_SETUP_SCRIPT = var.post_cluster_setup_script BACKEND_LB_IP = var.create_lb ? azurerm_lb.backend_lb[0].private_ip_address : "" # state diff --git a/variables.tf b/variables.tf index 13da1fca..62e991d4 100644 --- a/variables.tf +++ b/variables.tf @@ -404,13 +404,13 @@ variable "function_app_storage_account_container_prefix" { variable "function_app_version" { type = string description = "Function app code version (hash)" - default = "f574113c680e317e7bca869159e0d168" + default = "6668fae0609d33c3364957cf3e3bccf6" } variable "function_app_dist" { type = string description = "Function app code dist" - default = "release" + default = "dev" validation { condition = contains(["dev", "release"], var.function_app_dist) @@ -891,3 +891,15 @@ variable "key_vault_purge_protection_enabled" { default = false description = "Enable purge protection for the key vault." } + +variable "set_default_fs" { + type = bool + description = "Set the default filesystem which will use the full available capacity" + default = true +} + +variable "post_cluster_setup_script" { + type = string + description = "A script to run after the cluster is up" + default = "" +}
from_port = string
to_port = string
protocol = string
cidr_block = string
}))