amazon-archives / aws-servicebroker-rds

AWS Service Broker deployment module for Amazon Relational Database Service
Apache License 2.0
6 stars 4 forks source link

defaults aren't set #3

Closed whereismyjetpack closed 6 years ago

whereismyjetpack commented 6 years ago

when i select the "mysql-prod" plan from my service catalog, it appears that defaults aren't being set.

example: AllocatedStorageAndIops should default to default: "100 GB / 1,000 IOPS" according to apb.yml but when i run the plan I get undefined variable AllocatedStorageAndIops

This wouldn't be an issue, however when pumping out serviceinstances via svcat passing 100 GB / 1,000 IOPS as a parameter, the comma and slashes aren't parsed correctly.

any guidance would be pretty rad. thanks!

rniksch commented 6 years ago

Would you be so kind as to confirm if you are only seeing the defaults not being set on the prod service plan or not. Does the same manifest for the Dev? I am expecting yes.

Secondly are any of the parameter defaults being set? For example : MultiAZ: true AllowMajorVersionUpgrade: false AutoMinorVersionUpgrade: true

whereismyjetpack commented 6 years ago

Hi! It appears the same manifets for dev. when i'm not setting any parameters: svcat provision foo5 --class aws-rds-apb --plan mysql-dev

I get the following in the output 'region' is undefined\n\nThe error appears to have been in '/opt/ansible/roles/provision-rds-apb-openshift/tasks/main.yml': line 4, column 3,

in apb.yml, region should default to us-west-2. I then specify a region:

svcat provision foo6 --class aws-rds-apb --plan mysql-dev -pregion=us-east-1

and get the following 'DBInstanceClass' is undefined\n\nThe error appears to have been in '/opt/ansible/roles/provision-rds-apb-openshift/tasks/main.yml': line 4, column 3,

I'm still new to apbs, but looking through the ansible code it appears that these values should be copied to the defaults/ folder? does apb.yaml get parsed in some magic way?

the second issue is I can get pretty far by passing a bunch of params on the command line but when i get to the the AllocatedStorageAndIops variable i'm setting it to "'100 GB / 1,000 IOPS'" and that returns with the following:

Error: invalid --param value (invalid parameter (000 IOPS'), must be in name=value format)

i tried all kinds of voodoo to escape the comma, but was unsuccessful. I then put it in to the secret that the service broker reads in for this apb, and it seems to be working. If you need any more information from me please let me know

Thanks!

rniksch commented 6 years ago

there is a parameter mapping within .../tasks/main.yml however this is a mapping of the parameter names from ansible to scripting templates. This will not contain default values.

the apb.yml will contain defaults, and under roles/provision-rds-apb-openshift/provision-rds-apb-openshift/vars/ you will find a set of variable for specific plans in this case DEV vs Prod and the parameter defaults for these plans which will override the values defined within apb.yml.

In your case it seems neither set of defaults is propagating, this seems to be specific to svcat.

The AWS access key, secret key and region are not defined within the APB, these would have to be provided, in the case of the service catalog you can enter these at the service launch or provide these as secrets, seems you have now done that for the region, ensure you have the aws access key and secret key as well. This does not address the primary issue raised but will hinder progress.

1: I am investigating why the parameters defaults are not coming through. At this stage this is only manifesting with svcat.

2: I was expecting some form of escape for literal value, I have reached out to contributors or svcat for insight as the documentation does not provide detail. I was expecting something like -p IOPS="" or -p IOPS=''

whereismyjetpack commented 6 years ago

Rock and roll. I will, later tonight, apply with svcat, then output to yaml, then try to apply directly.

Thanks again!

jaymccon commented 6 years ago

this has been resolved in the latest build https://github.com/awslabs/aws-servicebroker/blob/master/docs/getting-started-k8s.md