Add storage class options for Arc PG Deployment (#12054)

* Add storage class options for Arc PG Deployment

* Fix JSON

* Fix descriptions

* Update section title
This commit is contained in:
Charles Gagnon
2020-09-01 09:56:29 -07:00
committed by GitHub
parent 3c6796938d
commit 48d4b806ad
3 changed files with 49 additions and 9 deletions

View File

@@ -95,6 +95,21 @@
" postgres_password = os.environ[\"AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PASSWORD\"]\n",
"else:\n",
" sys.exit(f'environment variable: AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PASSWORD was not defined. Exiting\\n') \n",
"env_var = \"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_DATA\" in os.environ\n",
"if env_var:\n",
" postgres_storage_class_data = os.environ[\"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_DATA\"]\n",
"else:\n",
" sys.exit(f'environment variable: AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_DATA was not defined. Exiting\\n') \n",
"env_var = \"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_LOGS\" in os.environ\n",
"if env_var:\n",
" postgres_storage_class_logs = os.environ[\"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_LOGS\"]\n",
"else:\n",
" sys.exit(f'environment variable: AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_LOGS was not defined. Exiting\\n') \n",
"env_var = \"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_BACKUPS\" in os.environ\n",
"if env_var:\n",
" postgres_storage_class_backups = os.environ[\"AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_BACKUPS\"]\n",
"else:\n",
" sys.exit(f'environment variable: AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_BACKUPS was not defined. Exiting\\n') \n",
""
],
"metadata": {
@@ -152,7 +167,7 @@
"memory_limit_option = f' -ml \"{server_group_memory_limit}Mi\"' if server_group_memory_limit else \"\"\n",
"\n",
"os.environ[\"AZDATA_PASSWORD\"] = postgres_password\n",
"cmd = f'azdata arc postgres server create -n {server_group_name}{workers_option}{port_option}{cores_request_option}{cores_limit_option}{memory_request_option}{memory_limit_option}'\n",
"cmd = f'azdata arc postgres server create -n {server_group_name} -scd {postgres_storage_class_data} -scl {postgres_storage_class_logs} -scb {postgres_storage_class_backups}{workers_option}{port_option}{cores_request_option}{cores_limit_option}{memory_request_option}{memory_limit_option}'\n",
"out=run_command()"
],
"metadata": {

View File

@@ -618,14 +618,14 @@
"required": true
},
{
"label": "%arc.sql.storage-class.data.label%",
"label": "%arc.storage-class.data.label%",
"description": "%arc.sql.storage-class.data.description%",
"variableName": "AZDATA_NB_VAR_SQL_STORAGE_CLASS_DATA",
"type": "kube_storage_class",
"required": true
},
{
"label": "%arc.sql.storage-class.logs.label%",
"label": "%arc.storage-class.logs.label%",
"description": "%arc.sql.storage-class.logs.description%",
"variableName": "AZDATA_NB_VAR_SQL_STORAGE_CLASS_LOGS",
"type": "kube_storage_class",
@@ -737,11 +737,32 @@
"defaultValue": "5432",
"min": 1,
"max": 65535
},
{
"label": "%arc.storage-class.data.label%",
"description": "%arc.postgres.storage-class.data.description%",
"variableName": "AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_DATA",
"type": "kube_storage_class",
"required": true
},
{
"label": "%arc.storage-class.logs.label%",
"description": "%arc.postgres.storage-class.logs.description%",
"variableName": "AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_LOGS",
"type": "kube_storage_class",
"required": true
},
{
"label": "%arc.storage-class.backups.label%",
"description": "%arc.postgres.storage-class.backups.description%",
"variableName": "AZDATA_NB_VAR_POSTGRES_STORAGE_CLASS_BACKUPS",
"type": "kube_storage_class",
"required": true
}
]
},
{
"title": "%arc.postgres.settings.scheduling.title%",
"title": "%arc.postgres.settings.resource.title%",
"fields": [
{
"label": "%arc.postgres.server.group.cores.request%",

View File

@@ -81,10 +81,14 @@
"arc.azure.section.title": "Azure information",
"arc.sql.instance.name": "Instance name (lower case letters and digits only)",
"arc.sql.username": "Username",
"arc.sql.storage-class.data.label": "Storage Class (Data)",
"arc.sql.storage-class.data.description": "The storage classes to be used for data (.mdf)",
"arc.sql.storage-class.logs.label": "Storage Class (Logs)",
"arc.sql.storage-class.logs.description": "The storage classes to be used for logs (/var/log)",
"arc.storage-class.data.label": "Storage Class (Data)",
"arc.sql.storage-class.data.description": "The storage class to be used for data (.mdf)",
"arc.postgres.storage-class.data.description": "The storage class to be used for data persistent volumes",
"arc.storage-class.logs.label": "Storage Class (Logs)",
"arc.sql.storage-class.logs.description": "The storage class to be used for logs (/var/log)",
"arc.postgres.storage-class.logs.description": "The storage class to be used for logs persistent volumes",
"arc.storage-class.backups.label": "Storage Class (Backups)",
"arc.postgres.storage-class.backups.description": "The storage class to be used for backup persistent volumes",
"arc.password": "Password",
"arc.confirm.password": "Confirm password",
"arc.azure.account": "Azure account",
@@ -93,7 +97,7 @@
"arc.azure.location": "Azure location",
"arc.postgres.new.dialog.title": "Deploy a PostgreSQL server group on Azure Arc (preview)",
"arc.postgres.settings.section.title": "PostgreSQL server group settings",
"arc.postgres.settings.scheduling.title": "PostgreSQL server group scheduling settings",
"arc.postgres.settings.resource.title": "PostgreSQL server group resource settings",
"arc.postgres.server.group.name": "Server group name",
"arc.postgres.server.group.name.validation.description": "Server group name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, and be 10 characters or fewer in length.",
"arc.postgres.server.group.workers": "Number of workers",