-
Notifications
You must be signed in to change notification settings - Fork 1.5k
appservice-kube extension #3934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zhoxing-ms
merged 130 commits into
Azure:main
from
calvinsID:lima-extension-remove-local-sdk
Oct 27, 2021
Merged
Changes from 121 commits
Commits
Show all changes
130 commits
Select commit
Hold shift + click to select a range
8ea8421
add appservice-kube extension
ebencarek aa0795f
Retrieving function triggers from the function image
SatishRanjan ff3b68f
Retrieving function triggers from the function image
SatishRanjan ca0276d
Fix appservice kube list by subscription
ebencarek 31c796b
Fix transient error when loading arguments
ebencarek 9a9a90f
Added az webapp up support
sanchitmehta b7fb864
Handled code review comments
sanchitmehta 7b62957
bump up version to 0.1.1
ebencarek bb3a2a2
Use custom sdk code for app service plan command sdk
ebencarek faebbf0
Version 0.1.2
ebencarek c3c0fd5
Private registry image support and fixig windows to unix line feed ch…
SatishRanjan 2e2ecb4
Removing debugpy.breaspoint() line
SatishRanjan 9a1f432
Update custom.py
SatishRanjan 60a3e9b
Update custom.py
SatishRanjan 694cf05
fixing the condition when the image is from the public registry with …
SatishRanjan 1d3f93c
Update sdk, add BYO AKS cluster to kube create command
ebencarek 2b27df4
Add version 0.1.3
ebencarek 8d4d3f0
Copying getfunctionsjson.sh as part of appservice-kube extension and …
SatishRanjan 9e95f2d
Adding version 0.1.4
ebencarek 714248e
fix
calvinsID 752926b
Update version to 0.1.5
ebencarek 11999bb
Update kube environments SDK
ebencarek 6432dbb
Add version 0.1.6
ebencarek ff7c355
Update kube environments SDK (using api version 2020-06-01), delete o…
ebencarek 35221e9
Add version 0.1.7
ebencarek eecafb2
remove azure-cli-core dependency
ebencarek ffcfc23
Add version 0.1.8
ebencarek c6b63e6
Add latest changes from cli core (except az webapp up)
calvinsID bb83774
Bugfix: if ftp deployment profile doesn't exist, zip deploy fails
calvinsID bb3f860
Bugfix: index.json had weird merge conflict
calvinsID b2293f6
Bugfix: webapp config container set wasn't setting
calvinsID 5bd7f73
Version 0.1.9
calvinsID b83b2a2
Add functionapp config container set
calvinsID db7a304
Start referencing main cli
calvinsID 3bf5215
Functionapp deployment source config-zip command fix (copy over from …
calvinsID 6ead073
Functions CLI should not pull docker image
calvinsID 6ee2fb5
Plan creation should drop --kube-environment and --kube-sku
calvinsID f03a04c
Change kind to 'linux,kubernetes'
calvinsID 2096657
Help text changes
calvinsID 7cda49f
Publish extension v 0.1.10
calvinsID 5d1d5e6
Version 0.1.11, since broke appservice plan create for non-k8se plans
calvinsID fa243d7
Allow specifying custom location by name rather than resource ID
calvinsID e2322a4
az appservice kube create command
calvinsID 18a95f3
Change ASP kind back to K8SE, reserved to None
calvinsID 34992e7
Publish 0.1.12 whl
calvinsID 2be983a
az webapp create doesn't require plan for k8se
calvinsID 42e83d0
Change app service plan kind to 'linux,kubernetes' and reserved=true if
calvinsID 0eac695
Webapp create should pass with ASP kind=linux if SKU is a kube sku
calvinsID 6878773
az functionapp create without plan
calvinsID fe960bb
Fix bug where if webapp/functionapp create called to update, if --pla…
calvinsID 81aa8db
fix webapp/functionapp create, if calling create again with new custo…
calvinsID b48e04d
Version 0.1.13
calvinsID 7d96f27
Version 0.1.14 temporary change to stop doing the list in web/func ap…
calvinsID 7fff6b2
Add better help text for appservice create with custom location
calvinsID 03cc4c8
Update appservice SDK for kube extension to 2020-12-01
calvinsID 40aa79d
Clean up az kube create
calvinsID cb8c593
Update to version 0.1.15
calvinsID f93c898
Fix dotnet5 bug
calvinsID 40afbc4
Converting skus for kubernetes ASPs to the new values
ebencarek 16ee7bb
Merge pull request #1 from calvinsID/user/ebcarek/new-kube-skus
calvinsID 96760a2
0.1.16 version
calvinsID 692e4fa
Set number of workers to 1 when creating ASP
calvinsID ed34d7b
Add webapp scale command
calvinsID c5c6f6b
Version 0.1.17 with az webapp scale
calvinsID 859bdf5
rename az webapp scale param
calvinsID 9105dfd
Move restart in from main CLI, since api returns 202 rather than 200.…
calvinsID db89855
Change SDK to have extended location envelope manually - need to see why
calvinsID 4ce2e59
Pass ExtendedLocationEnvelope to web/functionapp, appservice plan and…
calvinsID 908dd85
Version 0.1.18
calvinsID 5f12407
Remove webapp up from extension
calvinsID 0f85643
Use delete_app_settings function from cli core
calvinsID 1f2e1d3
Use webapp validator from core CLI
calvinsID 3cfdb04
Use updated update_app_settings function from core CLI
calvinsID 17dfd66
0.1.19 version
calvinsID 02770eb
Fix regression when using main CLI validators
calvinsID 4ffb55a
0.1.20 version
calvinsID 5549691
az appservice kube create: better error message when conflict
calvinsID ba59ea6
Remove vsts_cd_manager
calvinsID 0d174f4
Version 0.1.21
calvinsID e3afa2d
Merge latest master
calvinsID 97e4b5f
Update index.json
calvinsID 79aff04
K8se master kube env create validations (#3)
calvinsID 86d8a53
Version 0.2.0
calvinsID 9d29882
Use ExtendedLocation property ob object level (#4)
calvinsID 0508a6e
Static ip not required property in kube create
calvinsID a1ead2f
Version 0.2.1
calvinsID 550a56b
Fix NoneType object has no attribute custom_location error
calvinsID 6ab0f7b
Bugfix: Wrong custom location being used if multiple custom locations…
calvinsID d119388
Merge branch 'k8se-master' of https://github.com/calvinsID/azure-cli-…
calvinsID 7ccd608
Version 0.2.2
calvinsID f158c95
remove old SDK and start 'az appservice kube' rewrite
StrawnSC e1b8a14
rewrite 'az appservice kube show'
StrawnSC d7df221
rewrite 'az appservice kube list'
StrawnSC defcbad
rewrite 'az appservice kube delete'
StrawnSC af91efa
re-add appservice kube create checks and start appservice kube update…
StrawnSC afbac84
raise exception for 'az appservice kube update'
StrawnSC 75b6efe
add 'az appservice kube wait'
StrawnSC a245c55
add kube list pagination
StrawnSC 597c305
fix 'az appservice create'
StrawnSC 084a0ae
fix 'az appservice plan update'
StrawnSC c333051
fix 'az webapp create'
StrawnSC e941fa5
fix az webapp show/restart
StrawnSC ebb6a9c
remove 'az webapp config container set'
StrawnSC cb66bff
remove uneeded TODOs
StrawnSC 7fc671e
format results of 'az appservice kube show/list'
StrawnSC 110081f
remove TODOs and fix 'az webapp show -s'
StrawnSC 6731f84
add misc style fixes
StrawnSC e2344c8
fix more style issues
StrawnSC 68d70e4
revert src/index.json to master version
StrawnSC 1f640fc
add summary
StrawnSC a91b053
merge master and fix merge conflict
StrawnSC 6f4319c
fix linter issues
StrawnSC 9382be0
remove out-of-date test
StrawnSC 0b8c1dd
fix appservice kube CLI linter issues
StrawnSC 2256638
fix ASP sku validation
StrawnSC 8345bdf
fix style
StrawnSC 34aeafa
increment appservice-kube release number and fix service_name.json
StrawnSC 2d03c5d
fix hardcoded 'verify_linter.py'
StrawnSC 02d2e2e
add testing -- WIP
StrawnSC d614ed8
update codeowners and fix 'az appservice kube list' bug
StrawnSC aa1a81b
remove unfinished tests
StrawnSC da8fc36
remove unnecessary branching
StrawnSC 386c31e
remove unnecessary options lists
StrawnSC aecde8a
use specific CLI error types
StrawnSC aa79f3c
use more specific error type
StrawnSC 6b4ab5e
fix more error types
StrawnSC 66f1f8b
use HttpResponseError
StrawnSC 0dc7a9d
fix style
StrawnSC aa2a822
revert version and erase history
StrawnSC b469377
Merge branch 'main' into lima-extension-remove-local-sdk
StrawnSC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| .. :changelog: | ||
|
|
||
| Release History | ||
| =============== | ||
|
|
||
| 0.2.3 | ||
| ++++++ | ||
| * Rewrite commands to use the CLI's SDKs | ||
|
|
||
| 0.2.2 | ||
| ++++++ | ||
| * Fix wrong custom location being used if multiple custom locations of the same name in different RG | ||
|
|
||
| 0.2.1 | ||
| ++++++ | ||
| * Fix AppService plan creation | ||
| * location and static ip should be optional parameters in "az kube create" | ||
|
|
||
| 0.2.0 | ||
| ++++++ | ||
| * Requires core CLI 2.26.0 or later | ||
| * Validate extended location in "az kube create" | ||
|
|
||
| 0.1.21 | ||
| ++++++ | ||
| * Remove vsts_cd_manager that was removed from core CLI | ||
|
|
||
| 0.1.20 | ||
| ++++++ | ||
| * Fix regression when using main CLI validator | ||
|
|
||
| 0.1.19 | ||
| ++++++ | ||
| * Use update and delete appsettings from core CLI | ||
| * Remove webapp up code (not in use) | ||
|
|
||
| 0.1.18 | ||
| ++++++ | ||
| * Handle 202 response from webapp/functionapp restart (edited SDK manually) | ||
| * Pass ExtendedLocationEnvelope in webapp/functionapp/plan/kube creates (edited SDK manually) | ||
|
|
||
| 0.1.17 | ||
| ++++++ | ||
| * az webapp scale command | ||
|
|
||
| 0.1.16 | ||
| ++++++ | ||
| * Change k8se app sku to "K1" instead of "ANY", "ELASTICANY" | ||
|
|
||
| 0.1.15 | ||
| ++++++ | ||
| * Clean up az kube create parameters | ||
| * Update to 2020-12-01 SDK for k8se commands (removes --force parameter for az appservice kube delete) | ||
|
|
||
| 0.1.14 | ||
| ++++++ | ||
| * Stop using webapp list in creates - temporary fix for demo | ||
|
|
||
| 0.1.13 | ||
| ++++++ | ||
| * az webapp/functionapp create without --plan for k8se apps | ||
| * Change ASP "kind" back to "linux,kubernetes..." and detect k8se apps in webapp/functionapp create using customlocation/plan sku | ||
|
|
||
| 0.1.12 | ||
| ++++++ | ||
| * Allow specifying custom location by name as well, in appservice plan create | ||
| * az appservice kube create command | ||
| * Change ASP "kind" back to "K8SE", reserved to None so that "kind" is saved properly | ||
|
|
||
| 0.1.11 | ||
| ++++++ | ||
| * Oops broke AppService plan create for non-k8se | ||
|
|
||
| 0.1.10 | ||
| ++++++ | ||
| * Functions should not pull docker image | ||
| * Functionapp deployment source config-zip command | ||
| * AppService plan create should drop --kube-environment and --kube-sku | ||
| * Change kind to 'linux,kubernetes' | ||
|
|
||
| 0.1.9 | ||
| ++++++ | ||
| * Fix webapp zipdeploy command | ||
| * Fix webapp config container set command | ||
|
|
||
| 0.1.8 | ||
| ++++++ | ||
| * Remove azure-cli-core dependency | ||
|
|
||
| 0.1.7 | ||
| ++++++ | ||
| * Update kube environments SDK | ||
| * Delete old parameters no longer in API | ||
|
|
||
| 0.1.6 | ||
| ++++++ | ||
| * Update SDK to fix appservice kube delete command | ||
|
|
||
| 0.1.5 | ||
| ++++++ | ||
| * Fix webapp show command | ||
|
|
||
| 0.1.4 | ||
| ++++++ | ||
| * Fix for including getfunctionsjson.sh in the extension package | ||
|
|
||
| 0.1.3 | ||
| ++++++ | ||
| * Add bring your own AKS cluster support | ||
|
|
||
| 0.1.2 | ||
| ++++++ | ||
| * Retrieve function triggers for kube function apps | ||
|
|
||
| 0.1.1 | ||
| ++++++ | ||
| * Add az webapp up support | ||
|
|
||
| 0.1.0 | ||
| ++++++ | ||
| * Initial release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Microsoft Azure CLI 'appservice-kube' Extension | ||
| ========================================== | ||
|
|
||
| The appservice-kube extension adds support for controlling App Service Kubernetes Environments. | ||
| See here for more information: https://docs.microsoft.com/en-us/azure/app-service/manage-create-arc-environment?tabs=bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core import AzCommandsLoader | ||
|
|
||
| from azext_appservice_kube._help import helps # pylint: disable=unused-import | ||
|
|
||
|
|
||
| class AppserviceCommandsLoader(AzCommandsLoader): | ||
|
|
||
| def __init__(self, cli_ctx=None): | ||
| from azure.cli.core.commands import CliCommandType | ||
| from azure.cli.core.profiles import ResourceType | ||
| appservice_custom = CliCommandType(operations_tmpl='azext_appservice_kube.custom#{}') | ||
| super().__init__(cli_ctx=cli_ctx, | ||
| custom_command_type=appservice_custom, | ||
| resource_type=ResourceType.MGMT_APPSERVICE) | ||
|
|
||
| def load_command_table(self, args): | ||
| super().load_command_table(args) | ||
| from azext_appservice_kube.commands import load_command_table | ||
| load_command_table(self, args) | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from sys import version_info | ||
| if version_info[0] < 3: | ||
| super().load_arguments(command) | ||
| else: | ||
| super().load_arguments(command) | ||
| from azext_appservice_kube._params import load_arguments | ||
| load_arguments(self, command) | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = AppserviceCommandsLoader | ||
21 changes: 21 additions & 0 deletions
21
src/appservice-kube/azext_appservice_kube/_appservice_utils.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from ._client_factory import web_client_factory | ||
|
|
||
|
|
||
| def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, | ||
| extra_parameter=None, client=None): | ||
| client = client or web_client_factory(cli_ctx) | ||
| operation = getattr(client.web_apps, | ||
| operation_name if slot is None else operation_name + '_slot') | ||
| if slot is None: | ||
| return (operation(resource_group_name, name) | ||
| if extra_parameter is None else operation(resource_group_name, | ||
| name, extra_parameter)) | ||
|
|
||
| return (operation(resource_group_name, name, slot) | ||
| if extra_parameter is None else operation(resource_group_name, | ||
| name, extra_parameter, slot)) |
54 changes: 54 additions & 0 deletions
54
src/appservice-kube/azext_appservice_kube/_client_factory.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
| from azure.cli.command_modules.appservice._client_factory import web_client_factory | ||
| from azure.cli.core.profiles import ResourceType | ||
|
|
||
|
|
||
| # pylint: disable=inconsistent-return-statements | ||
| def ex_handler_factory(creating_plan=False, no_throw=False): | ||
| def _polish_bad_errors(ex): | ||
| import json | ||
| from knack.util import CLIError | ||
| try: | ||
| detail = json.loads(ex.response.text)['Message'] | ||
| if creating_plan: | ||
| if 'Requested features are not supported in region' in detail: | ||
| detail = ("Plan with linux worker is not supported in current region. For " + | ||
| "supported regions, please refer to https://docs.microsoft.com/" | ||
| "azure/app-service-web/app-service-linux-intro") | ||
| elif 'Not enough available reserved instance servers to satisfy' in detail: | ||
| detail = ("Plan with Linux worker can only be created in a group " + | ||
| "which has never contained a Windows worker, and vice versa. " + | ||
| "Please use a new resource group. Original error:" + detail) | ||
| ex = CLIError(detail) | ||
StrawnSC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| except Exception: # pylint: disable=broad-except | ||
| pass | ||
| if no_throw: | ||
| return ex | ||
| raise ex | ||
| return _polish_bad_errors | ||
|
|
||
|
|
||
| def customlocation_client_factory(cli_ctx, **_): | ||
| return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_CUSTOMLOCATION) | ||
|
|
||
|
|
||
| def resource_client_factory(cli_ctx, **_): | ||
| return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) | ||
|
|
||
|
|
||
| def cf_plans(cli_ctx, *_): | ||
| return web_client_factory(cli_ctx).app_service_plans | ||
|
|
||
|
|
||
| def cf_compute_service(cli_ctx, *_): | ||
| return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_COMPUTE) | ||
|
|
||
|
|
||
| def cf_resource_groups(cli_ctx, subscription_id=None): | ||
| return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, | ||
| subscription_id=subscription_id).resource_groups | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core.decorators import Completer | ||
| from ._utils import _get_location_from_resource_group | ||
| from ._constants import KUBE_DEFAULT_SKU | ||
|
|
||
|
|
||
| @Completer | ||
| def get_vm_size_completion_list(cmd, prefix, namespace): # pylint: disable=unused-argument | ||
| """Return the intersection of the VM sizes allowed by the ACS SDK with those returned by the Compute Service.""" | ||
| from azure.mgmt.containerservice.models import ContainerServiceVMSizeTypes | ||
|
|
||
| location = _get_location(cmd.cli_ctx, namespace) | ||
| result = get_vm_sizes(cmd.cli_ctx, location) | ||
| return set(r.name for r in result) & set(c.value for c in ContainerServiceVMSizeTypes) | ||
|
|
||
|
|
||
| @Completer | ||
| def get_kube_sku_completion_list(cmd, prefix, namespace): # pylint: disable=unused-argument | ||
| """ | ||
| Return the VM sizes allowed by AKS, or 'ANY' | ||
| """ | ||
| return get_vm_size_completion_list(cmd, prefix, namespace) & set(KUBE_DEFAULT_SKU) | ||
|
|
||
|
|
||
| def get_vm_sizes(cli_ctx, location): | ||
| from ._client_factory import cf_compute_service | ||
| return cf_compute_service(cli_ctx).virtual_machine_sizes.list(location) | ||
|
|
||
|
|
||
| def _get_location(cli_ctx, namespace): | ||
| """ | ||
| Return an Azure location by using an explicit `--location` argument, then by `--resource-group`, and | ||
| finally by the subscription if neither argument was provided. | ||
| """ | ||
| from msrestazure.azure_exceptions import CloudError | ||
| from azure.cli.core.commands.parameters import get_one_of_subscription_locations | ||
|
|
||
| location = None | ||
| if getattr(namespace, 'location', None): | ||
| location = namespace.location | ||
| elif getattr(namespace, 'resource_group_name', None): | ||
| try: | ||
| location = _get_location_from_resource_group(cli_ctx, namespace.resource_group_name) | ||
| except CloudError as err: | ||
StrawnSC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| from argcomplete import warn | ||
| warn('Warning: {}'.format(err.message)) | ||
| if not location: | ||
| location = get_one_of_subscription_locations(cli_ctx) | ||
| return location | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| KUBE_DEFAULT_SKU = "K1" | ||
| KUBE_ASP_KIND = "linux,kubernetes" | ||
| KUBE_APP_KIND = "linux,kubernetes,app" | ||
| KUBE_CONTAINER_APP_KIND = 'linux,kubernetes,app,container' | ||
| KUBE_FUNCTION_APP_KIND = 'linux,kubernetes,functionapp' | ||
| KUBE_FUNCTION_CONTAINER_APP_KIND = 'linux,kubernetes,functionapp,container' | ||
|
|
||
| LINUX_RUNTIMES = ['dotnet', 'node', 'python', 'java'] | ||
| WINDOWS_RUNTIMES = ['dotnet', 'node', 'java', 'powershell'] | ||
|
|
||
| NODE_VERSION_DEFAULT = "10.14" | ||
| NODE_VERSION_NEWER = "12-lts" | ||
| NODE_EXACT_VERSION_DEFAULT = "10.14.1" | ||
| NETCORE_VERSION_DEFAULT = "2.2" | ||
| DOTNET_VERSION_DEFAULT = "4.7" | ||
| PYTHON_VERSION_DEFAULT = "3.7" | ||
| NETCORE_RUNTIME_NAME = "dotnetcore" | ||
| DOTNET_RUNTIME_NAME = "aspnet" | ||
| NODE_RUNTIME_NAME = "node" | ||
| PYTHON_RUNTIME_NAME = "python" | ||
| OS_DEFAULT = "Windows" | ||
| STATIC_RUNTIME_NAME = "static" # not an official supported runtime but used for CLI logic | ||
| NODE_VERSIONS = ['4.4', '4.5', '6.2', '6.6', '6.9', '6.11', '8.0', '8.1', '8.9', '8.11', '10.1', '10.10', '10.14'] | ||
| PYTHON_VERSIONS = ['3.7', '3.6', '2.7'] | ||
| NETCORE_VERSIONS = ['1.0', '1.1', '2.1', '2.2'] | ||
| DOTNET_VERSIONS = ['3.5', '4.7'] | ||
|
|
||
| LINUX_SKU_DEFAULT = "P1V2" | ||
| FUNCTIONS_VERSIONS = ['2', '3'] | ||
|
|
||
| # functions version : default node version | ||
| FUNCTIONS_VERSION_TO_DEFAULT_NODE_VERSION = { | ||
| '2': '~10', | ||
| '3': '~12' | ||
| } | ||
| # functions version -> runtime : default runtime version | ||
| FUNCTIONS_VERSION_TO_DEFAULT_RUNTIME_VERSION = { | ||
| '2': { | ||
| 'node': '8', | ||
| 'dotnet': '2', | ||
| 'python': '3.7', | ||
| 'java': '8' | ||
| }, | ||
| '3': { | ||
| 'node': '12', | ||
| 'dotnet': '3', | ||
| 'python': '3.7', | ||
| 'java': '8' | ||
| } | ||
| } | ||
| # functions version -> runtime : runtime versions | ||
| FUNCTIONS_VERSION_TO_SUPPORTED_RUNTIME_VERSIONS = { | ||
| '2': { | ||
| 'node': ['8', '10'], | ||
| 'python': ['3.6', '3.7'], | ||
| 'dotnet': ['2'], | ||
| 'java': ['8'] | ||
| }, | ||
| '3': { | ||
| 'node': ['10', '12'], | ||
| 'python': ['3.6', '3.7', '3.8'], | ||
| 'dotnet': ['3'], | ||
| 'java': ['8'] | ||
| } | ||
| } | ||
| # dotnet runtime version : dotnet linuxFxVersion | ||
| DOTNET_RUNTIME_VERSION_TO_DOTNET_LINUX_FX_VERSION = { | ||
| '2': '2.2', | ||
| '3': '3.1' | ||
| } | ||
|
|
||
| MULTI_CONTAINER_TYPES = ['COMPOSE', 'KUBE'] | ||
|
|
||
| OS_TYPES = ['Windows', 'Linux'] | ||
|
|
||
| CONTAINER_APPSETTING_NAMES = ['DOCKER_REGISTRY_SERVER_URL', 'DOCKER_REGISTRY_SERVER_USERNAME', | ||
| 'DOCKER_REGISTRY_SERVER_PASSWORD', "WEBSITES_ENABLE_APP_SERVICE_STORAGE"] | ||
| APPSETTINGS_TO_MASK = ['DOCKER_REGISTRY_SERVER_PASSWORD'] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.