Skip to content

Commit 0375f63

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into localworking
2 parents 7e3f00a + 41918d6 commit 0375f63

File tree

3 files changed

+116
-52
lines changed

3 files changed

+116
-52
lines changed

articles/sql-database/sql-database-quickstart-r-create-script.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,26 @@ manager: cgronlun
1515
ms.date: 04/11/2019
1616
---
1717

18-
# Create and run simple R scripts in Azure SQL Database Machine Learning Services (preview)
18+
# Quickstart: Create and run simple R scripts in Azure SQL Database Machine Learning Services (preview)
1919

20-
In this quickstart, you'll create and run a set of simple R scripts using the public preview of [Machine Learning Services (with R) in Azure SQL Database](sql-database-machine-learning-services-overview.md). You'll learn how to wrap a well-formed R script in the stored procedure [sp_execute_external_script](https://docs.microsoft.com/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql) and execute the script in a SQL database.
20+
In this quickstart, you create and run a set of R scripts using Machine Learning Services (with R) in Azure SQL Database.
2121

2222
[!INCLUDE[ml-preview-note](../../includes/sql-database-ml-preview-note.md)]
2323

2424
## Prerequisites
2525

26-
- If you don't have an Azure subscription, [create an account](https://azure.microsoft.com/free/) before you begin.
26+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
2727

28-
- To run the example code in these exercises, you must first have an Azure SQL database with Machine Learning Services (with R) enabled. During the public preview, Microsoft will onboard you and enable machine learning for your existing or new database. Follow the steps in [Sign up for the preview](sql-database-machine-learning-services-overview.md#signup).
28+
- An [Azure SQL database](sql-database-single-database-get-started.md) with a [server-level firewall rule](sql-database-server-level-firewall-rule.md)
2929

30-
- Make sure you've installed the latest [SQL Server Management Studio](https://docs.microsoft.com/sql/ssms/sql-server-management-studio-ssms) (SSMS). You can run R scripts using other database management or query tools, but in this quickstart you'll use SSMS.
30+
- [Machine Learning Services](sql-database-machine-learning-services-overview.md) with R enabled. [Sign up for the preview](sql-database-machine-learning-services-overview.md#signup).
3131

32-
- This quickstart requires that you configure a server-level firewall rule. For information on how to do this, see [Create server-level firewall rule](sql-database-server-level-firewall-rule.md).
32+
- [SQL Server Management Studio](/sql/ssms/sql-server-management-studio-ssms) (SSMS)
33+
34+
> [!NOTE]
35+
> During the public preview, Microsoft will onboard you and enable machine learning for your existing or new database.
36+
37+
This example uses the stored procedure [sp_execute_external_script](/sql/relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql) to wrap a well-formed R script.
3338

3439
## Run a simple script
3540

articles/sql-database/sql-database-quickstart-r-train-score-model.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,29 @@ manager: cgronlun
1515
ms.date: 04/11/2019
1616
---
1717

18-
# Create and train a predictive model in R with Azure SQL Database Machine Learning Services (preview)
18+
# Quickstart: Create and train a predictive model in R with Azure SQL Database Machine Learning Services (preview)
1919

20-
In this quickstart, you'll create and train a predictive model using R, save the model to a table in your SQL database, then use the model to predict values from new data using the public preview of [Machine Learning Services (with R) in Azure SQL Database](sql-database-machine-learning-services-overview.md).
21-
22-
The model you'll use in this quickstart is a simple regression model that predicts the stopping distance of a car based on speed. You'll use the **cars** dataset included with R, because it's small and easy to understand.
23-
24-
> [!TIP]
25-
> Many datasets, small and large, are included with the R runtime. To get a list of datasets installed with R, type `library(help="datasets")` from an R command prompt.
20+
In this quickstart, you create and train a predictive model using R, save the model to a table in your database, then use the model to predict values from new data using Machine Learning Services (with R) in Azure SQL Database.
2621

2722
[!INCLUDE[ml-preview-note](../../includes/sql-database-ml-preview-note.md)]
2823

2924
## Prerequisites
3025

31-
- If you don't have an Azure subscription, [create an account](https://azure.microsoft.com/free/) before you begin.
26+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
27+
28+
- An [Azure SQL database](sql-database-single-database-get-started.md) with a [server-level firewall rule](sql-database-server-level-firewall-rule.md)
3229

33-
- To run the example code in these exercises, you must first have an Azure SQL database with Machine Learning Services (with R) enabled. During the public preview, Microsoft will onboard you and enable machine learning for your existing or new database. Follow the steps in [Sign up for the preview](sql-database-machine-learning-services-overview.md#signup).
30+
- [Machine Learning Services](sql-database-machine-learning-services-overview.md) with R enabled. [Sign up for the preview](sql-database-machine-learning-services-overview.md#signup).
3431

35-
- Make sure you've installed the latest [SQL Server Management Studio](https://docs.microsoft.com/sql/ssms/sql-server-management-studio-ssms) (SSMS). You can run the R scripts using other database management or query tools, but in this quickstart you'll use SSMS.
32+
- [SQL Server Management Studio](/sql/ssms/sql-server-management-studio-ssms) (SSMS)
3633

37-
- This quickstart requires that you configure a server-level firewall rule. For information on how to do this, see [Create server-level firewall rule](sql-database-server-level-firewall-rule.md).
34+
> [!NOTE]
35+
> During the public preview, Microsoft will onboard you and enable machine learning for your existing or new database.
36+
37+
This example uses a simple regression model to predict the stopping distance of a car based on speed using the **cars** dataset included with R.
38+
39+
> [!TIP]
40+
> Many datasets are included with the R runtime, to get a list of installed datasets, type `library(help="datasets")` from the R command prompt.
3841
3942
## Create and train a predictive model
4043

articles/virtual-machines/linux/image-builder-json.md

Lines changed: 91 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Create an Azure Image Builder template (preview)
33
description: Learn how to create a template to use with Azure Image Builder.
4-
author: cynthn
5-
ms.author: cynthn
6-
ms.date: 07/31/2019
4+
author: danis
5+
ms.author: danis
6+
ms.date: 01/23/2020
77
ms.topic: article
88
ms.service: virtual-machines-linux
99
manager: gwallace
@@ -22,11 +22,15 @@ This is the basic template format:
2222
"tags": {
2323
"<name": "<value>",
2424
"<name>": "<value>"
25-
},
25+
}
2626
"identity":{},
2727
"dependsOn": [],
2828
"properties": {
29-
"buildTimeoutInMinutes": <minutes>,
29+
"buildTimeoutInMinutes": <minutes>,
30+
"vmProfile":
31+
{
32+
"vmSize": "<vmSize>"
33+
},
3034
"build": {},
3135
"customize": {},
3236
"distribute": {}
@@ -59,6 +63,24 @@ The location is the region where the custom image will be created. For the Image
5963
```json
6064
"location": "<region>",
6165
```
66+
## vmProfile
67+
By default Image Builder will use a "Standard_D1_v2" build VM, you can override this, for example, if you want to customize an Image for a GPU VM, you need a GPU VM size. This is optional.
68+
69+
```json
70+
{
71+
"vmSize": "Standard_D1_v2"
72+
},
73+
```
74+
75+
## osDiskSizeGB
76+
77+
By default, Image Builder will not change the size of the image, it will use the size from the source image. You can adjust the size of the OS Disk (Win and Linux), note, do not go too small than the minimum required space required for the OS. This is optional, and a value of 0 means leave the same size as the source image. This is optional.
78+
79+
```json
80+
{
81+
"osDiskSizeGB": 100
82+
},
83+
```
6284

6385
## Tags
6486

@@ -132,13 +154,7 @@ In the list of **Installers and Images for Red Hat Enterprise Linux Server**, yo
132154
> The access tokens of the links are refreshed at frequent intervals, so every time you want to submit a template, you must check if the RH link address has changed.
133155
134156
### PlatformImage source
135-
Azure Image Builder supports the following Azure Marketplace images:
136-
* Ubuntu 18.04
137-
* Ubuntu 16.04
138-
* RHEL 7.6
139-
* CentOS 7.6
140-
* Windows 2016
141-
* Windows 2019
157+
Azure Image Builder supports Windows Server and client, and Linux Azure Marketplace images, see [here](https://docs.microsoft.com/azure/virtual-machines/windows/image-builder-overview#os-support) for the full list.
142158

143159
```json
144160
"source": {
@@ -217,7 +233,8 @@ When using `customize`:
217233
{
218234
"type": "Shell",
219235
"name": "<name>",
220-
"scriptUri": "<path to script>"
236+
"scriptUri": "<path to script>",
237+
"sha256Checksum": "<sha256 checksum>"
221238
},
222239
{
223240
"type": "Shell",
@@ -243,7 +260,8 @@ The shell customizer supports running shell scripts, these must be publicly acce
243260
{
244261
"type": "Shell",
245262
"name": "<name>",
246-
"scriptUri": "<link to script>"
263+
"scriptUri": "<link to script>",
264+
"sha256Checksum": "<sha256 checksum>"
247265
},
248266
],
249267
"customize": [
@@ -263,7 +281,12 @@ Customize properties:
263281
- **name** - name for tracking the customization
264282
- **scriptUri** - URI to the location of the file
265283
- **inline** - array of shell commands, separated by commas.
266-
284+
- **sha256Checksum** - Value of sha256 checksum of the file, you generate this locally, and then Image Builder will checksum and validate.
285+
* To generate the sha256Checksum, using a terminal on Mac/Linux run: `sha256sum <fileName>`
286+
287+
288+
For commands to run with super user privileges, they must be prefixed with `sudo`.
289+
267290
> [!NOTE]
268291
> When running the shell customizer with RHEL ISO source, you need to ensure your first customization shell handles registering with a Red Hat entitlement server before any customization occurs. Once customization is complete, the script should unregister with the entitlement server.
269292
@@ -272,12 +295,15 @@ The Restart customizer allows you to restart a Windows VM and wait for it come b
272295

273296
```json
274297
"customize": [
275-
{
276-
"type": "WindowsRestart",
277-
"restartCommand": "shutdown /r /f /t 0 /c",
278-
"restartCheckCommand": "echo Azure-Image-Builder-Restarted-the-VM > buildArtifacts/azureImageBuilderRestart.txt",
279-
"restartTimeout": "5m"
280-
}],
298+
299+
{
300+
"type": "WindowsRestart",
301+
"restartCommand": "shutdown /r /f /t 0 /c",
302+
"restartCheckCommand": "echo Azure-Image-Builder-Restarted-the-VM > c:\\buildArtifacts\\azureImageBuilderRestart.txt",
303+
"restartTimeout": "5m"
304+
}
305+
306+
],
281307
```
282308

283309
OS Support: Windows
@@ -297,13 +323,16 @@ The shell customizer supports running PowerShell scripts and inline command, the
297323
{
298324
"type": "PowerShell",
299325
"name": "<name>",
300-
"scriptUri": "<path to script>"
326+
"scriptUri": "<path to script>",
327+
"runElevated": "<true false>",
328+
"sha256Checksum": "<sha256 checksum>"
301329
},
302330
{
303331
"type": "PowerShell",
304332
"name": "<name>",
305333
"inline": "<PowerShell syntax to run>",
306-
"valid_exit_codes": "<exit code>"
334+
"valid_exit_codes": "<exit code>",
335+
"runElevated": "<true or false>"
307336
}
308337
],
309338
```
@@ -316,6 +345,10 @@ Customize properties:
316345
- **scriptUri** - URI to the location of the PowerShell script file.
317346
- **inline** – Inline commands to be run, separated by commas.
318347
- **valid_exit_codes** – Optional, valid codes that can be returned from the script/inline command, this will avoid reported failure of the script/inline command.
348+
- **runElevated** – Optional, boolean, support for running commands and scripts with elevated permissions.
349+
- **sha256Checksum** - Value of sha256 checksum of the file, you generate this locally, and then Image Builder will checksum and validate.
350+
* To generate the sha256Checksum, using a PowerShell on Windows [Get-Hash](https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-6)
351+
319352

320353
### File customizer
321354

@@ -327,7 +360,8 @@ The File customizer lets image builder download a file from a GitHub or Azure st
327360
"type": "File",
328361
"name": "<name>",
329362
"sourceUri": "<source location>",
330-
"destination": "<destination>"
363+
"destination": "<destination>",
364+
"sha256Checksum": "<sha256 checksum>"
331365
}
332366
]
333367
```
@@ -395,8 +429,39 @@ Azure Image Builder supports three distribution targets:
395429

396430
You can distribute an image to both of the target types in the same configuration, please see [examples](https://github.com/danielsollondon/azvmimagebuilder/blob/7f3d8c01eb3bf960d8b6df20ecd5c244988d13b6/armTemplates/azplatform_image_deploy_sigmdi.json#L80).
397431

398-
Because you can have more than one target to distribute to, Image Builder maintains a state for every distribution target that can be accessed by querying the `runOutputName`. The `runOutputName` is an object you can query post distribution for information about that distribution. For example, you can query the location of the VHD, or regions where the image version was replicated to. This is a property of every distribution target. The `runOutputName` must be unique to each distribution target.
399-
432+
Because you can have more than one target to distribute to, Image Builder maintains a state for every distribution target that can be accessed by querying the `runOutputName`. The `runOutputName` is an object you can query post distribution for information about that distribution. For example, you can query the location of the VHD, or regions where the image version was replicated to, or SIG Image version created. This is a property of every distribution target. The `runOutputName` must be unique to each distribution target. Here is an example, this is querying a Shared Image Gallery distribution:
433+
434+
```bash
435+
subscriptionID=<subcriptionID>
436+
imageResourceGroup=<resourceGroup of image template>
437+
runOutputName=<runOutputName>
438+
439+
az resource show \
440+
--ids "/subscriptions/$subscriptionID/resourcegroups/$imageResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/ImageTemplateLinuxRHEL77/runOutputs/$runOutputName" \
441+
--api-version=2019-05-01-preview
442+
```
443+
444+
Output:
445+
```json
446+
{
447+
"id": "/subscriptions/xxxxxx/resourcegroups/rheltest/providers/Microsoft.VirtualMachineImages/imageTemplates/ImageTemplateLinuxRHEL77/runOutputs/rhel77",
448+
"identity": null,
449+
"kind": null,
450+
"location": null,
451+
"managedBy": null,
452+
"name": "rhel77",
453+
"plan": null,
454+
"properties": {
455+
"artifactId": "/subscriptions/xxxxxx/resourceGroups/aibDevOpsImg/providers/Microsoft.Compute/galleries/devOpsSIG/images/rhel/versions/0.24105.52755",
456+
"provisioningState": "Succeeded"
457+
},
458+
"resourceGroup": "rheltest",
459+
"sku": null,
460+
"tags": null,
461+
"type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs"
462+
}
463+
```
464+
400465
### Distribute: managedImage
401466

402467
The image output will be a managed image resource.
@@ -502,12 +567,3 @@ az resource show \
502567

503568
There are sample .json files for different scenarios in the [Azure Image Builder GitHub](https://github.com/danielsollondon/azvmimagebuilder).
504569

505-
506-
507-
508-
509-
510-
511-
512-
513-

0 commit comments

Comments
 (0)