mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Changing Postgres Hyperscale to Postgres Azure Arc in ADS (#20445)
* Hard code enginer ver to 14 and remove extension from wizard field and notebook * Removed hyperscale text from everywhere but links * Made PostgreSQL into PostgreSQL server and other text changes. Removed worker nodes * Removed coordinator node text * Removed worker nodes from compute + storage. Changed az arc-server to server-arc. postgresParameters.ts may need * Removed tabs for extensions, coord nodes, worker nodes, resource health, diagnose and solve * Removed node configuation and pg version from overview and properties. Edited arialabels * Change server group nodes to server * Removed type from overview table and aded Preview tags * Removed info bubble and added padding to top of title * Removed checkbox from PG create wizard. Added link and text * Remove engine version * Changed naming conventions * Removed coord and server group from variables * Removed properties * Removed Server table, admin username, reset password * Removed function from notebook * Change wording * bump version Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -10,7 +10,7 @@ This extension adds the following features to Azure Data Studio.
|
|||||||
|
|
||||||
A gui-based experience to deploy an Azure Arc data controller as well as resources on an existing Azure Arc data controller. Current list of supported resources:
|
A gui-based experience to deploy an Azure Arc data controller as well as resources on an existing Azure Arc data controller. Current list of supported resources:
|
||||||
* SQL Managed Instance
|
* SQL Managed Instance
|
||||||
* PostgreSQL server groups
|
* PostgreSQL server
|
||||||
|
|
||||||
### Management Dashboards
|
### Management Dashboards
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
url: /postgres/readme
|
url: /postgres/readme
|
||||||
not_numbered: true
|
not_numbered: true
|
||||||
sections:
|
sections:
|
||||||
- title: TSG100 - The Azure Arc-enabled PostgreSQL Hyperscale troubleshooter
|
- title: TSG100 - The Azure Arc-enabled PostgreSQL server troubleshooter
|
||||||
url: postgres/tsg100-troubleshoot-postgres
|
url: postgres/tsg100-troubleshoot-postgres
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
|
|
||||||
## Notebooks in this Chapter
|
## Notebooks in this Chapter
|
||||||
|
|
||||||
- [TSG100 - The Azure Arc-enabled PostgreSQL Hyperscale troubleshooter](../postgres/tsg100-troubleshoot-postgres.ipynb)
|
- [TSG100 - The Azure Arc-enabled PostgreSQL server troubleshooter](../postgres/tsg100-troubleshoot-postgres.ipynb)
|
||||||
|
|||||||
@@ -2,20 +2,17 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"TSG100 - The Azure Arc-enabled PostgreSQL Hyperscale troubleshooter\n",
|
"TSG100 - The Azure Arc-enabled PostgreSQL server troubleshooter\n",
|
||||||
"===================================================================\n",
|
"===================================================================\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Description\n",
|
"Description\n",
|
||||||
"-----------\n",
|
"-----------\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Follow these steps to troubleshoot an Azure Arc-enabled PostgreSQL\n",
|
"Follow these steps to troubleshoot an Azure Arc-enabled PostgreSQL Server.\n",
|
||||||
"Hyperscale Server.\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"Steps\n",
|
"Steps\n",
|
||||||
"-----\n",
|
"-----\n",
|
||||||
@@ -29,7 +26,10 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"parameters"
|
"parameters"
|
||||||
]
|
],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -45,11 +45,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Common functions\n",
|
"### Common functions\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -62,7 +60,10 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"hide_input"
|
"hide_input"
|
||||||
]
|
],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -279,7 +280,7 @@
|
|||||||
" if user_provided_exe_name in retry_hints:\n",
|
" if user_provided_exe_name in retry_hints:\n",
|
||||||
" for retry_hint in retry_hints[user_provided_exe_name]:\n",
|
" for retry_hint in retry_hints[user_provided_exe_name]:\n",
|
||||||
" if line_decoded.find(retry_hint) != -1:\n",
|
" if line_decoded.find(retry_hint) != -1:\n",
|
||||||
" if retry_count \u003c MAX_RETRIES:\n",
|
" if retry_count < MAX_RETRIES:\n",
|
||||||
" print(f\"RETRY: {retry_count} (due to: {retry_hint})\")\n",
|
" print(f\"RETRY: {retry_count} (due to: {retry_hint})\")\n",
|
||||||
" retry_count = retry_count + 1\n",
|
" retry_count = retry_count + 1\n",
|
||||||
" output = run(cmd, return_output=return_output, retry_count=retry_count)\n",
|
" output = run(cmd, return_output=return_output, retry_count=retry_count)\n",
|
||||||
@@ -326,11 +327,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Get Postgres server"
|
"### Get Postgres server"
|
||||||
]
|
]
|
||||||
@@ -341,7 +340,10 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"hide_input"
|
"hide_input"
|
||||||
]
|
],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -364,7 +366,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" pad = math.floor(math.log10(len(servers)) + 1) + 3\n",
|
" pad = math.floor(math.log10(len(servers)) + 1) + 3\n",
|
||||||
" for i, s in enumerate(servers):\n",
|
" for i, s in enumerate(servers):\n",
|
||||||
" print(f'{f\"[{i+1}]\":\u003c{pad}}{full_name(s)}')\n",
|
" print(f'{f\"[{i+1}]\":<{pad}}{full_name(s)}')\n",
|
||||||
"\n",
|
"\n",
|
||||||
" while True:\n",
|
" while True:\n",
|
||||||
" try:\n",
|
" try:\n",
|
||||||
@@ -372,7 +374,7 @@
|
|||||||
" except ValueError:\n",
|
" except ValueError:\n",
|
||||||
" continue\n",
|
" continue\n",
|
||||||
"\n",
|
"\n",
|
||||||
" if i \u003e= 1 and i \u003c= len(servers):\n",
|
" if i >= 1 and i <= len(servers):\n",
|
||||||
" server = servers[i-1]\n",
|
" server = servers[i-1]\n",
|
||||||
" namespace = server['metadata']['namespace']\n",
|
" namespace = server['metadata']['namespace']\n",
|
||||||
" name = server['metadata']['name']\n",
|
" name = server['metadata']['name']\n",
|
||||||
@@ -383,11 +385,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Summarize all resources"
|
"### Summarize all resources"
|
||||||
]
|
]
|
||||||
@@ -396,7 +396,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -411,11 +414,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Troubleshoot the server"
|
"### Troubleshoot the server"
|
||||||
]
|
]
|
||||||
@@ -424,7 +425,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -434,11 +438,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Troubleshoot the pods"
|
"### Troubleshoot the pods"
|
||||||
]
|
]
|
||||||
@@ -447,7 +449,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -471,11 +476,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Troubleshoot the containers"
|
"### Troubleshoot the containers"
|
||||||
]
|
]
|
||||||
@@ -484,7 +487,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -493,7 +499,7 @@
|
|||||||
" pod_name = pod['metadata']['name']\n",
|
" pod_name = pod['metadata']['name']\n",
|
||||||
" cons = pod['spec']['containers']\n",
|
" cons = pod['spec']['containers']\n",
|
||||||
" con_statuses = pod['status'].get('containerStatuses', [])\n",
|
" con_statuses = pod['status'].get('containerStatuses', [])\n",
|
||||||
" display(Markdown(f'#### Troubleshooting {len(cons)} container{\"\" if len(cons) \u003c 2 else \"s\"} '\n",
|
" display(Markdown(f'#### Troubleshooting {len(cons)} container{\"\" if len(cons) < 2 else \"s\"} '\n",
|
||||||
" f'containers for pod {namespace}.{pod_name}'))\n",
|
" f'containers for pod {namespace}.{pod_name}'))\n",
|
||||||
"\n",
|
"\n",
|
||||||
" for i, con in enumerate(cons):\n",
|
" for i, con in enumerate(cons):\n",
|
||||||
@@ -509,18 +515,16 @@
|
|||||||
" run(f'kubectl logs -n {namespace} {pod_name} {con_name} --tail {tail_lines}')\n",
|
" run(f'kubectl logs -n {namespace} {pod_name} {con_name} --tail {tail_lines}')\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Get logs from the previous terminated container if one exists\n",
|
" # Get logs from the previous terminated container if one exists\n",
|
||||||
" if con_restarts \u003e 0:\n",
|
" if con_restarts > 0:\n",
|
||||||
" display(Markdown(f'#### Logs from previous terminated container {namespace}.{pod_name}/{con_name}'))\n",
|
" display(Markdown(f'#### Logs from previous terminated container {namespace}.{pod_name}/{con_name}'))\n",
|
||||||
" run(f'kubectl logs -n {namespace} {pod_name} {con_name} --tail {tail_lines} --previous')"
|
" run(f'kubectl logs -n {namespace} {pod_name} {con_name} --tail {tail_lines} --previous')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"execution_count": null,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
"source": [
|
||||||
"### Troubleshoot the PersistentVolumeClaims"
|
"### Troubleshoot the PersistentVolumeClaims"
|
||||||
]
|
]
|
||||||
@@ -529,7 +533,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -541,7 +548,10 @@
|
|||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": [],
|
||||||
|
"vscode": {
|
||||||
|
"languageId": "python"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -549,33 +559,10 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"nbformat": 4,
|
|
||||||
"nbformat_minor": 5,
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"name": "python3",
|
"display_name": "Python 3",
|
||||||
"display_name": "Python 3"
|
"name": "python3"
|
||||||
},
|
|
||||||
"pansop": {
|
|
||||||
"related": "",
|
|
||||||
"test": {
|
|
||||||
"strategy": "",
|
|
||||||
"types": null,
|
|
||||||
"disable": {
|
|
||||||
"reason": "",
|
|
||||||
"workitems": null,
|
|
||||||
"types": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"target": {
|
|
||||||
"current": "public",
|
|
||||||
"final": "public"
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"parameters": null,
|
|
||||||
"symlink": false
|
|
||||||
},
|
|
||||||
"timeout": "0"
|
|
||||||
},
|
},
|
||||||
"language_info": {
|
"language_info": {
|
||||||
"codemirror_mode": "{ Name: \"\", Version: \"\"}",
|
"codemirror_mode": "{ Name: \"\", Version: \"\"}",
|
||||||
@@ -586,6 +573,29 @@
|
|||||||
"pygments_lexer": "",
|
"pygments_lexer": "",
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
|
"pansop": {
|
||||||
|
"internal": {
|
||||||
|
"parameters": null,
|
||||||
|
"symlink": false
|
||||||
|
},
|
||||||
|
"related": "",
|
||||||
|
"target": {
|
||||||
|
"current": "public",
|
||||||
|
"final": "public"
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"disable": {
|
||||||
|
"reason": "",
|
||||||
|
"types": null,
|
||||||
|
"workitems": null
|
||||||
|
},
|
||||||
|
"strategy": "",
|
||||||
|
"types": null
|
||||||
|
},
|
||||||
|
"timeout": "0"
|
||||||
|
},
|
||||||
"widgets": []
|
"widgets": []
|
||||||
}
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,28 @@
|
|||||||
{
|
{
|
||||||
"metadata": {
|
|
||||||
"kernelspec": {
|
|
||||||
"name": "python3",
|
|
||||||
"display_name": "Python 3",
|
|
||||||
"language": "python"
|
|
||||||
},
|
|
||||||
"language_info": {
|
|
||||||
"name": "python",
|
|
||||||
"version": "3.6.6",
|
|
||||||
"mimetype": "text/x-python",
|
|
||||||
"codemirror_mode": {
|
|
||||||
"name": "ipython",
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"pygments_lexer": "ipython3",
|
|
||||||
"nbconvert_exporter": "python",
|
|
||||||
"file_extension": ".py"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nbformat_minor": 2,
|
|
||||||
"nbformat": 4,
|
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"azdata_cell_guid": "e4ed0892-7b5a-4d95-bd0d-a6c3eb0b2c99"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
" \n",
|
" \n",
|
||||||
"## Create a PostgreSQL Hyperscale - Azure Arc on an existing Azure Arc Data Controller\n",
|
"## Create a PostgreSQL server - Azure Arc on an existing Azure Arc Data Controller\n",
|
||||||
" \n",
|
" \n",
|
||||||
"This notebook walks through the process of creating a PostgreSQL Hyperscale - Azure Arc on an existing Azure Arc Data Controller.\n",
|
"This notebook walks through the process of creating a PostgreSQL server - Azure Arc on an existing Azure Arc Data Controller.\n",
|
||||||
" \n",
|
" \n",
|
||||||
"* Follow the instructions in the **Prerequisites** cell to install the tools if not already installed.\n",
|
"* Follow the instructions in the **Prerequisites** cell to install the tools if not already installed.\n",
|
||||||
"* Make sure you have the target Azure Arc Data Controller already created.\n",
|
"* Make sure you have the target Azure Arc Data Controller already created.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<span style=\"color:red\"><font size=\"3\">Please press the \"Run All\" button to run the notebook</font></span>"
|
"<span style=\"color:red\"><font size=\"3\">Please press the \"Run All\" button to run the notebook</font></span>"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"azdata_cell_guid": "e4ed0892-7b5a-4d95-bd0d-a6c3eb0b2c99"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"azdata_cell_guid": "20fe3985-a01e-461c-bce0-235f7606cc3c"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"### **Prerequisites** \n",
|
"### **Prerequisites** \n",
|
||||||
"Ensure the following tools are installed and added to PATH before proceeding.\n",
|
"Ensure the following tools are installed and added to PATH before proceeding.\n",
|
||||||
@@ -49,23 +31,25 @@
|
|||||||
"|---|---|---|\n",
|
"|---|---|---|\n",
|
||||||
"|Azure CLI (az) | Command-line tool for installing and managing resources in an Azure Arc cluster |[Installation](https://docs.microsoft.com/cli/azure/install-azure-cli-windows?tabs=azure-cli) |\n",
|
"|Azure CLI (az) | Command-line tool for installing and managing resources in an Azure Arc cluster |[Installation](https://docs.microsoft.com/cli/azure/install-azure-cli-windows?tabs=azure-cli) |\n",
|
||||||
"|Azure CLI arcdata extension | Commands for using Azure Arc for Azure data services. | [Installation](https://docs.microsoft.com/azure/azure-arc/data/install-arcdata-extension)"
|
"|Azure CLI arcdata extension | Commands for using Azure Arc for Azure data services. | [Installation](https://docs.microsoft.com/azure/azure-arc/data/install-arcdata-extension)"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"azdata_cell_guid": "20fe3985-a01e-461c-bce0-235f7606cc3c"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"source": [
|
|
||||||
"### **Setup and Check Prerequisites**"
|
|
||||||
],
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"azdata_cell_guid": "68531b91-ddce-47d7-a1d8-2ddc3d17f3e7"
|
"azdata_cell_guid": "68531b91-ddce-47d7-a1d8-2ddc3d17f3e7"
|
||||||
}
|
},
|
||||||
|
"source": [
|
||||||
|
"### **Setup and Check Prerequisites**"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"azdata_cell_guid": "749d8dba-3da8-46e9-ae48-2b38056ab7a2",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import sys,os,json,subprocess\n",
|
"import sys,os,json,subprocess\n",
|
||||||
"def run_command():\n",
|
"def run_command():\n",
|
||||||
@@ -80,81 +64,74 @@
|
|||||||
" return output.stdout.decode(\"utf-8\")\n",
|
" return output.stdout.decode(\"utf-8\")\n",
|
||||||
"cmd = 'az --version'\n",
|
"cmd = 'az --version'\n",
|
||||||
"out = run_command()\n"
|
"out = run_command()\n"
|
||||||
],
|
]
|
||||||
"outputs": [],
|
|
||||||
"metadata": {
|
|
||||||
"azdata_cell_guid": "749d8dba-3da8-46e9-ae48-2b38056ab7a2",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"azdata_cell_guid": "68ec0760-27d1-4ded-9a9f-89077c40b8bb"
|
||||||
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"### **Set variables**\n",
|
"### **Set variables**\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#### \n",
|
"#### \n",
|
||||||
"\n",
|
"\n",
|
||||||
"Generated by Azure Data Studio using the values collected in the 'Deploy PostgreSQL Hyperscale - Azure Arc instance' wizard"
|
"Generated by Azure Data Studio using the values collected in the 'Deploy a PostgreSQL server - Azure Arc instance' wizard"
|
||||||
],
|
]
|
||||||
"metadata": {
|
|
||||||
"azdata_cell_guid": "68ec0760-27d1-4ded-9a9f-89077c40b8bb"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"source": [
|
|
||||||
"### **Creating the PostgreSQL Hyperscale - Azure Arc instance**"
|
|
||||||
],
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"azdata_cell_guid": "90b0e162-2987-463f-9ce6-12dda1267189"
|
"azdata_cell_guid": "90b0e162-2987-463f-9ce6-12dda1267189"
|
||||||
}
|
},
|
||||||
|
"source": [
|
||||||
|
"### **Creating the PostgreSQL server - Azure Arc instance**"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"source": [
|
|
||||||
"print (f'Creating the PostgreSQL Hyperscale - Azure Arc instance')\n",
|
|
||||||
"\n",
|
|
||||||
"workers = f' --workers {postgres_server_group_workers}' if postgres_server_group_workers else \"\"\n",
|
|
||||||
"port = f' --port \"{postgres_server_group_port}\"' if postgres_server_group_port else \"\"\n",
|
|
||||||
"engine_version = f' --engine-version {postgres_server_group_engine_version}' if postgres_server_group_engine_version else \"\"\n",
|
|
||||||
"extensions = f' --extensions \"{postgres_server_group_extensions}\"' if postgres_server_group_extensions else \"\"\n",
|
|
||||||
"volume_size_data = f' --volume-size-data {postgres_server_group_volume_size_data}Gi' if postgres_server_group_volume_size_data else \"\"\n",
|
|
||||||
"volume_size_logs = f' --volume-size-logs {postgres_server_group_volume_size_logs}Gi' if postgres_server_group_volume_size_logs else \"\"\n",
|
|
||||||
"volume_size_backups = f' --volume-size-backups {postgres_server_group_volume_size_backups}Gi' if postgres_server_group_volume_size_backups else \"\"\n",
|
|
||||||
"\n",
|
|
||||||
"def get_per_role_argument(argument, roles, unit=''):\n",
|
|
||||||
" value = ','.join(f'{role}={value}{unit}' for role,value in roles.items() if value not in (None, ''))\n",
|
|
||||||
" return f' {argument} {value}' if value else ''\n",
|
|
||||||
"\n",
|
|
||||||
"cores_request = get_per_role_argument('--cores-request', {\n",
|
|
||||||
" 'c': postgres_server_group_coordinator_cores_request,\n",
|
|
||||||
" 'w': postgres_server_group_workers_cores_request\n",
|
|
||||||
"})\n",
|
|
||||||
"\n",
|
|
||||||
"cores_limit = get_per_role_argument('--cores-limit', {\n",
|
|
||||||
" 'c': postgres_server_group_coordinator_cores_limit,\n",
|
|
||||||
" 'w': postgres_server_group_workers_cores_limit\n",
|
|
||||||
"})\n",
|
|
||||||
"\n",
|
|
||||||
"memory_request = get_per_role_argument('--memory-request', {\n",
|
|
||||||
" 'c': postgres_server_group_coordinator_memory_request,\n",
|
|
||||||
" 'w': postgres_server_group_workers_memory_request\n",
|
|
||||||
"}, 'Gi')\n",
|
|
||||||
"\n",
|
|
||||||
"memory_limit = get_per_role_argument('--memory-limit', {\n",
|
|
||||||
" 'c': postgres_server_group_coordinator_memory_limit,\n",
|
|
||||||
" 'w': postgres_server_group_workers_memory_limit\n",
|
|
||||||
"}, 'Gi')\n",
|
|
||||||
"\n",
|
|
||||||
"os.environ[\"AZDATA_PASSWORD\"] = os.environ[\"AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PASSWORD\"]\n",
|
|
||||||
"cmd = f'az postgres arc-server create --name {postgres_server_group_name} --k8s-namespace {arc_data_controller_namespace} --use-k8s --storage-class-data {postgres_storage_class_data} --storage-class-logs {postgres_storage_class_logs} --storage-class-backups {postgres_storage_class_backups}{workers}{port}{engine_version}{extensions}{volume_size_data}{volume_size_logs}{volume_size_backups}{cores_request}{cores_limit}{memory_request}{memory_limit}'\n",
|
|
||||||
"out=run_command()"
|
|
||||||
],
|
|
||||||
"outputs": [],
|
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"azdata_cell_guid": "4fbaf071-55a1-40bc-be7e-7b9b5547b886"
|
"azdata_cell_guid": "4fbaf071-55a1-40bc-be7e-7b9b5547b886"
|
||||||
}
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print (f'Creating the PostgreSQL server - Azure Arc instance')\n",
|
||||||
|
"\n",
|
||||||
|
"port = f' --port \"{postgres_server_port}\"' if postgres_server_port else \"\"\n",
|
||||||
|
"volume_size_data = f' --volume-size-data {postgres_server_volume_size_data}Gi' if postgres_server_volume_size_data else \"\"\n",
|
||||||
|
"volume_size_logs = f' --volume-size-logs {postgres_server_volume_size_logs}Gi' if postgres_server_volume_size_logs else \"\"\n",
|
||||||
|
"\n",
|
||||||
|
"cores_request = f' --cores-request {postgres_server_cores_request}' if postgres_server_cores_request else \"\"\n",
|
||||||
|
"cores_limit = f' --cores-limit {postgres_server_cores_limit}' if postgres_server_cores_limit else \"\"\n",
|
||||||
|
"memory_request = f' --memory-request {postgres_server_memory_request}Gi' if postgres_server_memory_request else \"\"\n",
|
||||||
|
"memory_limit = f' --memory-limit {postgres_server_memory_limit}Gi' if postgres_server_memory_limit else \"\"\n",
|
||||||
|
"\n",
|
||||||
|
"os.environ[\"AZDATA_PASSWORD\"] = os.environ[\"AZDATA_NB_VAR_POSTGRES_SERVER_PASSWORD\"]\n",
|
||||||
|
"cmd = f'az postgres server-arc create --name {postgres_server_name} --k8s-namespace {arc_data_controller_namespace} --use-k8s --storage-class-data {postgres_storage_class_data} --storage-class-logs {postgres_storage_class_logs}{port}{volume_size_data}{volume_size_logs}{cores_request}{cores_limit}{memory_request}{memory_limit}'\n",
|
||||||
|
"out=run_command()"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"language": "python",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.6.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 2
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "arc",
|
"name": "arc",
|
||||||
"displayName": "%arc.displayName%",
|
"displayName": "%arc.displayName%",
|
||||||
"description": "%arc.description%",
|
"description": "%arc.description%",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||||
"icon": "images/extension.png",
|
"icon": "images/extension.png",
|
||||||
@@ -1253,7 +1253,7 @@
|
|||||||
"fieldHeight": "10px",
|
"fieldHeight": "10px",
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.sql.help.text.learn.more%",
|
"text": "%arc.agreement.help.text.learn.more%",
|
||||||
"url": "https://docs.microsoft.com/azure/azure-arc/data/point-in-time-restore"
|
"url": "https://docs.microsoft.com/azure/azure-arc/data/point-in-time-restore"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1290,22 +1290,22 @@
|
|||||||
"template": "%arc.agreement.sql.help.text%",
|
"template": "%arc.agreement.sql.help.text%",
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.sql.help.text.learn.more%",
|
"text": "%arc.agreement.help.text.learn.more%",
|
||||||
"accessibilityInformation": {
|
"accessibilityInformation": {
|
||||||
"label": "%arc.agreement.sql.help.text.learn.more.ariaLabel%"
|
"label": "%arc.agreement.sql.help.text.learn.more.ariaLabel%"
|
||||||
},
|
},
|
||||||
"url": "https://go.microsoft.com/fwlink/?linkid=2141849"
|
"url": "https://go.microsoft.com/fwlink/?linkid=2141849"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.sql.help.text.azure.marketplace.terms%",
|
"text": "%arc.agreement.help.text.azure.marketplace.terms%",
|
||||||
"url": "https://go.microsoft.com/fwlink/?linkid=2045624"
|
"url": "https://go.microsoft.com/fwlink/?linkid=2045624"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.sql.help.text.terms.of.use%",
|
"text": "%arc.agreement.help.text.terms.of.use%",
|
||||||
"url": "https://go.microsoft.com/fwlink/?linkid=2045708"
|
"url": "https://go.microsoft.com/fwlink/?linkid=2045708"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.sql.help.text.privacy.policy%",
|
"text": "%arc.agreement.help.text.privacy.policy%",
|
||||||
"url": "https://go.microsoft.com/fwlink/?linkid=512132"
|
"url": "https://go.microsoft.com/fwlink/?linkid=512132"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1367,22 +1367,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.name%",
|
"label": "%arc.postgres.server.name%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_NAME",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_NAME",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"description": "%arc.postgres.server.group.name.validation.description%",
|
"description": "%arc.postgres.server.name.validation.description%",
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": "regex_match",
|
"type": "regex_match",
|
||||||
"regex": "^[a-z]([-a-z0-9]{0,9}[a-z0-9])?$",
|
"regex": "^[a-z]([-a-z0-9]{0,9}[a-z0-9])?$",
|
||||||
"description": "%arc.postgres.server.group.name.validation.description%"
|
"description": "%arc.postgres.server.name.validation.description%"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.password%",
|
"label": "%arc.password%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PASSWORD",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_PASSWORD",
|
||||||
"type": "password",
|
"type": "password",
|
||||||
"confirmationRequired": true,
|
"confirmationRequired": true,
|
||||||
"confirmationLabel": "%arc.confirm.password%",
|
"confirmationLabel": "%arc.confirm.password%",
|
||||||
@@ -1390,27 +1390,8 @@
|
|||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.workers.label%",
|
"label": "%arc.postgres.server.port%",
|
||||||
"description": "%arc.postgres.server.group.workers.description%",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_PORT",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS",
|
|
||||||
"type": "number",
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"type": "is_integer",
|
|
||||||
"description": "%should.be.integer%"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "!=",
|
|
||||||
"target": "1",
|
|
||||||
"description": "%worker.node.count.should.not.be.one%"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"defaultValue": "2",
|
|
||||||
"min": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.port%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_PORT",
|
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
@@ -1421,141 +1402,64 @@
|
|||||||
"defaultValue": "5432",
|
"defaultValue": "5432",
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"max": 65535
|
"max": 65535
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.engine.version%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_ENGINE_VERSION",
|
|
||||||
"type": "options",
|
|
||||||
"options": [
|
|
||||||
"11",
|
|
||||||
"12"
|
|
||||||
],
|
|
||||||
"defaultValue": "12"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.extensions.label%",
|
|
||||||
"description": "%arc.postgres.server.group.extensions.description%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_EXTENSIONS",
|
|
||||||
"type": "text"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "%arc.postgres.settings.resource.worker.title%",
|
"title": "%arc.postgres.settings.resource.compute.config.title%",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.workers.cores.request.label%",
|
"label": "%arc.postgres.server.cores.request.label%",
|
||||||
"description": "%arc.postgres.server.group.workers.cores.request.description%",
|
"description": "%arc.postgres.server.cores.request.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_CORES_REQUEST",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_CORES_REQUEST",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": "<=",
|
"type": "<=",
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_CORES_LIMIT",
|
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_CORES_LIMIT",
|
||||||
"description": "%requested.cores.less.than.or.equal.to.cores.limit%"
|
"description": "%requested.cores.less.than.or.equal.to.cores.limit%"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.workers.cores.limit.label%",
|
"label": "%arc.postgres.server.cores.limit.label%",
|
||||||
"description": "%arc.postgres.server.group.workers.cores.limit.description%",
|
"description": "%arc.postgres.server.cores.limit.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_CORES_LIMIT",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_CORES_LIMIT",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": ">=",
|
"type": ">=",
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_CORES_REQUEST",
|
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_CORES_REQUEST",
|
||||||
"description": "%cores.limit.greater.than.or.equal.to.requested.cores%"
|
"description": "%cores.limit.greater.than.or.equal.to.requested.cores%"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.workers.memory.request.label%",
|
"label": "%arc.postgres.server.memory.request.label%",
|
||||||
"description": "%arc.postgres.server.group.workers.memory.request.description%",
|
"description": "%arc.postgres.server.memory.request.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_MEMORY_REQUEST",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_MEMORY_REQUEST",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"min": 0.25,
|
"min": 0.25,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": "<=",
|
"type": "<=",
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_MEMORY_LIMIT",
|
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_MEMORY_LIMIT",
|
||||||
"description": "%requested.memory.less.than.or.equal.to.memory.limit%"
|
"description": "%requested.memory.less.than.or.equal.to.memory.limit%"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.workers.memory.limit.label%",
|
"label": "%arc.postgres.server.memory.limit.label%",
|
||||||
"description": "%arc.postgres.server.group.workers.memory.limit.description%",
|
"description": "%arc.postgres.server.memory.limit.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_MEMORY_LIMIT",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_MEMORY_LIMIT",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"min": 0.25,
|
"min": 0.25,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
"type": ">=",
|
"type": ">=",
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_WORKERS_MEMORY_REQUEST",
|
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_MEMORY_REQUEST",
|
||||||
"description": "%memory.limit.greater.than.or.equal.to.requested.memory%"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "%arc.postgres.settings.resource.coordinator.title%",
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.coordinator.cores.request.label%",
|
|
||||||
"description": "%arc.postgres.server.group.coordinator.cores.request.description%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_CORES_REQUEST",
|
|
||||||
"type": "number",
|
|
||||||
"min": 1,
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"type": "<=",
|
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_CORES_LIMIT",
|
|
||||||
"description": "%requested.cores.less.than.or.equal.to.cores.limit%"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.coordinator.cores.limit.label%",
|
|
||||||
"description": "%arc.postgres.server.group.coordinator.cores.limit.description%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_CORES_LIMIT",
|
|
||||||
"type": "number",
|
|
||||||
"min": 1,
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"type": ">=",
|
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_CORES_REQUEST",
|
|
||||||
"description": "%cores.limit.greater.than.or.equal.to.requested.cores%"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.coordinator.memory.request.label%",
|
|
||||||
"description": "%arc.postgres.server.group.coordinator.memory.request.description%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_MEMORY_REQUEST",
|
|
||||||
"type": "number",
|
|
||||||
"min": 0.25,
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"type": "<=",
|
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_MEMORY_LIMIT",
|
|
||||||
"description": "%requested.memory.less.than.or.equal.to.memory.limit%"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "%arc.postgres.server.group.coordinator.memory.limit.label%",
|
|
||||||
"description": "%arc.postgres.server.group.coordinator.memory.limit.description%",
|
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_MEMORY_LIMIT",
|
|
||||||
"type": "number",
|
|
||||||
"min": 0.25,
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"type": ">=",
|
|
||||||
"target": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_COORDINATOR_MEMORY_REQUEST",
|
|
||||||
"description": "%memory.limit.greater.than.or.equal.to.requested.memory%"
|
"description": "%memory.limit.greater.than.or.equal.to.requested.memory%"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1573,9 +1477,9 @@
|
|||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.volume.size.data.label%",
|
"label": "%arc.postgres.server.volume.size.data.label%",
|
||||||
"description": "%arc.postgres.server.group.volume.size.data.description%",
|
"description": "%arc.postgres.server.volume.size.data.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_VOLUME_SIZE_DATA",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_VOLUME_SIZE_DATA",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"defaultValue": "5",
|
"defaultValue": "5",
|
||||||
"min": 1
|
"min": 1
|
||||||
@@ -1588,9 +1492,9 @@
|
|||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.volume.size.logs.label%",
|
"label": "%arc.postgres.server.volume.size.logs.label%",
|
||||||
"description": "%arc.postgres.server.group.volume.size.logs.description%",
|
"description": "%arc.postgres.server.volume.size.logs.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_VOLUME_SIZE_LOGS",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_VOLUME_SIZE_LOGS",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"defaultValue": "5",
|
"defaultValue": "5",
|
||||||
"min": 1
|
"min": 1
|
||||||
@@ -1603,9 +1507,9 @@
|
|||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "%arc.postgres.server.group.volume.size.backups.label%",
|
"label": "%arc.postgres.server.volume.size.backups.label%",
|
||||||
"description": "%arc.postgres.server.group.volume.size.backups.description%",
|
"description": "%arc.postgres.server.volume.size.backups.description%",
|
||||||
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_GROUP_VOLUME_SIZE_BACKUPS",
|
"variableName": "AZDATA_NB_VAR_POSTGRES_SERVER_VOLUME_SIZE_BACKUPS",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"defaultValue": "5",
|
"defaultValue": "5",
|
||||||
"min": 1
|
"min": 1
|
||||||
@@ -1627,20 +1531,31 @@
|
|||||||
"when": "true"
|
"when": "true"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"agreements": [
|
"helpTexts": [
|
||||||
{
|
{
|
||||||
"template": "%arc.agreement%",
|
"template": "%arc.agreement.postgres.help.text%",
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
"text": "%microsoft.agreement.privacy.statement%",
|
"text": "%arc.agreement.help.text.learn.more%",
|
||||||
"url": "https://go.microsoft.com/fwlink/?LinkId=853010"
|
"accessibilityInformation": {
|
||||||
|
"label": "%arc.agreement.postgres.help.text.learn.more.ariaLabel%"
|
||||||
|
},
|
||||||
|
"url": "https://docs.microsoft.com/azure/azure-arc/data/what-is-azure-arc-enabled-postgres-hyperscale"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "%arc.agreement.postgres.terms.conditions%",
|
"text": "%arc.agreement.help.text.azure.marketplace.terms%",
|
||||||
|
"url": "https://go.microsoft.com/fwlink/?linkid=2045624"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "%arc.agreement.help.text.terms.of.use%",
|
||||||
"url": "https://go.microsoft.com/fwlink/?linkid=2045708"
|
"url": "https://go.microsoft.com/fwlink/?linkid=2045708"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "%arc.agreement.help.text.privacy.policy%",
|
||||||
|
"url": "https://go.microsoft.com/fwlink/?linkid=512132"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"when": "true"
|
"when": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,9 +91,9 @@
|
|||||||
"deploy.done.action":"Deploy",
|
"deploy.done.action":"Deploy",
|
||||||
|
|
||||||
"resource.type.arc.sql.display.name": "Azure SQL managed instance - Azure Arc",
|
"resource.type.arc.sql.display.name": "Azure SQL managed instance - Azure Arc",
|
||||||
"resource.type.arc.postgres.display.name": "PostgreSQL Hyperscale server groups - Azure Arc",
|
"resource.type.arc.postgres.display.name": "PostgreSQL Server - Azure Arc (Preview)",
|
||||||
"resource.type.arc.sql.description": "Managed SQL Instance service for app developers in a customer-managed environment",
|
"resource.type.arc.sql.description": "Managed SQL Instance service for app developers in a customer-managed environment",
|
||||||
"resource.type.arc.postgres.description": "Deploy PostgreSQL Hyperscale server groups into an Azure Arc environment",
|
"resource.type.arc.postgres.description": "Deploy a PostgreSQL server into an Azure Arc environment",
|
||||||
"arc.controller": "Target Azure Arc Controller",
|
"arc.controller": "Target Azure Arc Controller",
|
||||||
|
|
||||||
|
|
||||||
@@ -189,58 +189,49 @@
|
|||||||
"arc.azure.subscription": "Azure subscription",
|
"arc.azure.subscription": "Azure subscription",
|
||||||
"arc.azure.resource.group": "Azure resource group",
|
"arc.azure.resource.group": "Azure resource group",
|
||||||
"arc.azure.location": "Azure location",
|
"arc.azure.location": "Azure location",
|
||||||
"arc.postgres.wizard.title": "Deploy an Azure Arc-enabled PostgreSQL Hyperscale server group",
|
"arc.postgres.wizard.title": "Deploy a PostgreSQL Server - Azure Arc (Preview)",
|
||||||
"arc.postgres.wizard.page1.title": "Provide Azure enabled PostgreSQL Hyperscale server group parameters",
|
"arc.postgres.wizard.page1.title": "Provide PostgreSQL server parameters",
|
||||||
"arc.postgres.settings.section.title": "General settings",
|
"arc.postgres.settings.section.title": "General settings",
|
||||||
"arc.postgres.settings.resource.worker.title": "Worker Nodes Compute Configuration",
|
"arc.postgres.settings.resource.compute.config.title": "Compute Configuration",
|
||||||
"arc.postgres.settings.resource.coordinator.title": "Coordinator Node Compute Configuration",
|
|
||||||
"arc.postgres.settings.storage.title": "Storage settings",
|
"arc.postgres.settings.storage.title": "Storage settings",
|
||||||
"arc.postgres.server.group.name": "Server group name",
|
"arc.postgres.server.name": "Server 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 11 characters or fewer in length.",
|
"arc.postgres.server.name.validation.description": "Server name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, and be 11 characters or fewer in length.",
|
||||||
"arc.postgres.server.group.workers.label": "Number of workers",
|
"arc.postgres.server.port": "Port",
|
||||||
"arc.postgres.server.group.workers.description": "The number of worker nodes to provision in a sharded cluster, or zero (the default) for single-node Postgres.",
|
"arc.postgres.server.engine.version": "Engine Version",
|
||||||
"arc.postgres.server.group.port": "Port",
|
"arc.postgres.server.extensions.label": "Extensions",
|
||||||
"arc.postgres.server.group.engine.version": "Engine Version",
|
"arc.postgres.server.extensions.description": "A comma-separated list of the Postgres extensions that should be loaded on startup. Please refer to the postgres documentation for supported values.",
|
||||||
"arc.postgres.server.group.extensions.label": "Extensions",
|
"arc.postgres.server.volume.size.data.label": "Volume Size GB (Data)",
|
||||||
"arc.postgres.server.group.extensions.description": "A comma-separated list of the Postgres extensions that should be loaded on startup. Please refer to the postgres documentation for supported values.",
|
"arc.postgres.server.volume.size.data.description": "The size of the storage volume to be used for data in GB.",
|
||||||
"arc.postgres.server.group.volume.size.data.label": "Volume Size GB (Data)",
|
"arc.postgres.server.volume.size.logs.label": "Volume Size GB (Logs)",
|
||||||
"arc.postgres.server.group.volume.size.data.description": "The size of the storage volume to be used for data in GB.",
|
"arc.postgres.server.volume.size.logs.description": "The size of the storage volume to be used for logs in GB.",
|
||||||
"arc.postgres.server.group.volume.size.logs.label": "Volume Size GB (Logs)",
|
"arc.postgres.server.volume.size.backups.label": "Volume Size GB (Backups)",
|
||||||
"arc.postgres.server.group.volume.size.logs.description": "The size of the storage volume to be used for logs in GB.",
|
"arc.postgres.server.volume.size.backups.description": "The size of the storage volume to be used for backups in GB.",
|
||||||
"arc.postgres.server.group.volume.size.backups.label": "Volume Size GB (Backups)",
|
"arc.postgres.server.cores.request.label": "CPU request",
|
||||||
"arc.postgres.server.group.volume.size.backups.description": "The size of the storage volume to be used for backups in GB.",
|
"arc.postgres.server.cores.request.description": "The minimum number of CPU cores that must be available on the coordinator node to schedule the service. Fractional cores are supported.",
|
||||||
"arc.postgres.server.group.workers.cores.request.label": "CPU request (cores per node)",
|
"arc.postgres.server.cores.limit.label": "CPU limit",
|
||||||
"arc.postgres.server.group.workers.cores.request.description": "The minimum number of CPU cores that must be available per node to schedule the service. Fractional cores are supported.",
|
"arc.postgres.server.cores.limit.description": "The maximum number of CPU cores for the Postgres instance that can be used on the coordinator node. Fractional cores are supported.",
|
||||||
"arc.postgres.server.group.workers.cores.limit.label": "CPU limit (cores per node)",
|
"arc.postgres.server.memory.request.label": "Memory request (GB)",
|
||||||
"arc.postgres.server.group.workers.cores.limit.description": "The maximum number of CPU cores for the Postgres instance that can be used per node. Fractional cores are supported.",
|
"arc.postgres.server.memory.request.description": "The memory request of the Postgres instance on the coordinator node in GB.",
|
||||||
"arc.postgres.server.group.workers.memory.request.label": "Memory request (GB per node)",
|
"arc.postgres.server.memory.limit.label": "Memory limit (GB)",
|
||||||
"arc.postgres.server.group.workers.memory.request.description": "The memory request of the Postgres instance per node in GB.",
|
"arc.postgres.server.memory.limit.description": "The memory limit of the Postgres instance on the coordinator node in GB.",
|
||||||
"arc.postgres.server.group.workers.memory.limit.label": "Memory limit (GB per node)",
|
|
||||||
"arc.postgres.server.group.workers.memory.limit.description": "The memory limit of the Postgres instance per node in GB.",
|
|
||||||
"arc.postgres.server.group.coordinator.cores.request.label": "CPU request",
|
|
||||||
"arc.postgres.server.group.coordinator.cores.request.description": "The minimum number of CPU cores that must be available on the coordinator node to schedule the service. Fractional cores are supported.",
|
|
||||||
"arc.postgres.server.group.coordinator.cores.limit.label": "CPU limit",
|
|
||||||
"arc.postgres.server.group.coordinator.cores.limit.description": "The maximum number of CPU cores for the Postgres instance that can be used on the coordinator node. Fractional cores are supported.",
|
|
||||||
"arc.postgres.server.group.coordinator.memory.request.label": "Memory request (GB)",
|
|
||||||
"arc.postgres.server.group.coordinator.memory.request.description": "The memory request of the Postgres instance on the coordinator node in GB.",
|
|
||||||
"arc.postgres.server.group.coordinator.memory.limit.label": "Memory limit (GB)",
|
|
||||||
"arc.postgres.server.group.coordinator.memory.limit.description": "The memory limit of the Postgres instance on the coordinator node in GB.",
|
|
||||||
"arc.agreement": "I accept {0} and {1}.",
|
"arc.agreement": "I accept {0} and {1}.",
|
||||||
"arc.agreement.sql.terms.conditions": "Azure SQL managed instance - Azure Arc terms and conditions",
|
"arc.agreement.sql.terms.conditions": "Azure SQL managed instance - Azure Arc terms and conditions",
|
||||||
"arc.agreement.postgres.terms.conditions": "Azure Arc-enabled PostgreSQL Hyperscale terms and conditions",
|
"arc.agreement.postgres.terms.conditions": "PostgreSQL Server - Azure Arc terms and conditions",
|
||||||
"should.be.integer": "Value must be an integer",
|
"should.be.integer": "Value must be an integer",
|
||||||
"worker.node.count.should.not.be.one": "Value of 1 is not supported.",
|
"worker.node.count.should.not.be.one": "Value of 1 is not supported.",
|
||||||
"requested.cores.less.than.or.equal.to.cores.limit": "Requested cores must be less than or equal to cores limit",
|
"requested.cores.less.than.or.equal.to.cores.limit": "Requested cores must be less than or equal to cores limit",
|
||||||
"cores.limit.greater.than.or.equal.to.requested.cores": "Cores limit must be greater than or equal to requested cores",
|
"cores.limit.greater.than.or.equal.to.requested.cores": "Cores limit must be greater than or equal to requested cores",
|
||||||
"requested.memory.less.than.or.equal.to.memory.limit": "Requested memory must be less than or equal to memory limit",
|
"requested.memory.less.than.or.equal.to.memory.limit": "Requested memory must be less than or equal to memory limit",
|
||||||
"memory.limit.greater.than.or.equal.to.requested.memory": "Memory limit must be greater than or equal to requested memory",
|
"memory.limit.greater.than.or.equal.to.requested.memory": "Memory limit must be greater than or equal to requested memory",
|
||||||
"arc.agreement.sql.help.text": "Azure Arc enabled Managed Instance provides SQL Server access and feature compatibility that can be deployed on the infrastructure of your choice. {0}. \n \n By clicking 'Script to notebook' or 'Deploy', I (a) agree to the legal terms and privacy statement(s) associated with the Marketplace offering(s) listed below; (b) authorize Microsoft to bill my current payment method for the fees associated with the offering(s), with the same billing frequency as my Azure subscription; and (c) agree that Microsoft may share my contact, usage and transactional information with the provider(s) of the offering(s) for support, billing and other transactional activities. Microsoft does not provide rights for third-party offerings. For additional details see {1}, {2}, and {3}.",
|
"arc.agreement.sql.help.text": "Azure Arc-enabled Managed Instance provides SQL Server access and feature compatibility that can be deployed on the infrastructure of your choice. {0}. \n \n By clicking 'Script to notebook' or 'Deploy', I (a) agree to the legal terms and privacy statement(s) associated with the Marketplace offering(s) listed below; (b) authorize Microsoft to bill my current payment method for the fees associated with the offering(s), with the same billing frequency as my Azure subscription; and (c) agree that Microsoft may share my contact, usage and transactional information with the provider(s) of the offering(s) for support, billing and other transactional activities. Microsoft does not provide rights for third-party offerings. For additional details see {1}, {2}, and {3}.",
|
||||||
"arc.agreement.sql.help.text.learn.more": "Learn more",
|
"arc.agreement.help.text.learn.more": "Learn more",
|
||||||
"arc.agreement.sql.help.text.learn.more.ariaLabel": "Learn more about Azure Arc enabled Managed Instance",
|
"arc.agreement.sql.help.text.learn.more.ariaLabel": "Learn more about Azure Arc-enabled Managed Instance",
|
||||||
"arc.sql.pitr.retention.description": "Configure retention for point-in-time backups. {0}",
|
"arc.sql.pitr.retention.description": "Configure retention for point-in-time backups. {0}",
|
||||||
"arc.data.controller.help.text": "The Kubernetes cluster must already be arc-enabled with the az connectedk8s connect command. Please use our {0} to learn more.",
|
"arc.data.controller.help.text": "The Kubernetes cluster must already be arc-enabled with the az connectedk8s connect command. Please use our {0} to learn more.",
|
||||||
"arc.data.controller.help.text.documentation.page": "documentation page",
|
"arc.data.controller.help.text.documentation.page": "documentation page",
|
||||||
"arc.agreement.sql.help.text.terms.of.use": "Terms of use",
|
"arc.agreement.help.text.terms.of.use": "Terms of use",
|
||||||
"arc.agreement.sql.help.text.privacy.policy": "Privacy policy",
|
"arc.agreement.help.text.privacy.policy": "Privacy policy",
|
||||||
"arc.agreement.sql.help.text.azure.marketplace.terms": "Azure Marketplace Terms"
|
"arc.agreement.help.text.azure.marketplace.terms": "Azure Marketplace Terms",
|
||||||
|
"arc.agreement.postgres.help.text": "PostgreSQL Server - Azure Arc is one of the database engines available as part of Azure Arc-enabled data services and it can be deployed on the infrastructure of your choice. {0}. \n \n By clicking 'Script to notebook' or 'Deploy', I (a) agree to the legal terms and privacy statement(s) associated with the Marketplace offering(s) listed below; (b) authorize Microsoft to bill my current payment method for the fees associated with the offering(s), with the same billing frequency as my Azure subscription; and (c) agree that Microsoft may share my contact, usage and transactional information with the provider(s) of the offering(s) for support, billing and other transactional activities. Microsoft does not provide rights for third-party offerings. For additional details see {1}, {2}, and {3}.",
|
||||||
|
"arc.agreement.postgres.help.text.learn.more.ariaLabel": "Learn more about PostgreSQL Server - Azure Arc"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ const localize = nls.loadMessageBundle();
|
|||||||
export const arcDeploymentDeprecation = localize('arc.arcDeploymentDeprecation', "The Arc Deployment extension has been replaced by the Arc extension and has been uninstalled.");
|
export const arcDeploymentDeprecation = localize('arc.arcDeploymentDeprecation', "The Arc Deployment extension has been replaced by the Arc extension and has been uninstalled.");
|
||||||
export function arcControllerDashboard(name: string): string { return localize('arc.controllerDashboard', "Azure Arc Data Controller Dashboard - {0}", name); }
|
export function arcControllerDashboard(name: string): string { return localize('arc.controllerDashboard', "Azure Arc Data Controller Dashboard - {0}", name); }
|
||||||
export function miaaDashboard(name: string): string { return localize('arc.miaaDashboard', "SQL managed instance - Azure Arc Dashboard - {0}", name); }
|
export function miaaDashboard(name: string): string { return localize('arc.miaaDashboard', "SQL managed instance - Azure Arc Dashboard - {0}", name); }
|
||||||
export function postgresDashboard(name: string): string { return localize('arc.postgresDashboard', "PostgreSQL Hyperscale - Azure Arc Dashboard - {0}", name); }
|
export function postgresDashboard(name: string): string { return localize('arc.postgresDashboard', "PostgreSQL server - Azure Arc Dashboard (Preview) - {0}", name); }
|
||||||
|
|
||||||
export const dataControllersType = localize('arc.dataControllersType', "Azure Arc Data Controller");
|
export const dataControllersType = localize('arc.dataControllersType', "Azure Arc Data Controller");
|
||||||
export const pgSqlType = localize('arc.pgSqlType', "PostgreSQL Hyperscale - Azure Arc");
|
export const pgSqlType = localize('arc.pgSqlType', "PostgreSQL server - Azure Arc");
|
||||||
export const miaaType = localize('arc.miaaType', "SQL managed instance - Azure Arc");
|
export const miaaType = localize('arc.miaaType', "SQL managed instance - Azure Arc");
|
||||||
|
|
||||||
export const overview = localize('arc.overview', "Overview");
|
export const overview = localize('arc.overview', "Overview");
|
||||||
@@ -130,7 +130,7 @@ export const noInstancesAvailable = localize('arc.noInstancesAvailable', "No ins
|
|||||||
export const connectToServer = localize('arc.connectToServer', "Connect to Server");
|
export const connectToServer = localize('arc.connectToServer', "Connect to Server");
|
||||||
export const connectToController = localize('arc.connectToController', "Connect to Existing Controller");
|
export const connectToController = localize('arc.connectToController', "Connect to Existing Controller");
|
||||||
export function connectToMSSql(name: string): string { return localize('arc.connectToMSSql', "Connect to SQL managed instance - Azure Arc ({0})", name); }
|
export function connectToMSSql(name: string): string { return localize('arc.connectToMSSql', "Connect to SQL managed instance - Azure Arc ({0})", name); }
|
||||||
export function connectToPGSql(name: string): string { return localize('arc.connectToPGSql', "Connect to PostgreSQL Hyperscale - Azure Arc ({0})", name); }
|
export function connectToPGSql(name: string): string { return localize('arc.connectToPGSql', "Connect to PostgreSQL server - Azure Arc ({0})", name); }
|
||||||
export const passwordToController = localize('arc.passwordToController', "Provide Password to Controller");
|
export const passwordToController = localize('arc.passwordToController', "Provide Password to Controller");
|
||||||
export const controllerUrl = localize('arc.controllerUrl', "Controller URL");
|
export const controllerUrl = localize('arc.controllerUrl', "Controller URL");
|
||||||
export const controllerUrlPlaceholder = localize('arc.controllerUrlPlaceholder', "https://<IP or hostname>:<port>");
|
export const controllerUrlPlaceholder = localize('arc.controllerUrlPlaceholder', "https://<IP or hostname>:<port>");
|
||||||
@@ -171,7 +171,7 @@ export const postgresAdminUsername = localize('arc.postgresAdminUsername', "Admi
|
|||||||
export const nodeConfiguration = localize('arc.nodeConfiguration', "Node configuration");
|
export const nodeConfiguration = localize('arc.nodeConfiguration', "Node configuration");
|
||||||
export const postgresVersion = localize('arc.postgresVersion', "PostgreSQL version");
|
export const postgresVersion = localize('arc.postgresVersion', "PostgreSQL version");
|
||||||
export const serverGroupType = localize('arc.serverGroupType', "Server group type");
|
export const serverGroupType = localize('arc.serverGroupType', "Server group type");
|
||||||
export const serverGroupNodes = localize('arc.serverGroupNodes', "Server group nodes");
|
export const server = localize('arc.server', "Server");
|
||||||
export const fullyQualifiedDomain = localize('arc.fullyQualifiedDomain', "Fully qualified domain");
|
export const fullyQualifiedDomain = localize('arc.fullyQualifiedDomain', "Fully qualified domain");
|
||||||
export const postgresArcProductName = localize('arc.postgresArcProductName', "Azure Database for PostgreSQL - Azure Arc");
|
export const postgresArcProductName = localize('arc.postgresArcProductName', "Azure Database for PostgreSQL - Azure Arc");
|
||||||
export const coordinator = localize('arc.coordinator', "Coordinator");
|
export const coordinator = localize('arc.coordinator', "Coordinator");
|
||||||
@@ -183,10 +183,10 @@ export const newDatabase = localize('arc.newDatabase', "New Database");
|
|||||||
export const databaseName = localize('arc.databaseName', "Database name");
|
export const databaseName = localize('arc.databaseName', "Database name");
|
||||||
export const enterNewPassword = localize('arc.enterNewPassword', "Enter a new password");
|
export const enterNewPassword = localize('arc.enterNewPassword', "Enter a new password");
|
||||||
export const confirmNewPassword = localize('arc.confirmNewPassword', "Confirm the new password");
|
export const confirmNewPassword = localize('arc.confirmNewPassword', "Confirm the new password");
|
||||||
export const learnAboutPostgresClients = localize('arc.learnAboutPostgresClients', "Learn more about Azure PostgreSQL Hyperscale client interfaces");
|
export const learnAboutPostgresClients = localize('arc.learnAboutPostgresClients', "Learn more about Azure PostgreSQL client interfaces");
|
||||||
export const coordinatorNodeParametersDescription = localize('arc.coordinatorNodeParametersDescription', " These server parameters of the Coordinator node can be set to custom (non-default) values. Search to find parameters.");
|
export const coordinatorNodeParametersDescription = localize('arc.coordinatorNodeParametersDescription', " These server parameters of the Coordinator node can be set to custom (non-default) values. Search to find parameters.");
|
||||||
export const workerNodesParametersDescription = localize('arc.workerNodesParametersDescription', " These server parameters of the Worker nodes can be set to custom (non-default) values. Search to find parameters.");
|
export const workerNodesParametersDescription = localize('arc.workerNodesParametersDescription', " These server parameters of the Worker nodes can be set to custom (non-default) values. Search to find parameters.");
|
||||||
export const learnAboutNodeParameters = localize('arc.learnAboutNodeParameters', "Learn more about database engine settings for Azure Arc-enabled PostgreSQL Hyperscale");
|
export const learnAboutNodeParameters = localize('arc.learnAboutNodeParameters', "Learn more about database engine settings for Azure Arc-enabled PostgreSQL");
|
||||||
export const noNodeParametersFound = localize('arc.noNodeParametersFound', "No worker server parameters found...");
|
export const noNodeParametersFound = localize('arc.noNodeParametersFound', "No worker server parameters found...");
|
||||||
export const searchToFilter = localize('arc.searchToFilter', "Search to filter items...");
|
export const searchToFilter = localize('arc.searchToFilter', "Search to filter items...");
|
||||||
export const scalingCompute = localize('arc.scalingCompute', "scaling compute vCores and memory.");
|
export const scalingCompute = localize('arc.scalingCompute', "scaling compute vCores and memory.");
|
||||||
@@ -196,7 +196,7 @@ export const miaaBackupsDatabasesDescription = localize('arc.miaaBackupsDatabase
|
|||||||
export const pitrInfo = localize('arc.pitrInfo', "Specify how long you want to keep your point-in-time backups. Customize this for backup availability.");
|
export const pitrInfo = localize('arc.pitrInfo', "Specify how long you want to keep your point-in-time backups. Customize this for backup availability.");
|
||||||
export const restoreInfo = localize('arc.restoreInfo', "Restore a database to an Azure Arc enabled SQL Managed Instance.");
|
export const restoreInfo = localize('arc.restoreInfo', "Restore a database to an Azure Arc enabled SQL Managed Instance.");
|
||||||
export const restorePointText = localize('arc.restorePointText', "Enter a restore point in the specified time format within given range of earliest and latest restore time.");
|
export const restorePointText = localize('arc.restorePointText', "Enter a restore point in the specified time format within given range of earliest and latest restore time.");
|
||||||
export const postgresComputeAndStorageDescriptionPartTwo = localize('arc.postgres.computeAndStorageDescriptionPartTwo', "PostgreSQL Hyperscale server group by");
|
export const postgresComputeAndStorageDescriptionPartTwo = localize('arc.postgres.computeAndStorageDescriptionPartTwo', "PostgreSQL by");
|
||||||
export const computeAndStorageDescriptionPartThree = localize('arc.computeAndStorageDescriptionPartThree', "without downtime and by");
|
export const computeAndStorageDescriptionPartThree = localize('arc.computeAndStorageDescriptionPartThree', "without downtime and by");
|
||||||
export const computeAndStorageDescriptionPartFour = localize('arc.computeAndStorageDescriptionPartFour', "Before doing so, you need to ensure");
|
export const computeAndStorageDescriptionPartFour = localize('arc.computeAndStorageDescriptionPartFour', "Before doing so, you need to ensure");
|
||||||
export const computeAndStorageDescriptionPartFive = localize('arc.computeAndStorageDescriptionPartFive', "there are sufficient resources available");
|
export const computeAndStorageDescriptionPartFive = localize('arc.computeAndStorageDescriptionPartFive', "there are sufficient resources available");
|
||||||
@@ -205,24 +205,16 @@ export const computeAndStorageDescriptionPartSix = localize('arc.computeAndStora
|
|||||||
export const node = localize('arc.node', "node");
|
export const node = localize('arc.node', "node");
|
||||||
export const nodes = localize('arc.nodes', "nodes");
|
export const nodes = localize('arc.nodes', "nodes");
|
||||||
export const workerNodes = localize('arc.workerNodes', "Worker Nodes");
|
export const workerNodes = localize('arc.workerNodes', "Worker Nodes");
|
||||||
export const coordinatorNode = localize('arc.coordinatorNode', "Coordinator Node");
|
|
||||||
export const storagePerNode = localize('arc.storagePerNode', "storage per node");
|
export const storagePerNode = localize('arc.storagePerNode', "storage per node");
|
||||||
export const workerNodeCount = localize('arc.workerNodeCount', "Worker node count");
|
export const workerNodeCount = localize('arc.workerNodeCount', "Worker node count");
|
||||||
export const configurationPerNode = localize('arc.configurationPerNode', "Configuration (per node)");
|
export const computeConfiguration = localize('arc.computeConfiguration', "Compute Configuration");
|
||||||
export const configuration = localize('arc.configurationCoordinatorNode', "Configuration");
|
export const configurationPerNode = localize('arc.configurationPerNode', "Configuration");
|
||||||
|
export const configuration = localize('arc.configurationCoordinatorNode', "Node Configuration");
|
||||||
export const coresLimit = localize('arc.coresLimit', "CPU limit");
|
export const coresLimit = localize('arc.coresLimit', "CPU limit");
|
||||||
export const workerCoresLimit = localize('arc.workerCoresLimit', "Worker Nodes CPU limit");
|
|
||||||
export const coordinatorCoresLimit = localize('arc.coordinatorCoresLimit', "Coordinator Node CPU limit");
|
|
||||||
export const coresRequest = localize('arc.coresRequest', "CPU request");
|
export const coresRequest = localize('arc.coresRequest', "CPU request");
|
||||||
export const workerCoresRequest = localize('arc.workerCoresRequest', "Worker Nodes CPU request");
|
|
||||||
export const coordinatorCoresRequest = localize('arc.coordinatorCoresRequest', "Coordinator Node CPU request");
|
|
||||||
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB)");
|
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB)");
|
||||||
export const retentionDays = localize('arc.retentionDays', "Point-In-Time Recovery retention (days)");
|
export const retentionDays = localize('arc.retentionDays', "Point-In-Time Recovery retention (days)");
|
||||||
export const workerMemoryLimit = localize('arc.workerMemoryLimit', "Worker Nodes Memory limit (in GB)");
|
|
||||||
export const coordinatorMemoryLimit = localize('arc.coordinatorMemoryLimit', "Coordinator Node Memory limit (in GB)");
|
|
||||||
export const memoryRequest = localize('arc.memoryRequest', "Memory request (in GB)");
|
export const memoryRequest = localize('arc.memoryRequest', "Memory request (in GB)");
|
||||||
export const workerMemoryRequest = localize('arc.workerMemoryRequest', "Worker Nodes Memory request (in GB)");
|
|
||||||
export const coordinatorMemoryRequest = localize('arc.coordinatorMemoryRequest', "Coordinator Node Memory request (in GB)");
|
|
||||||
export const syncSecondaryToCommit = localize('arc.syncSecondaryToCommit', "Sync Secondary To Commit");
|
export const syncSecondaryToCommit = localize('arc.syncSecondaryToCommit', "Sync Secondary To Commit");
|
||||||
export const arcResources = localize('arc.arcResources', "Azure Arc Resources");
|
export const arcResources = localize('arc.arcResources', "Azure Arc Resources");
|
||||||
export const enterANonEmptyPassword = localize('arc.enterANonEmptyPassword', "Enter a non empty password or press escape to exit.");
|
export const enterANonEmptyPassword = localize('arc.enterANonEmptyPassword', "Enter a non empty password or press escape to exit.");
|
||||||
@@ -242,7 +234,7 @@ export const connectToPostgresDescription = localize('arc.connectToPostgresDescr
|
|||||||
export const postgresExtension = localize('arc.postgresExtension', "microsoft.azuredatastudio-postgresql");
|
export const postgresExtension = localize('arc.postgresExtension', "microsoft.azuredatastudio-postgresql");
|
||||||
export const podInitialized = localize('arc.podInitialized', "Pod is initialized.");
|
export const podInitialized = localize('arc.podInitialized', "Pod is initialized.");
|
||||||
export const podReady = localize('arc.podReady', "Pod is ready.");
|
export const podReady = localize('arc.podReady', "Pod is ready.");
|
||||||
export const noPodIssuesDetected = localize('arc.noPodIssuesDetected', "There aren’t any known issues affecting this PostgreSQL Hyperscale instance.");
|
export const noPodIssuesDetected = localize('arc.noPodIssuesDetected', "There aren’t any known issues affecting this PostgreSQL instance.");
|
||||||
export const podIssuesDetected = localize('arc.podIssuesDetected', "The pods listed below are experiencing issues that may affect performance or availability.");
|
export const podIssuesDetected = localize('arc.podIssuesDetected', "The pods listed below are experiencing issues that may affect performance or availability.");
|
||||||
export const containerReady = localize('arc.containerReady', "Pod containers are ready.");
|
export const containerReady = localize('arc.containerReady', "Pod containers are ready.");
|
||||||
export const podScheduled = localize('arc.podScheduled', "Pod is schedulable.");
|
export const podScheduled = localize('arc.podScheduled', "Pod is schedulable.");
|
||||||
@@ -306,7 +298,7 @@ export function pageDiscardFailed(error: any): string { return localize('arc.pag
|
|||||||
export function databaseCreationFailed(name: string, error: any): string { return localize('arc.databaseCreationFailed', "Failed to create database {0}. {1}", name, getErrorMessage(error)); }
|
export function databaseCreationFailed(name: string, error: any): string { return localize('arc.databaseCreationFailed', "Failed to create database {0}. {1}", name, getErrorMessage(error)); }
|
||||||
export function connectToControllerFailed(url: string, error: any): string { return localize('arc.connectToControllerFailed', "Could not connect to controller {0}. {1}", url, getErrorMessage(error)); }
|
export function connectToControllerFailed(url: string, error: any): string { return localize('arc.connectToControllerFailed', "Could not connect to controller {0}. {1}", url, getErrorMessage(error)); }
|
||||||
export function connectToMSSqlFailed(serverName: string, error: any): string { return localize('arc.connectToMSSqlFailed', "Could not connect to SQL managed instance - Azure Arc Instance {0}. {1}", serverName, getErrorMessage(error)); }
|
export function connectToMSSqlFailed(serverName: string, error: any): string { return localize('arc.connectToMSSqlFailed', "Could not connect to SQL managed instance - Azure Arc Instance {0}. {1}", serverName, getErrorMessage(error)); }
|
||||||
export function connectToPGSqlFailed(serverName: string, error: any): string { return localize('arc.connectToPGSqlFailed', "Could not connect to PostgreSQL Hyperscale - Azure Arc Instance {0}. {1}", serverName, getErrorMessage(error)); }
|
export function connectToPGSqlFailed(serverName: string, error: any): string { return localize('arc.connectToPGSqlFailed', "Could not connect to PostgreSQL server - Azure Arc Instance {0}. {1}", serverName, getErrorMessage(error)); }
|
||||||
export function missingExtension(extensionName: string): string { return localize('arc.missingExtension', "The {0} extension is required to view engine settings. Do you wish to install it now?", extensionName); }
|
export function missingExtension(extensionName: string): string { return localize('arc.missingExtension', "The {0} extension is required to view engine settings. Do you wish to install it now?", extensionName); }
|
||||||
export function extensionInstallationFailed(extensionName: string): string { return localize('arc.extensionInstallationFailed', "Failed to install extension {0}.", extensionName); }
|
export function extensionInstallationFailed(extensionName: string): string { return localize('arc.extensionInstallationFailed', "Failed to install extension {0}.", extensionName); }
|
||||||
export function fetchConfigFailed(name: string, error: any): string { return localize('arc.fetchConfigFailed', "An unexpected error occurred retrieving the config for '{0}'. {1}", name, getErrorMessage(error)); }
|
export function fetchConfigFailed(name: string, error: any): string { return localize('arc.fetchConfigFailed', "An unexpected error occurred retrieving the config for '{0}'. {1}", name, getErrorMessage(error)); }
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export class ControllerModel {
|
|||||||
]);
|
]);
|
||||||
const newRegistrations: Registration[] = [];
|
const newRegistrations: Registration[] = [];
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this._azApi.az.postgres.arcserver.list(namespace, this.azAdditionalEnvVars).then(result => {
|
this._azApi.az.postgres.serverarc.list(namespace, this.azAdditionalEnvVars).then(result => {
|
||||||
newRegistrations.push(...result.stdout.map(r => {
|
newRegistrations.push(...result.stdout.map(r => {
|
||||||
return {
|
return {
|
||||||
instanceName: r.name,
|
instanceName: r.name,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export class PostgresModel extends ResourceModel {
|
|||||||
}
|
}
|
||||||
this._refreshPromise = new Deferred();
|
this._refreshPromise = new Deferred();
|
||||||
try {
|
try {
|
||||||
this._config = (await this._azApi.az.postgres.arcserver.show(this.info.name, this.controllerModel.info.namespace, this.controllerModel.azAdditionalEnvVars)).stdout;
|
this._config = (await this._azApi.az.postgres.serverarc.show(this.info.name, this.controllerModel.info.namespace, this.controllerModel.azAdditionalEnvVars)).stdout;
|
||||||
this.configLastUpdated = new Date();
|
this.configLastUpdated = new Date();
|
||||||
this._onConfigUpdated.fire(this._config);
|
this._onConfigUpdated.fire(this._config);
|
||||||
this._refreshPromise.resolve();
|
this._refreshPromise.resolve();
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { PostgresModel } from '../../../models/postgresModel';
|
|||||||
import { convertToGibibyteString } from '../../../common/utils';
|
import { convertToGibibyteString } from '../../../common/utils';
|
||||||
|
|
||||||
export type RoleSpecifier = {
|
export type RoleSpecifier = {
|
||||||
workers?: string,
|
|
||||||
coordinator?: string
|
coordinator?: string
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -28,12 +27,6 @@ export type ConfigurationSpecModel = {
|
|||||||
export class PostgresComputeAndStoragePage extends DashboardPage {
|
export class PostgresComputeAndStoragePage extends DashboardPage {
|
||||||
private userInputContainer!: azdata.DivContainer;
|
private userInputContainer!: azdata.DivContainer;
|
||||||
|
|
||||||
private workerCountBox!: azdata.InputBoxComponent;
|
|
||||||
private workerCoresLimitBox!: azdata.InputBoxComponent;
|
|
||||||
private workerCoresRequestBox!: azdata.InputBoxComponent;
|
|
||||||
private workerMemoryLimitBox!: azdata.InputBoxComponent;
|
|
||||||
private workerMemoryRequestBox!: azdata.InputBoxComponent;
|
|
||||||
|
|
||||||
private coordinatorCoresLimitBox!: azdata.InputBoxComponent;
|
private coordinatorCoresLimitBox!: azdata.InputBoxComponent;
|
||||||
private coordinatorCoresRequestBox!: azdata.InputBoxComponent;
|
private coordinatorCoresRequestBox!: azdata.InputBoxComponent;
|
||||||
private coordinatorMemoryLimitBox!: azdata.InputBoxComponent;
|
private coordinatorMemoryLimitBox!: azdata.InputBoxComponent;
|
||||||
@@ -88,12 +81,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
const workerNodeslink = this.modelView.modelBuilder.hyperlink().withProps({
|
|
||||||
label: loc.addingWorkerNodes,
|
|
||||||
url: 'https://docs.microsoft.com/azure/azure-arc/data/scale-up-down-postgresql-hyperscale-server-group-using-cli',
|
|
||||||
CSSStyles: { 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
const infoComputeStorage_p3 = this.modelView.modelBuilder.text().withProps({
|
const infoComputeStorage_p3 = this.modelView.modelBuilder.text().withProps({
|
||||||
value: loc.computeAndStorageDescriptionPartThree,
|
value: loc.computeAndStorageDescriptionPartThree,
|
||||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||||
@@ -125,7 +112,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
.withItems([
|
.withItems([
|
||||||
infoComputeStorage_p1,
|
infoComputeStorage_p1,
|
||||||
infoComputeStorage_p2,
|
infoComputeStorage_p2,
|
||||||
workerNodeslink,
|
|
||||||
infoComputeStorage_p3,
|
infoComputeStorage_p3,
|
||||||
memoryVCoreslink,
|
memoryVCoreslink,
|
||||||
infoComputeStorage_p4,
|
infoComputeStorage_p4,
|
||||||
@@ -165,10 +151,9 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
await this._azApi.az.postgres.serverarc.update(
|
||||||
this._postgresModel.info.name,
|
this._postgresModel.info.name,
|
||||||
{
|
{
|
||||||
workers: this.saveArgs.workers,
|
|
||||||
coresRequest: this.schedulingParamsToEdit(this.saveArgs.coresRequest!),
|
coresRequest: this.schedulingParamsToEdit(this.saveArgs.coresRequest!),
|
||||||
coresLimit: this.schedulingParamsToEdit(this.saveArgs.coresLimit!),
|
coresLimit: this.schedulingParamsToEdit(this.saveArgs.coresLimit!),
|
||||||
memoryRequest: this.schedulingParamsToEdit(this.saveArgs.memoryRequest!),
|
memoryRequest: this.schedulingParamsToEdit(this.saveArgs.memoryRequest!),
|
||||||
@@ -210,11 +195,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.discardButton.onDidClick(async () => {
|
this.discardButton.onDidClick(async () => {
|
||||||
this.discardButton.enabled = false;
|
this.discardButton.enabled = false;
|
||||||
try {
|
try {
|
||||||
this.workerCountBox.value = this.currentConfiguration.workers!.toString();
|
|
||||||
this.workerCoresRequestBox.value = this.currentConfiguration.coresRequest!.workers;
|
|
||||||
this.workerCoresLimitBox.value = this.currentConfiguration.coresLimit!.workers;
|
|
||||||
this.workerMemoryRequestBox.value = this.currentConfiguration.memoryRequest!.workers;
|
|
||||||
this.workerMemoryLimitBox.value = this.currentConfiguration.memoryLimit!.workers;
|
|
||||||
this.coordinatorCoresRequestBox.value = this.currentConfiguration.coresRequest!.coordinator;
|
this.coordinatorCoresRequestBox.value = this.currentConfiguration.coresRequest!.coordinator;
|
||||||
this.coordinatorCoresLimitBox.value = this.currentConfiguration.coresLimit!.coordinator;
|
this.coordinatorCoresLimitBox.value = this.currentConfiguration.coresLimit!.coordinator;
|
||||||
this.coordinatorMemoryRequestBox.value = this.currentConfiguration.memoryRequest!.coordinator;
|
this.coordinatorMemoryRequestBox.value = this.currentConfiguration.memoryRequest!.coordinator;
|
||||||
@@ -234,131 +214,21 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
private schedulingParamsToEdit(arg: RoleSpecifier): string | undefined {
|
private schedulingParamsToEdit(arg: RoleSpecifier): string | undefined {
|
||||||
// A comma-separated list of roles with values can be specified in format <role>=<value>.
|
// A comma-separated list of roles with values can be specified in format <role>=<value>.
|
||||||
if (arg.workers && arg.coordinator) {
|
if (arg.coordinator) {
|
||||||
return `"${arg.workers},${arg.coordinator}"`;
|
return `"${arg.coordinator}"`;
|
||||||
} else {
|
} else {
|
||||||
return arg.workers ?? arg.coordinator ?? undefined;
|
return arg.coordinator ?? undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private initializeConfigurationBoxes(): void {
|
private initializeConfigurationBoxes(): void {
|
||||||
// Worker node count
|
|
||||||
this.workerCountBox = this.modelView.modelBuilder.inputBox().withProps({
|
|
||||||
readOnly: false,
|
|
||||||
min: 0,
|
|
||||||
inputType: 'number',
|
|
||||||
placeHolder: loc.loading,
|
|
||||||
required: true,
|
|
||||||
ariaLabel: loc.workerNodeCount,
|
|
||||||
validationErrorMessage: loc.workerOneNodeValidationMessage
|
|
||||||
}).withValidation((component) => {
|
|
||||||
if (component.value === '1') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
this.workerCountBox.onTextChanged(() => {
|
|
||||||
if (!this.saveValueToEdit(this.workerCountBox, this.currentConfiguration.workers!.toString())) {
|
|
||||||
this.saveArgs.workers = undefined;
|
|
||||||
} else {
|
|
||||||
this.saveArgs.workers = parseInt(this.workerCountBox.value!);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Worker nodes cores request
|
|
||||||
this.workerCoresRequestBox = this.modelView.modelBuilder.inputBox().withProps({
|
|
||||||
readOnly: false,
|
|
||||||
min: 1,
|
|
||||||
inputType: 'number',
|
|
||||||
placeHolder: loc.loading,
|
|
||||||
ariaLabel: loc.workerCoresRequest
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
this.workerCoresRequestBox.onTextChanged(() => {
|
|
||||||
if (!(this.saveValueToEdit(this.workerCoresRequestBox, this.currentConfiguration.coresRequest!.workers!))) {
|
|
||||||
this.saveArgs.coresRequest!.workers = undefined;
|
|
||||||
} else if (this.workerCoresRequestBox.value === '') {
|
|
||||||
this.saveArgs.coresRequest!.workers = 'w=';
|
|
||||||
} else {
|
|
||||||
this.saveArgs.coresRequest!.workers = `w=${this.workerCoresRequestBox.value}`;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Worker nodes cores limit
|
|
||||||
this.workerCoresLimitBox = this.modelView.modelBuilder.inputBox().withProps({
|
|
||||||
readOnly: false,
|
|
||||||
min: 1,
|
|
||||||
inputType: 'number',
|
|
||||||
placeHolder: loc.loading,
|
|
||||||
ariaLabel: loc.workerCoresLimit
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
this.workerCoresLimitBox.onTextChanged(() => {
|
|
||||||
if (!(this.saveValueToEdit(this.workerCoresLimitBox, this.currentConfiguration.coresLimit!.workers!))) {
|
|
||||||
this.saveArgs.coresLimit!.workers = undefined;
|
|
||||||
} else if (this.workerCoresLimitBox.value === '') {
|
|
||||||
this.saveArgs.coresLimit!.workers = 'w=';
|
|
||||||
} else {
|
|
||||||
this.saveArgs.coresLimit!.workers = `w=${this.workerCoresLimitBox.value}`;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Worker nodes memory request
|
|
||||||
this.workerMemoryRequestBox = this.modelView.modelBuilder.inputBox().withProps({
|
|
||||||
readOnly: false,
|
|
||||||
min: 0.25,
|
|
||||||
inputType: 'number',
|
|
||||||
placeHolder: loc.loading,
|
|
||||||
ariaLabel: loc.workerMemoryRequest
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
this.workerMemoryRequestBox.onTextChanged(() => {
|
|
||||||
if (!(this.saveValueToEdit(this.workerMemoryRequestBox, this.currentConfiguration.memoryRequest!.workers!))) {
|
|
||||||
this.saveArgs.memoryRequest!.workers = undefined;
|
|
||||||
} else if (this.workerMemoryRequestBox.value === '') {
|
|
||||||
this.saveArgs.memoryRequest!.workers = 'w=';
|
|
||||||
} else {
|
|
||||||
this.saveArgs.memoryRequest!.workers = `w=${this.workerMemoryRequestBox.value}Gi`;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Worker nodes memory limit
|
|
||||||
this.workerMemoryLimitBox = this.modelView.modelBuilder.inputBox().withProps({
|
|
||||||
readOnly: false,
|
|
||||||
min: 0.25,
|
|
||||||
inputType: 'number',
|
|
||||||
placeHolder: loc.loading,
|
|
||||||
ariaLabel: loc.workerMemoryLimit
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
this.workerMemoryLimitBox.onTextChanged(() => {
|
|
||||||
if (!(this.saveValueToEdit(this.workerMemoryLimitBox, this.currentConfiguration.memoryLimit!.workers!))) {
|
|
||||||
this.saveArgs.memoryLimit!.workers = undefined;
|
|
||||||
} else if (this.workerMemoryLimitBox.value === '') {
|
|
||||||
this.saveArgs.memoryLimit!.workers = 'w=';
|
|
||||||
} else {
|
|
||||||
this.saveArgs.memoryLimit!.workers = `w=${this.workerMemoryLimitBox.value}Gi`;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// Coordinator node cores request
|
// Coordinator node cores request
|
||||||
this.coordinatorCoresRequestBox = this.modelView.modelBuilder.inputBox().withProps({
|
this.coordinatorCoresRequestBox = this.modelView.modelBuilder.inputBox().withProps({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 1,
|
min: 1,
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading,
|
placeHolder: loc.loading,
|
||||||
ariaLabel: loc.coordinatorCoresRequest
|
ariaLabel: loc.coresRequest
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.disposables.push(
|
this.disposables.push(
|
||||||
@@ -379,7 +249,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
min: 1,
|
min: 1,
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading,
|
placeHolder: loc.loading,
|
||||||
ariaLabel: loc.coordinatorCoresLimit
|
ariaLabel: loc.coresLimit
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.disposables.push(
|
this.disposables.push(
|
||||||
@@ -400,7 +270,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
min: 0.25,
|
min: 0.25,
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading,
|
placeHolder: loc.loading,
|
||||||
ariaLabel: loc.coordinatorMemoryRequest
|
ariaLabel: loc.memoryRequest
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.disposables.push(
|
this.disposables.push(
|
||||||
@@ -421,7 +291,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
min: 0.25,
|
min: 0.25,
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading,
|
placeHolder: loc.loading,
|
||||||
ariaLabel: loc.coordinatorMemoryLimit
|
ariaLabel: loc.memoryLimit
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.disposables.push(
|
this.disposables.push(
|
||||||
@@ -439,7 +309,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
private createUserInputWorkerSection(): azdata.Component[] {
|
private createUserInputWorkerSection(): azdata.Component[] {
|
||||||
if (this._postgresModel.configLastUpdated) {
|
if (this._postgresModel.configLastUpdated) {
|
||||||
this.editWorkerNodeCount();
|
|
||||||
this.refreshCoresRequest();
|
this.refreshCoresRequest();
|
||||||
this.refreshCoresLimit();
|
this.refreshCoresLimit();
|
||||||
this.refreshMemoryRequest();
|
this.refreshMemoryRequest();
|
||||||
@@ -447,21 +316,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
this.modelView.modelBuilder.text().withProps({
|
this.createCoresMemorySection(loc.configuration),
|
||||||
value: loc.workerNodes,
|
|
||||||
CSSStyles: { ...cssStyles.title, 'margin-top': '25px' }
|
|
||||||
}).component(),
|
|
||||||
this.createWorkerNodesSectionContainer(),
|
|
||||||
this.createCoresMemorySection(loc.configurationPerNode, loc.workerNodesConfigurationInformation),
|
|
||||||
this.createConfigurationSectionContainer(loc.coresRequest, this.workerCoresRequestBox),
|
|
||||||
this.createConfigurationSectionContainer(loc.coresLimit, this.workerCoresLimitBox),
|
|
||||||
this.createConfigurationSectionContainer(loc.memoryRequest, this.workerMemoryRequestBox),
|
|
||||||
this.createConfigurationSectionContainer(loc.memoryLimit, this.workerMemoryLimitBox),
|
|
||||||
this.modelView.modelBuilder.text().withProps({
|
|
||||||
value: loc.coordinatorNode,
|
|
||||||
CSSStyles: { ...cssStyles.title, 'margin-top': '25px' }
|
|
||||||
}).component(),
|
|
||||||
this.createCoresMemorySection(loc.configuration, loc.coordinatorNodeConfigurationInformation),
|
|
||||||
this.createConfigurationSectionContainer(loc.coresRequest, this.coordinatorCoresRequestBox),
|
this.createConfigurationSectionContainer(loc.coresRequest, this.coordinatorCoresRequestBox),
|
||||||
this.createConfigurationSectionContainer(loc.coresLimit, this.coordinatorCoresLimitBox),
|
this.createConfigurationSectionContainer(loc.coresLimit, this.coordinatorCoresLimitBox),
|
||||||
this.createConfigurationSectionContainer(loc.memoryRequest, this.coordinatorMemoryRequestBox),
|
this.createConfigurationSectionContainer(loc.memoryRequest, this.coordinatorMemoryRequestBox),
|
||||||
@@ -469,34 +324,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private createWorkerNodesSectionContainer(): azdata.FlexContainer {
|
|
||||||
const inputFlex = { flex: '0 1 150px' };
|
|
||||||
const keyFlex = { flex: `0 1 250px` };
|
|
||||||
|
|
||||||
const flexContainer = this.modelView.modelBuilder.flexContainer().withLayout({
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
alignItems: 'center'
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
const keyComponent = this.modelView.modelBuilder.text().withProps({
|
|
||||||
value: loc.workerNodeCount,
|
|
||||||
requiredIndicator: true,
|
|
||||||
description: loc.workerNodesInformation,
|
|
||||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
const keyContainer = this.modelView.modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();
|
|
||||||
keyContainer.addItem(keyComponent, { CSSStyles: { 'margin-right': '0px', 'margin-bottom': '15px' } });
|
|
||||||
|
|
||||||
flexContainer.addItem(keyContainer, keyFlex);
|
|
||||||
|
|
||||||
const inputContainer = this.modelView.modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();
|
|
||||||
inputContainer.addItem(this.workerCountBox, { CSSStyles: { 'margin-bottom': '15px', 'min-width': '50px', 'max-width': '225px' } });
|
|
||||||
|
|
||||||
flexContainer.addItem(inputContainer, inputFlex);
|
|
||||||
|
|
||||||
return flexContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
private createConfigurationSectionContainer(key: string, input: azdata.Component): azdata.FlexContainer {
|
private createConfigurationSectionContainer(key: string, input: azdata.Component): azdata.FlexContainer {
|
||||||
const inputFlex = { flex: '0 1 150px' };
|
const inputFlex = { flex: '0 1 150px' };
|
||||||
@@ -550,17 +377,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private editWorkerNodeCount(): void {
|
private createCoresMemorySection(title: string): azdata.DivContainer {
|
||||||
// scale.shards was renamed to scale.workers. Check both for backwards compatibility.
|
|
||||||
let scale = this._postgresModel.config?.spec.scale;
|
|
||||||
this.currentConfiguration.workers = scale?.workers ?? scale?.shards ?? 0;
|
|
||||||
|
|
||||||
this.workerCountBox.placeHolder = '';
|
|
||||||
this.workerCountBox.value = this.currentConfiguration.workers.toString();
|
|
||||||
this.saveArgs.workers = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
private createCoresMemorySection(title: string, description: string): azdata.DivContainer {
|
|
||||||
const titleFlex = { flex: `0 1 250px` };
|
const titleFlex = { flex: `0 1 250px` };
|
||||||
|
|
||||||
const flexContainer = this.modelView.modelBuilder.flexContainer().withLayout({
|
const flexContainer = this.modelView.modelBuilder.flexContainer().withLayout({
|
||||||
@@ -570,12 +387,11 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
const titleComponent = this.modelView.modelBuilder.text().withProps({
|
const titleComponent = this.modelView.modelBuilder.text().withProps({
|
||||||
value: title,
|
value: title,
|
||||||
description: description,
|
|
||||||
CSSStyles: { ...cssStyles.title, 'font-weight': 'bold', 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
CSSStyles: { ...cssStyles.title, 'font-weight': 'bold', 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
const titleContainer = this.modelView.modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();
|
const titleContainer = this.modelView.modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();
|
||||||
titleContainer.addItem(titleComponent, { CSSStyles: { 'margin-right': '0px', 'margin-bottom': '15px' } });
|
titleContainer.addItem(titleComponent, { CSSStyles: { 'margin-right': '0px', 'margin-bottom': '15px', 'margin-top': '15px' } });
|
||||||
|
|
||||||
flexContainer.addItem(titleContainer, titleFlex);
|
flexContainer.addItem(titleContainer, titleFlex);
|
||||||
|
|
||||||
@@ -586,15 +402,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private refreshCoresRequest(): void {
|
private refreshCoresRequest(): void {
|
||||||
// Workers
|
|
||||||
let workersCR = this._postgresModel.config?.spec.scheduling?.roles?.worker?.resources?.requests?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.cpu;
|
|
||||||
if (!workersCR) {
|
|
||||||
workersCR = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.workerCoresRequestBox.placeHolder = '';
|
|
||||||
this.workerCoresRequestBox.value = workersCR;
|
|
||||||
|
|
||||||
// Coordinator
|
// Coordinator
|
||||||
let coordinatorCR = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.requests?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.cpu;
|
let coordinatorCR = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.requests?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.cpu;
|
||||||
if (!coordinatorCR) {
|
if (!coordinatorCR) {
|
||||||
@@ -606,7 +413,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
// Update saved current configuration
|
// Update saved current configuration
|
||||||
this.currentConfiguration.coresRequest = {
|
this.currentConfiguration.coresRequest = {
|
||||||
workers: workersCR,
|
|
||||||
coordinator: coordinatorCR
|
coordinator: coordinatorCR
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -615,15 +421,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private refreshCoresLimit(): void {
|
private refreshCoresLimit(): void {
|
||||||
// Workers
|
|
||||||
let workersCL = this._postgresModel.config?.spec.scheduling?.roles?.worker?.resources?.limits?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.cpu;
|
|
||||||
if (!workersCL) {
|
|
||||||
workersCL = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.workerCoresLimitBox.placeHolder = '';
|
|
||||||
this.workerCoresLimitBox.value = workersCL;
|
|
||||||
|
|
||||||
// Coordinator
|
// Coordinator
|
||||||
let coordinatorCL = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.limits?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.cpu;
|
let coordinatorCL = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.limits?.cpu ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.cpu;
|
||||||
if (!coordinatorCL) {
|
if (!coordinatorCL) {
|
||||||
@@ -635,7 +432,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
// Update saved current configuration
|
// Update saved current configuration
|
||||||
this.currentConfiguration.coresLimit = {
|
this.currentConfiguration.coresLimit = {
|
||||||
workers: workersCL,
|
|
||||||
coordinator: coordinatorCL
|
coordinator: coordinatorCL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -644,16 +440,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private refreshMemoryRequest(): void {
|
private refreshMemoryRequest(): void {
|
||||||
// Workers
|
|
||||||
let currentWorkersMemoryRequest = this._postgresModel.config?.spec.scheduling?.roles?.worker?.resources?.requests?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.memory;
|
|
||||||
let workersMR = '';
|
|
||||||
if (currentWorkersMemoryRequest) {
|
|
||||||
workersMR = convertToGibibyteString(currentWorkersMemoryRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.workerMemoryRequestBox.placeHolder = '';
|
|
||||||
this.workerMemoryRequestBox.value = workersMR;
|
|
||||||
|
|
||||||
// Coordinator
|
// Coordinator
|
||||||
let currentCoordinatorMemoryRequest = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.requests?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.memory;
|
let currentCoordinatorMemoryRequest = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.requests?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.requests?.memory;
|
||||||
let coordinatorMR = '';
|
let coordinatorMR = '';
|
||||||
@@ -666,7 +452,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
// Update saved current configuration
|
// Update saved current configuration
|
||||||
this.currentConfiguration.memoryRequest = {
|
this.currentConfiguration.memoryRequest = {
|
||||||
workers: workersMR,
|
|
||||||
coordinator: coordinatorMR
|
coordinator: coordinatorMR
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -675,16 +460,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private refreshMemoryLimit(): void {
|
private refreshMemoryLimit(): void {
|
||||||
// Workers
|
|
||||||
let currentWorkersMemoryLimit = this._postgresModel.config?.spec.scheduling?.roles?.worker?.resources?.limits?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.memory;
|
|
||||||
let workersML = '';
|
|
||||||
if (currentWorkersMemoryLimit) {
|
|
||||||
workersML = convertToGibibyteString(currentWorkersMemoryLimit);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.workerMemoryLimitBox.placeHolder = '';
|
|
||||||
this.workerMemoryLimitBox.value = workersML;
|
|
||||||
|
|
||||||
// Coordinator
|
// Coordinator
|
||||||
let currentCoordinatorMemoryLimit = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.limits?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.memory;
|
let currentCoordinatorMemoryLimit = this._postgresModel.config?.spec.scheduling?.roles?.coordinator?.resources?.limits?.memory ?? this._postgresModel.config?.spec.scheduling?.default?.resources?.limits?.memory;
|
||||||
let coordinatorML = '';
|
let coordinatorML = '';
|
||||||
@@ -697,7 +472,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
|
|
||||||
// Update saved current configuration
|
// Update saved current configuration
|
||||||
this.currentConfiguration.memoryLimit = {
|
this.currentConfiguration.memoryLimit = {
|
||||||
workers: workersML,
|
|
||||||
coordinator: coordinatorML
|
coordinator: coordinatorML
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -706,7 +480,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handleServiceUpdated(): void {
|
private handleServiceUpdated(): void {
|
||||||
this.editWorkerNodeCount();
|
|
||||||
this.refreshCoresRequest();
|
this.refreshCoresRequest();
|
||||||
this.refreshCoresLimit();
|
this.refreshCoresLimit();
|
||||||
this.refreshMemoryRequest();
|
this.refreshMemoryRequest();
|
||||||
|
|||||||
@@ -35,28 +35,4 @@ export class PostgresCoordinatorNodeParametersPage extends PostgresParametersPag
|
|||||||
return this._postgresModel.coordinatorNodeEngineSettings;
|
return this._postgresModel.coordinatorNodeEngineSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async saveParameterEdits(engineSettings: string): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ coordinatorEngineSettings: engineSettings },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async resetAllParameters(): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ coordinatorEngineSettings: `''`, replaceEngineSettings: true },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async resetParameter(parameterName: string): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ coordinatorEngineSettings: parameterName + '=' },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { ControllerModel } from '../../../models/controllerModel';
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
@@ -11,17 +10,11 @@ import { PostgresModel } from '../../../models/postgresModel';
|
|||||||
import { PostgresOverviewPage } from './postgresOverviewPage';
|
import { PostgresOverviewPage } from './postgresOverviewPage';
|
||||||
import { PostgresConnectionStringsPage } from './postgresConnectionStringsPage';
|
import { PostgresConnectionStringsPage } from './postgresConnectionStringsPage';
|
||||||
import { Dashboard } from '../../components/dashboard';
|
import { Dashboard } from '../../components/dashboard';
|
||||||
import { PostgresDiagnoseAndSolveProblemsPage } from './postgresDiagnoseAndSolveProblemsPage';
|
|
||||||
import { PostgresSupportRequestPage } from './postgresSupportRequestPage';
|
import { PostgresSupportRequestPage } from './postgresSupportRequestPage';
|
||||||
import { PostgresComputeAndStoragePage } from './postgresComputeAndStoragePage';
|
import { PostgresComputeAndStoragePage } from './postgresComputeAndStoragePage';
|
||||||
import { PostgresWorkerNodeParametersPage } from './postgresWorkerNodeParametersPage';
|
|
||||||
import { PostgresPropertiesPage } from './postgresPropertiesPage';
|
|
||||||
import { PostgresResourceHealthPage } from './postgresResourceHealthPage';
|
|
||||||
import { PostgresCoordinatorNodeParametersPage } from './postgresCoordinatorNodeParametersPage';
|
|
||||||
import { PostgresExtensionsPage } from './postgresExtensionsPage';
|
|
||||||
|
|
||||||
export class PostgresDashboard extends Dashboard {
|
export class PostgresDashboard extends Dashboard {
|
||||||
constructor(private _context: vscode.ExtensionContext, private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
|
constructor(private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
|
||||||
super(loc.postgresDashboard(_postgresModel.info.name), 'ArcPgDashboard');
|
super(loc.postgresDashboard(_postgresModel.info.name), 'ArcPgDashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,34 +28,22 @@ export class PostgresDashboard extends Dashboard {
|
|||||||
|
|
||||||
protected async registerTabs(modelView: azdata.ModelView): Promise<(azdata.DashboardTab | azdata.DashboardTabGroup)[]> {
|
protected async registerTabs(modelView: azdata.ModelView): Promise<(azdata.DashboardTab | azdata.DashboardTabGroup)[]> {
|
||||||
const overviewPage = new PostgresOverviewPage(modelView, this.dashboard, this._controllerModel, this._postgresModel);
|
const overviewPage = new PostgresOverviewPage(modelView, this.dashboard, this._controllerModel, this._postgresModel);
|
||||||
const extensionsPage = new PostgresExtensionsPage(modelView, this.dashboard, this._postgresModel);
|
|
||||||
const connectionStringsPage = new PostgresConnectionStringsPage(modelView, this.dashboard, this._postgresModel);
|
const connectionStringsPage = new PostgresConnectionStringsPage(modelView, this.dashboard, this._postgresModel);
|
||||||
const computeAndStoragePage = new PostgresComputeAndStoragePage(modelView, this.dashboard, this._postgresModel);
|
const computeAndStoragePage = new PostgresComputeAndStoragePage(modelView, this.dashboard, this._postgresModel);
|
||||||
const propertiesPage = new PostgresPropertiesPage(modelView, this.dashboard, this._controllerModel, this._postgresModel);
|
|
||||||
const coordinatorNodeParametersPage = new PostgresCoordinatorNodeParametersPage(modelView, this.dashboard, this._postgresModel);
|
|
||||||
const workerNodeParametersPage = new PostgresWorkerNodeParametersPage(modelView, this.dashboard, this._postgresModel);
|
|
||||||
const diagnoseAndSolveProblemsPage = new PostgresDiagnoseAndSolveProblemsPage(modelView, this.dashboard, this._context, this._controllerModel, this._postgresModel);
|
|
||||||
const supportRequestPage = new PostgresSupportRequestPage(modelView, this.dashboard, this._controllerModel, this._postgresModel);
|
const supportRequestPage = new PostgresSupportRequestPage(modelView, this.dashboard, this._controllerModel, this._postgresModel);
|
||||||
const resourceHealthPage = new PostgresResourceHealthPage(modelView, this.dashboard, this._postgresModel);
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
overviewPage.tab,
|
overviewPage.tab,
|
||||||
{
|
{
|
||||||
title: loc.settings,
|
title: loc.settings,
|
||||||
tabs: [
|
tabs: [
|
||||||
propertiesPage.tab,
|
|
||||||
extensionsPage.tab,
|
|
||||||
connectionStringsPage.tab,
|
connectionStringsPage.tab,
|
||||||
computeAndStoragePage.tab,
|
computeAndStoragePage.tab
|
||||||
coordinatorNodeParametersPage.tab,
|
|
||||||
workerNodeParametersPage.tab
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: loc.supportAndTroubleshooting,
|
title: loc.supportAndTroubleshooting,
|
||||||
tabs: [
|
tabs: [
|
||||||
resourceHealthPage.tab,
|
|
||||||
diagnoseAndSolveProblemsPage.tab,
|
|
||||||
supportRequestPage.tab
|
supportRequestPage.tab
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ export class PostgresExtensionsPage extends DashboardPage {
|
|||||||
try {
|
try {
|
||||||
this.addExtensionsButton.enabled = false;
|
this.addExtensionsButton.enabled = false;
|
||||||
this.dropExtensionsButton.enabled = false;
|
this.dropExtensionsButton.enabled = false;
|
||||||
let extensionList = this.extensionNames.length ? this.extensionNames.join() + ',' + extArg : extArg;
|
|
||||||
await vscode.window.withProgress(
|
await vscode.window.withProgress(
|
||||||
{
|
{
|
||||||
location: vscode.ProgressLocation.Notification,
|
location: vscode.ProgressLocation.Notification,
|
||||||
@@ -138,11 +137,9 @@ export class PostgresExtensionsPage extends DashboardPage {
|
|||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
await this._azApi.az.postgres.serverarc.update(
|
||||||
this._postgresModel.info.name,
|
this._postgresModel.info.name,
|
||||||
{
|
{},
|
||||||
extensions: extensionList
|
|
||||||
},
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
this._postgresModel.controllerModel.info.namespace,
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
||||||
|
|
||||||
@@ -272,11 +269,9 @@ export class PostgresExtensionsPage extends DashboardPage {
|
|||||||
cancellable: false
|
cancellable: false
|
||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
await this._azApi.az.postgres.serverarc.update(
|
||||||
this._postgresModel.info.name,
|
this._postgresModel.info.name,
|
||||||
{
|
{},
|
||||||
extensions: this.extensionNames.join()
|
|
||||||
},
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
this._postgresModel.controllerModel.info.namespace,
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars
|
this._postgresModel.controllerModel.azAdditionalEnvVars
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,16 +7,15 @@ import * as vscode from 'vscode';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azExt from 'az-ext';
|
import * as azExt from 'az-ext';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { IconPathHelper, cssStyles, iconSize } from '../../../constants';
|
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||||
import { DashboardPage } from '../../components/dashboardPage';
|
import { DashboardPage } from '../../components/dashboardPage';
|
||||||
import { ControllerModel } from '../../../models/controllerModel';
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
import { PostgresModel } from '../../../models/postgresModel';
|
import { PostgresModel } from '../../../models/postgresModel';
|
||||||
import { promptAndConfirmPassword, promptForInstanceDeletion } from '../../../common/utils';
|
import { promptForInstanceDeletion } from '../../../common/utils';
|
||||||
import { ResourceType } from 'arc';
|
import { ResourceType } from 'arc';
|
||||||
|
|
||||||
export type PodStatusModel = {
|
export type PodStatusModel = {
|
||||||
podName: azdata.Component,
|
podName: azdata.Component,
|
||||||
type: string,
|
|
||||||
status: string
|
status: string
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -32,9 +31,6 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
private grafanaLink!: azdata.HyperlinkComponent;
|
private grafanaLink!: azdata.HyperlinkComponent;
|
||||||
private deleteButton!: azdata.ButtonComponent;
|
private deleteButton!: azdata.ButtonComponent;
|
||||||
|
|
||||||
private podStatusTable!: azdata.DeclarativeTableComponent;
|
|
||||||
private podStatusData: PodStatusModel[] = [];
|
|
||||||
|
|
||||||
private readonly _azApi: azExt.IExtension;
|
private readonly _azApi: azExt.IExtension;
|
||||||
|
|
||||||
constructor(modelView: azdata.ModelView, dashboard: azdata.window.ModelViewDashboard, private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
|
constructor(modelView: azdata.ModelView, dashboard: azdata.window.ModelViewDashboard, private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
|
||||||
@@ -147,99 +143,11 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
}).component();
|
}).component();
|
||||||
content.addItem(endpointsTable);
|
content.addItem(endpointsTable);
|
||||||
|
|
||||||
// Server Group Nodes
|
|
||||||
content.addItem(this.modelView.modelBuilder.text().withProps({
|
|
||||||
value: loc.serverGroupNodes,
|
|
||||||
CSSStyles: titleCSS,
|
|
||||||
headingLevel: 1
|
|
||||||
}).component());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.podStatusTable = this.modelView.modelBuilder.declarativeTable().withProps({
|
|
||||||
width: '100%',
|
|
||||||
ariaLabel: loc.serverGroupNodes,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
displayName: loc.name,
|
|
||||||
valueType: azdata.DeclarativeDataType.component,
|
|
||||||
isReadOnly: true,
|
|
||||||
width: '35%',
|
|
||||||
headerCssStyles: cssStyles.tableHeader,
|
|
||||||
rowCssStyles: {
|
|
||||||
...cssStyles.tableRow,
|
|
||||||
'overflow': 'hidden',
|
|
||||||
'text-overflow': 'ellipsis',
|
|
||||||
'white-space': 'nowrap',
|
|
||||||
'max-width': '0'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: loc.type,
|
|
||||||
valueType: azdata.DeclarativeDataType.string,
|
|
||||||
isReadOnly: true,
|
|
||||||
width: '35%',
|
|
||||||
headerCssStyles: cssStyles.tableHeader,
|
|
||||||
rowCssStyles: cssStyles.tableRow
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayName: loc.status,
|
|
||||||
valueType: azdata.DeclarativeDataType.string,
|
|
||||||
isReadOnly: true,
|
|
||||||
width: '30%',
|
|
||||||
headerCssStyles: cssStyles.tableHeader,
|
|
||||||
rowCssStyles: cssStyles.tableRow
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataValues: this.createPodStatusDataValues()
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.serverGroupNodesLoading = this.modelView.modelBuilder.loadingComponent()
|
|
||||||
.withItem(this.podStatusTable)
|
|
||||||
.withProps({
|
|
||||||
loading: !this._postgresModel.configLastUpdated
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.refreshServerNodes();
|
|
||||||
|
|
||||||
content.addItem(this.serverGroupNodesLoading, { CSSStyles: cssStyles.text });
|
|
||||||
|
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected get toolbarContainer(): azdata.ToolbarContainer {
|
protected get toolbarContainer(): azdata.ToolbarContainer {
|
||||||
// Reset password
|
|
||||||
const resetPasswordButton = this.modelView.modelBuilder.button().withProps({
|
|
||||||
label: loc.resetPassword,
|
|
||||||
iconPath: IconPathHelper.edit
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
this.disposables.push(
|
|
||||||
resetPasswordButton.onDidClick(async () => {
|
|
||||||
resetPasswordButton.enabled = false;
|
|
||||||
try {
|
|
||||||
const password = await promptAndConfirmPassword(input => !input ? loc.enterANonEmptyPassword : '');
|
|
||||||
if (password) {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{
|
|
||||||
adminPassword: true,
|
|
||||||
noWait: true
|
|
||||||
},
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
Object.assign({ 'AZDATA_PASSWORD': password }, this._controllerModel.azAdditionalEnvVars));
|
|
||||||
vscode.window.showInformationMessage(loc.passwordReset);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
vscode.window.showErrorMessage(loc.passwordResetFailed(error));
|
|
||||||
} finally {
|
|
||||||
resetPasswordButton.enabled = true;
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
// Delete service
|
// Delete service
|
||||||
this.deleteButton = this.modelView.modelBuilder.button().withProps({
|
this.deleteButton = this.modelView.modelBuilder.button().withProps({
|
||||||
label: loc.deleteText,
|
label: loc.deleteText,
|
||||||
@@ -258,7 +166,7 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
cancellable: false
|
cancellable: false
|
||||||
},
|
},
|
||||||
async (_progress, _token) => {
|
async (_progress, _token) => {
|
||||||
return await this._azApi.az.postgres.arcserver.delete(this._postgresModel.info.name, this._postgresModel.controllerModel.info.namespace, this._controllerModel.azAdditionalEnvVars);
|
return await this._azApi.az.postgres.serverarc.delete(this._postgresModel.info.name, this._postgresModel.controllerModel.info.namespace, this._controllerModel.azAdditionalEnvVars);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
await this._controllerModel.refreshTreeNode();
|
await this._controllerModel.refreshTreeNode();
|
||||||
@@ -323,7 +231,6 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
return this.modelView.modelBuilder.toolbarContainer().withToolbarItems([
|
return this.modelView.modelBuilder.toolbarContainer().withToolbarItems([
|
||||||
{ component: resetPasswordButton },
|
|
||||||
{ component: this.deleteButton },
|
{ component: this.deleteButton },
|
||||||
{ component: refreshButton, toolbarSeparatorAfter: true },
|
{ component: refreshButton, toolbarSeparatorAfter: true },
|
||||||
{ component: openInAzurePortalButton }
|
{ component: openInAzurePortalButton }
|
||||||
@@ -341,70 +248,10 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
{ displayName: loc.namespace, value: this._postgresModel.config?.metadata.namespace || '-' },
|
{ displayName: loc.namespace, value: this._postgresModel.config?.metadata.namespace || '-' },
|
||||||
{ displayName: loc.subscriptionId, value: azure?.subscription || '-' },
|
{ displayName: loc.subscriptionId, value: azure?.subscription || '-' },
|
||||||
{ displayName: loc.externalEndpoint, value: this._postgresModel.config?.status.primaryEndpoint || '-' },
|
{ displayName: loc.externalEndpoint, value: this._postgresModel.config?.status.primaryEndpoint || '-' },
|
||||||
{ displayName: loc.status, value: status ? `${status.state} (${status.readyPods} ${loc.podsReady})` : '-' },
|
{ displayName: loc.status, value: status ? `${status.state} (${status.readyPods} ${loc.podsReady})` : '-' }
|
||||||
{ displayName: loc.postgresAdminUsername, value: 'postgres' },
|
|
||||||
{ displayName: loc.postgresVersion, value: this._postgresModel.engineVersion ?? '-' },
|
|
||||||
{ displayName: loc.nodeConfiguration, value: this._postgresModel.scaleConfiguration || '-' }
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPodStatus(): PodStatusModel[] {
|
|
||||||
let podModels: PodStatusModel[] = [];
|
|
||||||
const podStatus = this._postgresModel.config?.status.podsStatus;
|
|
||||||
|
|
||||||
podStatus?.forEach((p: { conditions: any[]; name: any; role: string; }) => {
|
|
||||||
// If a condition of the pod has a status of False, pod is not Ready
|
|
||||||
const status = p.conditions.find(c => c.status === 'False') ? loc.notReady : loc.ready;
|
|
||||||
|
|
||||||
const podLabelContainer = this.modelView.modelBuilder.flexContainer().withProps({
|
|
||||||
CSSStyles: { 'alignItems': 'center', 'height': '15px' }
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
const imageComponent = this.modelView.modelBuilder.image().withProps({
|
|
||||||
iconPath: IconPathHelper.postgres,
|
|
||||||
width: iconSize,
|
|
||||||
height: iconSize,
|
|
||||||
iconHeight: '15px',
|
|
||||||
iconWidth: '15px'
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
let podLabel = this.modelView.modelBuilder.text().withProps({
|
|
||||||
value: p.name,
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
if (p.role.toUpperCase() === loc.worker.toUpperCase()) {
|
|
||||||
podLabelContainer.addItem(imageComponent, { CSSStyles: { 'margin-left': '15px', 'margin-right': '0px' } });
|
|
||||||
podLabelContainer.addItem(podLabel);
|
|
||||||
let pod: PodStatusModel = {
|
|
||||||
podName: podLabelContainer,
|
|
||||||
type: loc.worker,
|
|
||||||
status: status
|
|
||||||
};
|
|
||||||
podModels.push(pod);
|
|
||||||
} else {
|
|
||||||
podLabelContainer.addItem(imageComponent, { CSSStyles: { 'margin-right': '0px' } });
|
|
||||||
podLabelContainer.addItem(podLabel);
|
|
||||||
let pod: PodStatusModel = {
|
|
||||||
podName: podLabelContainer,
|
|
||||||
type: loc.coordinator,
|
|
||||||
status: status
|
|
||||||
};
|
|
||||||
podModels.unshift(pod);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return podModels;
|
|
||||||
}
|
|
||||||
|
|
||||||
private createPodStatusDataValues(): azdata.DeclarativeTableCellValue[][] {
|
|
||||||
let podDataValue: (string | azdata.Component)[][] = this.podStatusData.map(p => [p.podName, p.type, p.status]);
|
|
||||||
return podDataValue.map(p => {
|
|
||||||
return p.map((value): azdata.DeclarativeTableCellValue => {
|
|
||||||
return { value: value };
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private refreshDashboardLinks(): void {
|
private refreshDashboardLinks(): void {
|
||||||
if (this._postgresModel.config) {
|
if (this._postgresModel.config) {
|
||||||
const kibanaUrl = this._postgresModel.config.status.logSearchDashboard ?? '';
|
const kibanaUrl = this._postgresModel.config.status.logSearchDashboard ?? '';
|
||||||
@@ -419,14 +266,6 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private refreshServerNodes(): void {
|
|
||||||
if (this._postgresModel.config) {
|
|
||||||
this.podStatusData = this.getPodStatus();
|
|
||||||
this.podStatusTable.setDataValues(this.createPodStatusDataValues());
|
|
||||||
this.serverGroupNodesLoading.loading = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private handleRegistrationsUpdated() {
|
private handleRegistrationsUpdated() {
|
||||||
this.properties!.propertyItems = this.getProperties();
|
this.properties!.propertyItems = this.getProperties();
|
||||||
this.propertiesLoading!.loading = false;
|
this.propertiesLoading!.loading = false;
|
||||||
@@ -436,6 +275,5 @@ export class PostgresOverviewPage extends DashboardPage {
|
|||||||
this.properties!.propertyItems = this.getProperties();
|
this.properties!.propertyItems = this.getProperties();
|
||||||
this.propertiesLoading!.loading = false;
|
this.propertiesLoading!.loading = false;
|
||||||
this.refreshDashboardLinks();
|
this.refreshDashboardLinks();
|
||||||
this.refreshServerNodes();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
this.parameterUpdates.forEach((value, key) => {
|
this.parameterUpdates.forEach((value, key) => {
|
||||||
engineSettings.push(`${key}="${value}"`);
|
engineSettings.push(`${key}="${value}"`);
|
||||||
});
|
});
|
||||||
await this.saveParameterEdits(engineSettings.toString());
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// If an error occurs while editing the instance then re-enable the save button since
|
// If an error occurs while editing the instance then re-enable the save button since
|
||||||
// the edit wasn't successfully applied
|
// the edit wasn't successfully applied
|
||||||
@@ -224,7 +223,6 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await this.resetAllParameters();
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// If an error occurs while resetting the instance then re-enable the reset button since
|
// If an error occurs while resetting the instance then re-enable the reset button since
|
||||||
// the edit wasn't successfully applied
|
// the edit wasn't successfully applied
|
||||||
@@ -425,7 +423,6 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
cancellable: false
|
cancellable: false
|
||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
await this.resetParameter(engineSetting.parameterName!);
|
|
||||||
try {
|
try {
|
||||||
await this.callGetEngineSettings();
|
await this.callGetEngineSettings();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -649,10 +646,4 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
await this.callGetEngineSettings();
|
await this.callGetEngineSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract saveParameterEdits(engineSettings: string): Promise<void>;
|
|
||||||
|
|
||||||
protected abstract resetAllParameters(): Promise<void>;
|
|
||||||
|
|
||||||
protected abstract resetParameter(parameterName: string): Promise<void>;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,9 +103,7 @@ export class PostgresPropertiesPage extends DashboardPage {
|
|||||||
new InputKeyValue(this.modelView.modelBuilder, loc.subscriptionId, this._controllerModel.controllerConfig?.spec.settings.azure.subscription ?? ''),
|
new InputKeyValue(this.modelView.modelBuilder, loc.subscriptionId, this._controllerModel.controllerConfig?.spec.settings.azure.subscription ?? ''),
|
||||||
new TextKeyValue(this.modelView.modelBuilder, loc.resourceGroup, this._controllerModel.controllerConfig?.spec.settings.azure.resourceGroup ?? ''),
|
new TextKeyValue(this.modelView.modelBuilder, loc.resourceGroup, this._controllerModel.controllerConfig?.spec.settings.azure.resourceGroup ?? ''),
|
||||||
new LinkKeyValue(this.modelView.modelBuilder, loc.dataController, this._controllerModel.controllerConfig?.metadata.name ?? '', () => controllerDashboard.showDashboard()),
|
new LinkKeyValue(this.modelView.modelBuilder, loc.dataController, this._controllerModel.controllerConfig?.metadata.name ?? '', () => controllerDashboard.showDashboard()),
|
||||||
new TextKeyValue(this.modelView.modelBuilder, loc.nodeConfiguration, this._postgresModel.scaleConfiguration ?? ''),
|
new TextKeyValue(this.modelView.modelBuilder, loc.status, status ? `${status.state} (${status.readyPods} ${loc.podsReady})` : loc.unknown)
|
||||||
new TextKeyValue(this.modelView.modelBuilder, loc.status, status ? `${status.state} (${status.readyPods} ${loc.podsReady})` : loc.unknown),
|
|
||||||
new TextKeyValue(this.modelView.modelBuilder, loc.postgresVersion, this._postgresModel.engineVersion ?? ''),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,27 +36,4 @@ export class PostgresWorkerNodeParametersPage extends PostgresParametersPage {
|
|||||||
return this._postgresModel.workerNodesEngineSettings;
|
return this._postgresModel.workerNodesEngineSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async saveParameterEdits(engineSettings: string): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ workerEngineSettings: engineSettings },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async resetAllParameters(): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ workerEngineSettings: `''`, replaceEngineSettings: true },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected async resetParameter(parameterName: string): Promise<void> {
|
|
||||||
await this._azApi.az.postgres.arcserver.edit(
|
|
||||||
this._postgresModel.info.name,
|
|
||||||
{ workerEngineSettings: parameterName + '=' },
|
|
||||||
this._postgresModel.controllerModel.info.namespace,
|
|
||||||
this._postgresModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export class AzureArcTreeDataProvider implements vscode.TreeDataProvider<TreeNod
|
|||||||
if (controllerNode) {
|
if (controllerNode) {
|
||||||
controllerNode.model.info = model.info;
|
controllerNode.model.info = model.info;
|
||||||
} else {
|
} else {
|
||||||
this._controllerNodes.push(new ControllerTreeNode(model, this._context, this));
|
this._controllerNodes.push(new ControllerTreeNode(model, this));
|
||||||
}
|
}
|
||||||
if (refreshTree) {
|
if (refreshTree) {
|
||||||
this._onDidChangeTreeData.fire(undefined);
|
this._onDidChangeTreeData.fire(undefined);
|
||||||
@@ -85,7 +85,7 @@ export class AzureArcTreeDataProvider implements vscode.TreeDataProvider<TreeNod
|
|||||||
const controllerMementos: ControllerInfo[] = this._context.globalState.get(mementoToken) || [];
|
const controllerMementos: ControllerInfo[] = this._context.globalState.get(mementoToken) || [];
|
||||||
this._controllerNodes = controllerMementos.map(memento => {
|
this._controllerNodes = controllerMementos.map(memento => {
|
||||||
const controllerModel = new ControllerModel(this, memento);
|
const controllerModel = new ControllerModel(this, memento);
|
||||||
return new ControllerTreeNode(controllerModel, this._context, this);
|
return new ControllerTreeNode(controllerModel, this);
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
this._loading = false;
|
this._loading = false;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class ControllerTreeNode extends TreeNode {
|
|||||||
|
|
||||||
private _children: ResourceTreeNode<ResourceModel>[] = [];
|
private _children: ResourceTreeNode<ResourceModel>[] = [];
|
||||||
|
|
||||||
constructor(public model: ControllerModel, private _context: vscode.ExtensionContext, private _treeDataProvider: AzureArcTreeDataProvider) {
|
constructor(public model: ControllerModel, private _treeDataProvider: AzureArcTreeDataProvider) {
|
||||||
super(model.label, vscode.TreeItemCollapsibleState.Collapsed, ResourceType.dataControllers);
|
super(model.label, vscode.TreeItemCollapsibleState.Collapsed, ResourceType.dataControllers);
|
||||||
model.onInfoUpdated(_ => {
|
model.onInfoUpdated(_ => {
|
||||||
this.label = model.label;
|
this.label = model.label;
|
||||||
@@ -107,7 +107,7 @@ export class ControllerTreeNode extends TreeNode {
|
|||||||
info.name === resourceInfo.name &&
|
info.name === resourceInfo.name &&
|
||||||
info.resourceType === resourceInfo.resourceType) as PGResourceInfo)?.userName;
|
info.resourceType === resourceInfo.resourceType) as PGResourceInfo)?.userName;
|
||||||
const postgresModel = new PostgresModel(this.model, resourceInfo, registration, this._treeDataProvider);
|
const postgresModel = new PostgresModel(this.model, resourceInfo, registration, this._treeDataProvider);
|
||||||
node = new PostgresTreeNode(postgresModel, this.model, this._context);
|
node = new PostgresTreeNode(postgresModel, this.model);
|
||||||
break;
|
break;
|
||||||
case ResourceType.sqlManagedInstances:
|
case ResourceType.sqlManagedInstances:
|
||||||
// Fill in the username too if we already have it
|
// Fill in the username too if we already have it
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ import { ResourceTreeNode } from './resourceTreeNode';
|
|||||||
*/
|
*/
|
||||||
export class PostgresTreeNode extends ResourceTreeNode<PostgresModel> {
|
export class PostgresTreeNode extends ResourceTreeNode<PostgresModel> {
|
||||||
|
|
||||||
constructor(model: PostgresModel, private _controllerModel: ControllerModel, private _context: vscode.ExtensionContext) {
|
constructor(model: PostgresModel, private _controllerModel: ControllerModel) {
|
||||||
super(model.info.name, vscode.TreeItemCollapsibleState.None, ResourceType.postgresInstances, model);
|
super(model.info.name, vscode.TreeItemCollapsibleState.None, ResourceType.postgresInstances, model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async openDashboard(): Promise<void> {
|
public override async openDashboard(): Promise<void> {
|
||||||
const postgresDashboard = new PostgresDashboard(this._context, this._controllerModel, this.model);
|
const postgresDashboard = new PostgresDashboard(this._controllerModel, this.model);
|
||||||
await postgresDashboard.showDashboard();
|
await postgresDashboard.showDashboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "azcli",
|
"name": "azcli",
|
||||||
"displayName": "%azcli.arc.displayName%",
|
"displayName": "%azcli.arc.displayName%",
|
||||||
"description": "%azcli.arc.description%",
|
"description": "%azcli.arc.description%",
|
||||||
"version": "1.5.1",
|
"version": "1.5.2",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||||
"icon": "images/extension.png",
|
"icon": "images/extension.png",
|
||||||
|
|||||||
@@ -71,44 +71,37 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
postgres: {
|
postgres: {
|
||||||
arcserver: {
|
serverarc: {
|
||||||
delete: async (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
delete: async (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||||
await localAzDiscovered;
|
await localAzDiscovered;
|
||||||
validateAz(azToolService.localAz);
|
validateAz(azToolService.localAz);
|
||||||
return azToolService.localAz!.postgres.arcserver.delete(name, namespace, additionalEnvVars);
|
return azToolService.localAz!.postgres.serverarc.delete(name, namespace, additionalEnvVars);
|
||||||
},
|
},
|
||||||
list: async (namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
list: async (namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||||
await localAzDiscovered;
|
await localAzDiscovered;
|
||||||
validateAz(azToolService.localAz);
|
validateAz(azToolService.localAz);
|
||||||
return azToolService.localAz!.postgres.arcserver.list(namespace, additionalEnvVars);
|
return azToolService.localAz!.postgres.serverarc.list(namespace, additionalEnvVars);
|
||||||
},
|
},
|
||||||
show: async (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
show: async (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||||
await localAzDiscovered;
|
await localAzDiscovered;
|
||||||
validateAz(azToolService.localAz);
|
validateAz(azToolService.localAz);
|
||||||
return azToolService.localAz!.postgres.arcserver.show(name, namespace, additionalEnvVars);
|
return azToolService.localAz!.postgres.serverarc.show(name, namespace, additionalEnvVars);
|
||||||
},
|
},
|
||||||
edit: async (
|
update: async (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
adminPassword?: boolean;
|
|
||||||
coresLimit?: string;
|
coresLimit?: string;
|
||||||
coresRequest?: string;
|
coresRequest?: string;
|
||||||
coordinatorEngineSettings?: string;
|
|
||||||
engineSettings?: string;
|
|
||||||
extensions?: string;
|
|
||||||
memoryLimit?: string;
|
memoryLimit?: string;
|
||||||
memoryRequest?: string;
|
memoryRequest?: string;
|
||||||
noWait?: boolean;
|
noWait?: boolean;
|
||||||
port?: number;
|
port?: number;
|
||||||
replaceEngineSettings?: boolean;
|
|
||||||
workerEngineSettings?: string;
|
|
||||||
workers?: number;
|
|
||||||
},
|
},
|
||||||
namespace: string,
|
namespace: string,
|
||||||
additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||||
await localAzDiscovered;
|
await localAzDiscovered;
|
||||||
validateAz(azToolService.localAz);
|
validateAz(azToolService.localAz);
|
||||||
return azToolService.localAz!.postgres.arcserver.edit(name, args, namespace, additionalEnvVars);
|
return azToolService.localAz!.postgres.serverarc.update(name, args, namespace, additionalEnvVars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -127,49 +127,35 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public postgres = {
|
public postgres = {
|
||||||
arcserver: {
|
serverarc: {
|
||||||
delete: (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<void>> => {
|
delete: (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<void>> => {
|
||||||
return this.executeCommand<void>(['postgres', 'arc-server', 'delete', '-n', name, '--k8s-namespace', namespace, '--force', '--use-k8s'], additionalEnvVars);
|
return this.executeCommand<void>(['postgres', 'server-arc', 'delete', '-n', name, '--k8s-namespace', namespace, '--force', '--use-k8s'], additionalEnvVars);
|
||||||
},
|
},
|
||||||
list: (namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<azExt.PostgresServerListResult[]>> => {
|
list: (namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<azExt.PostgresServerListResult[]>> => {
|
||||||
return this.executeCommand<azExt.PostgresServerListResult[]>(['postgres', 'arc-server', 'list', '--k8s-namespace', namespace, '--use-k8s'], additionalEnvVars);
|
return this.executeCommand<azExt.PostgresServerListResult[]>(['postgres', 'server-arc', 'list', '--k8s-namespace', namespace, '--use-k8s'], additionalEnvVars);
|
||||||
},
|
},
|
||||||
show: (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<azExt.PostgresServerShowResult>> => {
|
show: (name: string, namespace: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<azExt.PostgresServerShowResult>> => {
|
||||||
return this.executeCommand<azExt.PostgresServerShowResult>(['postgres', 'arc-server', 'show', '-n', name, '--k8s-namespace', namespace, '--use-k8s'], additionalEnvVars);
|
return this.executeCommand<azExt.PostgresServerShowResult>(['postgres', 'server-arc', 'show', '-n', name, '--k8s-namespace', namespace, '--use-k8s'], additionalEnvVars);
|
||||||
},
|
},
|
||||||
edit: (
|
update: (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
adminPassword?: boolean,
|
|
||||||
coresLimit?: string,
|
coresLimit?: string,
|
||||||
coresRequest?: string,
|
coresRequest?: string,
|
||||||
coordinatorEngineSettings?: string,
|
|
||||||
engineSettings?: string,
|
|
||||||
extensions?: string,
|
|
||||||
memoryLimit?: string,
|
memoryLimit?: string,
|
||||||
memoryRequest?: string,
|
memoryRequest?: string,
|
||||||
noWait?: boolean,
|
noWait?: boolean,
|
||||||
port?: number,
|
port?: number
|
||||||
replaceEngineSettings?: boolean,
|
|
||||||
workerEngineSettings?: string,
|
|
||||||
workers?: number
|
|
||||||
},
|
},
|
||||||
namespace: string,
|
namespace: string,
|
||||||
additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<void>> => {
|
additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<void>> => {
|
||||||
const argsArray = ['postgres', 'arc-server', 'edit', '-n', name, '--k8s-namespace', namespace, '--use-k8s'];
|
const argsArray = ['postgres', 'server-arc', 'update', '-n', name, '--k8s-namespace', namespace, '--use-k8s'];
|
||||||
if (args.adminPassword) { argsArray.push('--admin-password'); }
|
|
||||||
if (args.coresLimit) { argsArray.push('--cores-limit', args.coresLimit); }
|
if (args.coresLimit) { argsArray.push('--cores-limit', args.coresLimit); }
|
||||||
if (args.coresRequest) { argsArray.push('--cores-request', args.coresRequest); }
|
if (args.coresRequest) { argsArray.push('--cores-request', args.coresRequest); }
|
||||||
if (args.coordinatorEngineSettings) { argsArray.push('--coordinator-settings', args.coordinatorEngineSettings); }
|
|
||||||
if (args.engineSettings) { argsArray.push('--engine-settings', args.engineSettings); }
|
|
||||||
if (args.extensions) { argsArray.push('--extensions', args.extensions); }
|
|
||||||
if (args.memoryLimit) { argsArray.push('--memory-limit', args.memoryLimit); }
|
if (args.memoryLimit) { argsArray.push('--memory-limit', args.memoryLimit); }
|
||||||
if (args.memoryRequest) { argsArray.push('--memory-request', args.memoryRequest); }
|
if (args.memoryRequest) { argsArray.push('--memory-request', args.memoryRequest); }
|
||||||
if (args.noWait) { argsArray.push('--no-wait'); }
|
if (args.noWait) { argsArray.push('--no-wait'); }
|
||||||
if (args.port) { argsArray.push('--port', args.port.toString()); }
|
if (args.port) { argsArray.push('--port', args.port.toString()); }
|
||||||
if (args.replaceEngineSettings) { argsArray.push('--replace-settings'); }
|
|
||||||
if (args.workerEngineSettings) { argsArray.push('--worker-settings', args.workerEngineSettings); }
|
|
||||||
if (args.workers !== undefined) { argsArray.push('--workers', args.workers.toString()); }
|
|
||||||
return this.executeCommand<void>(argsArray, additionalEnvVars);
|
return this.executeCommand<void>(argsArray, additionalEnvVars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,66 +44,51 @@ describe('az', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('postgres', function (): void {
|
describe('postgres', function (): void {
|
||||||
describe('arc-server', function (): void {
|
describe('server-arc', function (): void {
|
||||||
it('delete', async function (): Promise<void> {
|
it('delete', async function (): Promise<void> {
|
||||||
await azTool.postgres.arcserver.delete(name, namespace);
|
await azTool.postgres.serverarc.delete(name, namespace);
|
||||||
verifyExecuteCommandCalledWithArgs(['postgres', 'arc-server', 'delete', name, '--k8s-namespace', namespace]);
|
verifyExecuteCommandCalledWithArgs(['postgres', 'server-arc', 'delete', name, '--k8s-namespace', namespace]);
|
||||||
});
|
});
|
||||||
it('list', async function (): Promise<void> {
|
it('list', async function (): Promise<void> {
|
||||||
await azTool.postgres.arcserver.list(namespace);
|
await azTool.postgres.serverarc.list(namespace);
|
||||||
verifyExecuteCommandCalledWithArgs(['postgres', 'arc-server', 'list', '--k8s-namespace', namespace]);
|
verifyExecuteCommandCalledWithArgs(['postgres', 'server-arc', 'list', '--k8s-namespace', namespace]);
|
||||||
});
|
});
|
||||||
it('show', async function (): Promise<void> {
|
it('show', async function (): Promise<void> {
|
||||||
await azTool.postgres.arcserver.show(name, namespace);
|
await azTool.postgres.serverarc.show(name, namespace);
|
||||||
verifyExecuteCommandCalledWithArgs(['postgres', 'arc-server', 'show', name, '--k8s-namespace', namespace]);
|
verifyExecuteCommandCalledWithArgs(['postgres', 'server-arc', 'show', name, '--k8s-namespace', namespace]);
|
||||||
});
|
});
|
||||||
it.skip('edit', async function (): Promise<void> {
|
it.skip('update', async function (): Promise<void> {
|
||||||
const args = {
|
const args = {
|
||||||
adminPassword: true,
|
|
||||||
coresLimit: 'myCoresLimit',
|
coresLimit: 'myCoresLimit',
|
||||||
coresRequest: 'myCoresRequest',
|
coresRequest: 'myCoresRequest',
|
||||||
engineSettings: 'myEngineSettings',
|
|
||||||
extensions: 'myExtensions',
|
|
||||||
memoryLimit: 'myMemoryLimit',
|
memoryLimit: 'myMemoryLimit',
|
||||||
memoryRequest: 'myMemoryRequest',
|
memoryRequest: 'myMemoryRequest',
|
||||||
noWait: true,
|
noWait: true,
|
||||||
port: 1337,
|
port: 1337
|
||||||
replaceEngineSettings: true,
|
|
||||||
workers: 2
|
|
||||||
};
|
};
|
||||||
await azTool.postgres.arcserver.edit(name, args, namespace);
|
await azTool.postgres.serverarc.update(name, args, namespace);
|
||||||
verifyExecuteCommandCalledWithArgs([
|
verifyExecuteCommandCalledWithArgs([
|
||||||
'postgres', 'arc-server', 'edit',
|
'postgres', 'server-arc', 'update',
|
||||||
name,
|
name,
|
||||||
'--admin-password',
|
|
||||||
args.coresLimit,
|
args.coresLimit,
|
||||||
args.coresRequest,
|
args.coresRequest,
|
||||||
args.engineSettings,
|
|
||||||
args.extensions,
|
|
||||||
args.memoryLimit,
|
args.memoryLimit,
|
||||||
args.memoryRequest,
|
args.memoryRequest,
|
||||||
'--no-wait',
|
'--no-wait',
|
||||||
args.port.toString(),
|
args.port.toString()]);
|
||||||
'--replace-engine-settings',
|
|
||||||
args.workers.toString()]);
|
|
||||||
});
|
});
|
||||||
it('edit no optional args', async function (): Promise<void> {
|
it('update no optional args', async function (): Promise<void> {
|
||||||
await azTool.postgres.arcserver.edit(name, {}, namespace);
|
await azTool.postgres.serverarc.update(name, {}, namespace);
|
||||||
verifyExecuteCommandCalledWithArgs([
|
verifyExecuteCommandCalledWithArgs([
|
||||||
'postgres', 'arc-server', 'edit',
|
'postgres', 'server-arc', 'update',
|
||||||
name]);
|
name]);
|
||||||
verifyExecuteCommandCalledWithoutArgs([
|
verifyExecuteCommandCalledWithoutArgs([
|
||||||
'--admin-password',
|
|
||||||
'--cores-limit',
|
'--cores-limit',
|
||||||
'--cores-request',
|
'--cores-request',
|
||||||
'--engine-settings',
|
|
||||||
'--extensions',
|
|
||||||
'--memory-limit',
|
'--memory-limit',
|
||||||
'--memory-request',
|
'--memory-request',
|
||||||
'--no-wait',
|
'--no-wait',
|
||||||
'--port',
|
'--port']);
|
||||||
'--replace-engine-settings',
|
|
||||||
'--workers']);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
13
extensions/azcli/src/typings/az-ext.d.ts
vendored
13
extensions/azcli/src/typings/az-ext.d.ts
vendored
@@ -549,26 +549,19 @@ declare module 'az-ext' {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
postgres: {
|
postgres: {
|
||||||
arcserver: {
|
serverarc: {
|
||||||
delete(name: string, namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<void>>,
|
delete(name: string, namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<void>>,
|
||||||
list(namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<PostgresServerListResult[]>>,
|
list(namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<PostgresServerListResult[]>>,
|
||||||
show(name: string, namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<PostgresServerShowResult>>,
|
show(name: string, namespace?: string, additionalEnvVars?: AdditionalEnvVars): Promise<AzOutput<PostgresServerShowResult>>,
|
||||||
edit(
|
update(
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
adminPassword?: boolean,
|
|
||||||
coresLimit?: string,
|
coresLimit?: string,
|
||||||
coresRequest?: string,
|
coresRequest?: string,
|
||||||
coordinatorEngineSettings?: string,
|
|
||||||
engineSettings?: string,
|
|
||||||
extensions?: string,
|
|
||||||
memoryLimit?: string,
|
memoryLimit?: string,
|
||||||
memoryRequest?: string,
|
memoryRequest?: string,
|
||||||
noWait?: boolean,
|
noWait?: boolean,
|
||||||
port?: number,
|
port?: number
|
||||||
replaceEngineSettings?: boolean,
|
|
||||||
workerEngineSettings?: string,
|
|
||||||
workers?: number
|
|
||||||
},
|
},
|
||||||
namespace?: string,
|
namespace?: string,
|
||||||
additionalEnvVars?: AdditionalEnvVars
|
additionalEnvVars?: AdditionalEnvVars
|
||||||
|
|||||||
Reference in New Issue
Block a user