Azure / meta-azure-service-broker

A service broker to manage multiple Azure services in Cloud Foundry
Apache License 2.0
39 stars 44 forks source link

Only Basic types of Redis and PostgreSQL are created #157

Closed kamoljan closed 6 years ago

kamoljan commented 6 years ago

Hi guys!

We are trying to create Redis and PostreSQL with "Standard types" in Apps Manager. However, in Azure, it creates Basic type.

Is it bug or misconfiguration on our side?

We are on:

Our Microsoft Azure Service Broker's Default Parameters Config:

For Redis

{
  "parameters": {
      "enableNonSslPort": true,
      "sku": {
          "name": "Basic",
          "family": "C",
          "capacity": 0
      }
  }
}

For PostgreSQL

{
  "postgresqlServerParameters": {
      "allowPostgresqlServerFirewallRules": [
          {
            "ruleName": "Whitelist",
            "startIpAddress": "<Removed for security>",
            "endIpAddress": "<Removed for security>"
          }
      ],
      "properties": {
          "version": "9.6",
          "sslEnforcement": "Enabled",
          "storageMB": 51200
      }
  }
}
zhongyi-zhang commented 6 years ago

Hi @kamoljan, thanks for raising these. For Redis, the plans doesn't map to the tiers in Azure. Tier needs to be specified in config. We will fix that to avoid misleading. For now, to create redis instance with other pricing tier, Option1: modify the sku in Default Parameters Config:

{
  "parameters": {
      "enableNonSslPort": true,
      "sku": {
          "name": "Basic",
          "family": "C",
          "capacity": 0
      }
  }
}

Option2: use -c in cf create-service to customize the config of a service instance:

cf create-service azure-rediscache basic myrediscache -c <path-to-the-json-config-file>

or

cf create-service azure-rediscache basic myrediscache -c '{"parameters":{"sku":{ "name": "Standard","family": "C","capacity": 1}}}'

Redis pricing ref: https://azure.microsoft.com/en-us/pricing/details/cache/

For PostgreSQL, as this service is preview on Azure, by default only basic tiers are available... It should fail with standard plan instead of creating a instance with basic tier... Which cf cli command did you run?

kamoljan commented 6 years ago

Hi @zhongyi-zhang !

Thank you for your prompt response. For Redis, it is clean - we will run it from a command line (cf create-service ...) then.

For PostgreSQL, I don't have any cf cli command. So, you are saying at this moment we cannot create Standard, and everything will be a Basic type?!!

zhongyi-zhang commented 6 years ago

For PostgreSQL, sorry that I didn't know standard tier has been available... please forgot what I said. And I had a quick try with

cf create-service azure-postgresqldb standard100 mypostgresqldb

Confirmed on Azure portal, it did create a postgres instance with standard tier. Did you choose standard100 or any other standard plan?

kamoljan commented 6 years ago

@zhongyi-zhang thanks! It worked with standard100. Also worked with standard200, just had to adjust storage size.

➜  cf create-service azure-postgresqldb standard200 mypostgresqldb200 -c postgresql-configuration-standard200.json
➜  cat postgresql-configuration-standard200.json
{
  "postgresqlServerParameters": {

      ...
          "storageMB": 128000
      }
  }
}

Thanks a lot!