microsoft / azure_arc

Automated Azure Arc, Edge, and Platform environments
https://aka.ms/ArcJumpstart
Creative Commons Attribution 4.0 International
738 stars 545 forks source link

remove quotes in POSTGRES_DATASIZE and POSTGRES_WORKER_NODE_COUNT #512

Closed AwdotiaRomanowna closed 3 years ago

AwdotiaRomanowna commented 3 years ago

Scenario which you are working on A link to the Jumpstart scenario you are working on. https://github.com/microsoft/azure_arc/blob/main/azure_arc_data_jumpstart/aks/arm_template/postgres_hs/azuredeploy.parameters.json

Describe the bug {"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Integer'. Actual 'String'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.","additionalInfo":[{"type":"TemplateViolation","info":{"lineNumber":230,"linePosition":26,"path":"parameters.POSTGRES_DATASIZE"}}]}}

if you are deploying the file as is you hit 2 errors for both parameters so maybe just remove the quotes?:


  "POSTGRES_WORKER_NODE_COUNT": {
            "value": <PostgreSQL Hyperscale server group number of workers>
        },
        "POSTGRES_DATASIZE": {
            "value": <PostgreSQL Hyperscale size of data volumes in MB>
        },
likamrat commented 3 years ago

Thank you @AwdotiaRomanowna. This is why we have included in the guide a link to the azuredeploy.parameters.example.json so you won't make any mistake.

https://azurearcjumpstart.io/azure_arc_jumpstart/azure_arc_data/aks/aks_postgresql_hyperscale_arm_template/#deployment

Removing the quotes will result in syntax violation. SNAG-0879

AwdotiaRomanowna commented 3 years ago

so maybe better replace it with default values? like 2 for POSTGRES_WORKER_NODE_COUNT and 1024 for POSTGRES_DATASIZE so the minimum one?

likamrat commented 3 years ago

Default values are configured in the template file:

    "POSTGRES_WORKER_NODE_COUNT": {
      "type": "int",
      "defaultValue": 3,
      "metadata": {
        "description": "Number of PostgreSQL Hyperscale worker nodes"
      }
    },
    "POSTGRES_DATASIZE": {
      "type": "int",        
      "defaultValue": 1024,
      "metadata": {
        "description": "Size of data volumes in MB"
      }
    },

We wanted to provide a modular deployment option. The question is, assuming you were to take a look at the example file, would you still missed it?

AwdotiaRomanowna commented 3 years ago

i kind of wanted it to work without much digging like a jumpstart - so my first deployment of hyperscale. a collegue of mine did the same as me hitting the same error.... so maybe i'm extrapolating too much but might be a more common usability issue