From ea997580735a95f771d23be52c08ce62196ea1c5 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Thu, 22 Apr 2021 17:01:39 +0800 Subject: [PATCH 1/7] Add CustomContainer property to 2021-03-03-preview api versionto support byoc feature --- .../2021-03-03-preview/appplatform.json | 39 +++- ..._CreateOrUpdate_BringYourOwnContainer.json | 191 ++++++++++++++++++ ...Deployments_Get_BringYourOwnContainer.json | 61 ++++++ ...loyments_Update_BringYourOwnContainer.json | 126 ++++++++++++ 4 files changed, 416 insertions(+), 1 deletion(-) create mode 100644 specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json create mode 100644 specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json create mode 100644 specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json index 0698ac690bf6..c8402dbcf719 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json @@ -3897,7 +3897,8 @@ "enum": [ "Jar", "NetCoreZip", - "Source" + "Source", + "Container" ], "type": "string", "x-ms-enum": { @@ -3916,6 +3917,42 @@ "artifactSelector": { "description": "Selector for the artifact to be used for the deployment for multi-module projects. This should be\r\nthe relative path to the target module/project.", "type": "string" + }, + "customContainer": { + "$ref": "#/definitions/CustomContainer", + "description": "Custom container payload" + } + } + }, + "CustomContainer": { + "description": "Custom container payload", + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "The name of the registry that contains the container image" + }, + "containerImage": { + "type": "string", + "description": "Container image of the custom container. This should be in the form of : without the server name of the registry" + }, + "imageRegistryCredential": { + "$ref": "#/definitions/ImageRegistryCredential", + "description": "Credential of the image registry" + } + } + }, + "ImageRegistryCredential": { + "description": "Credential of the image registry", + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The username of the image registry credential" + }, + "password": { + "type": "string", + "description": "The password of the image registry credential" } } }, diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json new file mode 100644 index 000000000000..572aa77b5d92 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json @@ -0,0 +1,191 @@ +{ + "parameters": { + "deploymentResource": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "myPassword" + } + } + }, + "deploymentSettings": { + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "instances": null + } + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "api-version": "2021-03-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice", + "appName": "myapp", + "deploymentName": "mydeployment" + }, + "responses": { + "201": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Creating", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + }, + "200": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Succeeded", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + }, + "202": { + "body": { + "properties": { + "source": { + "type": "Source", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Updating", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + } + } + } + \ No newline at end of file diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json new file mode 100644 index 000000000000..322d79dd86c2 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-03-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice", + "appName": "myapp", + "deploymentName": "mydeployment" + }, + "responses": { + "200": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Succeeded", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + } + } +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json new file mode 100644 index 000000000000..1e97f412eaba --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "deploymentResource": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "mynewacr.azurecr.io", + "containerImage": "myNewContainerImage:v1", + "imageRegistryCredential": { + "username": "myNewUsername", + "password": "myNewPassword" + } + } + }, + "instances": null + } + }, + "api-version": "2021-03-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice", + "appName": "myapp", + "deploymentName": "mydeployment" + }, + "responses": { + "200": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "mynewacr.azurecr.io", + "containerImage": "myNewContainerImage:v1", + "imageRegistryCredential": { + "username": "myNewUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Succeeded", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + }, + "202": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "mynewacr.azurecr.io", + "containerImage": "myNewContainerImage:v1", + "imageRegistryCredential": { + "username": "myNewUsername", + "password": "" + } + } + }, + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "jvmOptions": "-Xms1G -Xmx3G", + "environmentVariables": { + "env": "test" + } + }, + "provisioningState": "Updating", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + } + } +} From 3de8f0528410b2d183918edd6b65b8f3db763345 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Thu, 22 Apr 2021 17:31:33 +0800 Subject: [PATCH 2/7] remove jvmOptions in examples --- .../Deployments_CreateOrUpdate_BringYourOwnContainer.json | 4 ---- .../examples/Deployments_Get_BringYourOwnContainer.json | 1 - .../examples/Deployments_Update_BringYourOwnContainer.json | 2 -- 3 files changed, 7 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json index 572aa77b5d92..24791df42c94 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json @@ -18,7 +18,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } @@ -61,7 +60,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } @@ -110,7 +108,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } @@ -159,7 +156,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json index 322d79dd86c2..85999347605c 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json @@ -30,7 +30,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json index 1e97f412eaba..1f734649afb2 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json @@ -46,7 +46,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } @@ -95,7 +94,6 @@ "cpu": "1000m", "memory": "3Gi" }, - "jvmOptions": "-Xms1G -Xmx3G", "environmentVariables": { "env": "test" } From f40afdac8ad879d3d0e681a11b84cdde1e539a0c Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Tue, 27 Apr 2021 20:33:26 +0800 Subject: [PATCH 3/7] add two new properties, command and args --- .../preview/2021-03-03-preview/appplatform.json | 16 ++++++++++++++++ ...nts_CreateOrUpdate_BringYourOwnContainer.json | 2 ++ .../Deployments_Get_BringYourOwnContainer.json | 2 ++ ...Deployments_Update_BringYourOwnContainer.json | 2 ++ 4 files changed, 22 insertions(+) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json index c8402dbcf719..a2e93ac7c844 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json @@ -3936,6 +3936,22 @@ "type": "string", "description": "Container image of the custom container. This should be in the form of : without the server name of the registry" }, + "command": { + "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, "imageRegistryCredential": { "$ref": "#/definitions/ImageRegistryCredential", "description": "Credential of the image registry" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json index 24791df42c94..60fb389f32e8 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json @@ -7,6 +7,8 @@ "customContainer": { "server": "myacr.azurecr.io", "containerImage": "myContainerImage:v1", + "command": ["/bin/sh"], + "args": ["-c", "while true; do echo hello; sleep 10;done"], "imageRegistryCredential": { "username": "myUsername", "password": "myPassword" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json index 85999347605c..6582c8cb2a6e 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json @@ -16,6 +16,8 @@ "customContainer": { "server": "myacr.azurecr.io", "containerImage": "myContainerImage:v1", + "command": ["/bin/sh"], + "args": ["-c", "while true; do echo hello; sleep 10;done"], "imageRegistryCredential": { "username": "myUsername", "password": "" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json index 1f734649afb2..4dfee6b90df3 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json @@ -7,6 +7,8 @@ "customContainer": { "server": "mynewacr.azurecr.io", "containerImage": "myNewContainerImage:v1", + "command": ["/bin/sh"], + "args": ["-c", "while true; do echo hello; sleep 10;done"], "imageRegistryCredential": { "username": "myNewUsername", "password": "myNewPassword" From 5d1debba07c07ca446fd6f28e5f0ef64e4d19333 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Tue, 27 Apr 2021 20:56:49 +0800 Subject: [PATCH 4/7] link the example files --- .../preview/2021-03-03-preview/appplatform.json | 9 +++++++++ ...n => Deployments_CreateOrUpdate_CustomContainer.json} | 0 ...ntainer.json => Deployments_Get_CustomContainer.json} | 0 ...iner.json => Deployments_Update_CustomContainer.json} | 0 4 files changed, 9 insertions(+) rename specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/{Deployments_CreateOrUpdate_BringYourOwnContainer.json => Deployments_CreateOrUpdate_CustomContainer.json} (100%) rename specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/{Deployments_Get_BringYourOwnContainer.json => Deployments_Get_CustomContainer.json} (100%) rename specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/{Deployments_Update_BringYourOwnContainer.json => Deployments_Update_CustomContainer.json} (100%) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json index a2e93ac7c844..2fe0cdfce1a2 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/appplatform.json @@ -2034,6 +2034,9 @@ "x-ms-examples": { "Deployments_Get": { "$ref": "./examples/Deployments_Get.json" + }, + "Deployments_Get_CustomContainer": { + "$ref": "./examples/Deployments_Get_CustomContainer.json" } } }, @@ -2105,6 +2108,9 @@ "x-ms-examples": { "Deployments_CreateOrUpdate": { "$ref": "./examples/Deployments_CreateOrUpdate.json" + }, + "Deployments_CreateOrUpdate_CustomContainer": { + "$ref": "./examples/Deployments_CreateOrUpdate_CustomContainer.json" } } }, @@ -2223,6 +2229,9 @@ "x-ms-examples": { "Deployments_Update": { "$ref": "./examples/Deployments_Update.json" + }, + "Deployments_Update_CustomContainer": { + "$ref": "./examples/Deployments_Update_CustomContainer.json" } } } diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json similarity index 100% rename from specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_BringYourOwnContainer.json rename to specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json similarity index 100% rename from specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_BringYourOwnContainer.json rename to specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json similarity index 100% rename from specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_BringYourOwnContainer.json rename to specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json From e508200de2d5e455ec0002a469ae83f4e8213b59 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Thu, 29 Apr 2021 10:47:32 +0800 Subject: [PATCH 5/7] prettier check --- ...yments_CreateOrUpdate_CustomContainer.json | 326 +++++++++--------- .../Deployments_Get_CustomContainer.json | 9 +- .../Deployments_Update_CustomContainer.json | 9 +- 3 files changed, 179 insertions(+), 165 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json index 60fb389f32e8..da4eaf68c3c0 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json @@ -1,21 +1,68 @@ { - "parameters": { - "deploymentResource": { + "parameters": { + "deploymentResource": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ], + "imageRegistryCredential": { + "username": "myUsername", + "password": "myPassword" + } + } + }, + "deploymentSettings": { + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "environmentVariables": { + "env": "test" + } + }, + "instances": null + } + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "api-version": "2021-03-03-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice", + "appName": "myapp", + "deploymentName": "mydeployment" + }, + "responses": { + "201": { + "body": { "properties": { "source": { "type": "Container", "customContainer": { - "server": "myacr.azurecr.io", + "server": "myacr.azurecr.io", "containerImage": "myContainerImage:v1", - "command": ["/bin/sh"], - "args": ["-c", "while true; do echo hello; sleep 10;done"], - "imageRegistryCredential": { - "username": "myUsername", - "password": "myPassword" - } + "imageRegistryCredential": { + "username": "myUsername", + "password": "" + } } }, + "appName": "myapp", "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, "resourceRequests": { "cpu": "1000m", "memory": "3Gi" @@ -24,166 +71,123 @@ "env": "test" } }, - "instances": null - } - }, - "sku": { - "name": "S0", - "tier": "Standard", - "capacity": 1 - }, - "api-version": "2021-03-03-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "serviceName": "myservice", - "appName": "myapp", - "deploymentName": "mydeployment" + "provisioningState": "Creating", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } }, - "responses": { - "201": { - "body": { - "properties": { - "source": { - "type": "Container", - "customContainer": { - "server": "myacr.azurecr.io", - "containerImage": "myContainerImage:v1", - "imageRegistryCredential": { - "username": "myUsername", - "password": "" - } - } - }, - "appName": "myapp", - "deploymentSettings": { - "cpu": 1, - "memoryInGB": 3, - "resourceRequests": { - "cpu": "1000m", - "memory": "3Gi" - }, - "environmentVariables": { - "env": "test" - } - }, - "provisioningState": "Creating", - "status": "Running", - "active": false, - "instances": [ - { - "name": "instance1", - "status": "Running", - "discoveryStatus": "N/A", - "startTime": "2020-08-26T01:55:02Z" + "200": { + "body": { + "properties": { + "source": { + "type": "Container", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" } - ] - }, - "sku": { - "name": "S0", - "tier": "Standard", - "capacity": 1 + } }, - "type": "Microsoft.AppPlatform/Spring/apps/deployments", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", - "name": "mydeployment" - } - }, - "200": { - "body": { - "properties": { - "source": { - "type": "Container", - "customContainer": { - "server": "myacr.azurecr.io", - "containerImage": "myContainerImage:v1", - "imageRegistryCredential": { - "username": "myUsername", - "password": "" - } - } - }, - "appName": "myapp", - "deploymentSettings": { - "cpu": 1, - "memoryInGB": 3, - "resourceRequests": { - "cpu": "1000m", - "memory": "3Gi" - }, - "environmentVariables": { - "env": "test" - } + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" }, - "provisioningState": "Succeeded", - "status": "Running", - "active": false, - "instances": [ - { - "name": "instance1", - "status": "Running", - "discoveryStatus": "N/A", - "startTime": "2020-08-26T01:55:02Z" - } - ] - }, - "sku": { - "name": "S0", - "tier": "Standard", - "capacity": 1 + "environmentVariables": { + "env": "test" + } }, - "type": "Microsoft.AppPlatform/Spring/apps/deployments", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", - "name": "mydeployment" - } - }, - "202": { - "body": { - "properties": { - "source": { - "type": "Source", - "customContainer": { - "server": "myacr.azurecr.io", - "containerImage": "myContainerImage:v1", - "imageRegistryCredential": { - "username": "myUsername", - "password": "" - } - } - }, - "appName": "myapp", - "deploymentSettings": { - "cpu": 1, - "memoryInGB": 3, - "resourceRequests": { - "cpu": "1000m", - "memory": "3Gi" - }, - "environmentVariables": { - "env": "test" - } - }, - "provisioningState": "Updating", - "status": "Running", - "active": false, - "instances": [ - { - "name": "instance1", - "status": "Running", - "discoveryStatus": "N/A", - "startTime": "2020-08-26T01:55:02Z" + "provisioningState": "Succeeded", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" + } + }, + "202": { + "body": { + "properties": { + "source": { + "type": "Source", + "customContainer": { + "server": "myacr.azurecr.io", + "containerImage": "myContainerImage:v1", + "imageRegistryCredential": { + "username": "myUsername", + "password": "" } - ] + } }, - "sku": { - "name": "S0", - "tier": "Standard", - "capacity": 1 + "appName": "myapp", + "deploymentSettings": { + "cpu": 1, + "memoryInGB": 3, + "resourceRequests": { + "cpu": "1000m", + "memory": "3Gi" + }, + "environmentVariables": { + "env": "test" + } }, - "type": "Microsoft.AppPlatform/Spring/apps/deployments", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", - "name": "mydeployment" - } + "provisioningState": "Updating", + "status": "Running", + "active": false, + "instances": [ + { + "name": "instance1", + "status": "Running", + "discoveryStatus": "N/A", + "startTime": "2020-08-26T01:55:02Z" + } + ] + }, + "sku": { + "name": "S0", + "tier": "Standard", + "capacity": 1 + }, + "type": "Microsoft.AppPlatform/Spring/apps/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment", + "name": "mydeployment" } } } - \ No newline at end of file +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json index 6582c8cb2a6e..7138273256ba 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Get_CustomContainer.json @@ -16,8 +16,13 @@ "customContainer": { "server": "myacr.azurecr.io", "containerImage": "myContainerImage:v1", - "command": ["/bin/sh"], - "args": ["-c", "while true; do echo hello; sleep 10;done"], + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ], "imageRegistryCredential": { "username": "myUsername", "password": "" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json index 4dfee6b90df3..df3ecba5149f 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-03-03-preview/examples/Deployments_Update_CustomContainer.json @@ -7,8 +7,13 @@ "customContainer": { "server": "mynewacr.azurecr.io", "containerImage": "myNewContainerImage:v1", - "command": ["/bin/sh"], - "args": ["-c", "while true; do echo hello; sleep 10;done"], + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ], "imageRegistryCredential": { "username": "myNewUsername", "password": "myNewPassword" From 0b98aa40240a960ca8134fee6d69fe43389a5b18 Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Mon, 10 May 2021 16:16:38 +0800 Subject: [PATCH 6/7] change to 2021-06-01-preview api version --- .../examples/Deployments_CreateOrUpdate_CustomContainer.json | 2 +- .../examples/Deployments_Get_CustomContainer.json | 2 +- .../examples/Deployments_Update_CustomContainer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json index da4eaf68c3c0..dcfc365e5838 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json @@ -37,7 +37,7 @@ "tier": "Standard", "capacity": 1 }, - "api-version": "2021-03-03-preview", + "api-version": "2021-06-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "myResourceGroup", "serviceName": "myservice", diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Get_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Get_CustomContainer.json index 7138273256ba..a58ecd0bee69 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Get_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Get_CustomContainer.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-03-03-preview", + "api-version": "2021-06-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "myResourceGroup", "serviceName": "myservice", diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json index df3ecba5149f..085604c08fb3 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json @@ -23,7 +23,7 @@ "instances": null } }, - "api-version": "2021-03-03-preview", + "api-version": "2021-06-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "myResourceGroup", "serviceName": "myservice", From bb2932a8b3cf727a88c736bfe127b4337141fe1d Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Thu, 13 May 2021 12:19:39 +0800 Subject: [PATCH 7/7] resolve credScan issue --- .../examples/Deployments_Update_CustomContainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json index 085604c08fb3..55f438aa3506 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-06-01-preview/examples/Deployments_Update_CustomContainer.json @@ -16,7 +16,7 @@ ], "imageRegistryCredential": { "username": "myNewUsername", - "password": "myNewPassword" + "password": "" } } },