You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/big-data-cluster/machine-learning-services.md
+82-23Lines changed: 82 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: SQL Server Big Data Clusters
4
4
description: Learn how you can run Python and R scripts on the master instance of a SQL Server Big Data Clusters with Machine Learning Services.
5
5
author: dphansen
6
6
ms.author: davidph
7
-
ms.date: 11/04/2019
7
+
ms.date: 04/30/2020
8
8
ms.topic: conceptual
9
9
ms.prod: sql
10
10
ms.technology: machine-learning
@@ -31,39 +31,68 @@ RECONFIGURE WITH OVERRIDE
31
31
GO
32
32
```
33
33
34
-
## Enable Always On Availability Groups
34
+
You are now ready to run Python and R scripts on the master instance of Big Data Clusters. See the quickstarts under [Next steps](#next-steps) to run your first script.
35
35
36
-
If you are using SQL Server Big Data Clusters with [Always On Availability Groups](../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md), you need to perform a few extra steps to enable Machine Learning Services.
36
+
>[!NOTE]
37
+
>The configuration setting cannot be set on an availability group listener connection. If Big Data Clusters is deployed with high availability, the set `external scripts enabled` on each replica. See [Enable on cluster with high availability](#enable-on-cluster-with-high-availability).
37
38
38
-
1. Connect to the master instance and run this statement:
39
+
## Enable on cluster with high availability
39
40
40
-
```sql
41
-
SELECT @@SERVERNAME
42
-
```
41
+
When you [Deploy SQL Server Big Data Cluster with high availability](deployment-high-availability.md), the deployment creates an availability group for the master instance. To enable Machine Learning Services, set `external scripts enabled` on each instance of the availability group. For a Big Data Cluster, you need to run `sp_configure` on each replica of the SQL Server master instance
43
42
44
-
Note down the server name. In this example, the server name for the master instance is **master-2**.
43
+
The following section describes how to enable external scripts on each instance.
45
44
46
-
1. On each replica on the Always On Availability Group in the Big Data Cluster, run these `kubectl` commands:
45
+
### Create an external load balancer for each instance
47
46
48
-
```
49
-
kubectl -n bdc expose pod master-0--port=1533 --name=mymaster-0 --type=LoadBalancer
47
+
For each replica on the availability group, create a load balancer to allow you to connect to the instance.
50
48
51
-
kubectl -n bdc expose pod master-1--port=1533 --name=mymaster-1 --type=LoadBalancer
49
+
`kubectl expose pod <pod-name> --port=<connection port number> --name=<load-balancer-name> --type=LoadBalancer -n <kubernetes namespace>`
52
50
53
-
kubectl -n bdc expose pod master-2--port=1533 --name=mymaster-2 --type=LoadBalancer
54
-
```
51
+
The examples in this article use the following values:
55
52
56
-
You should see an output similar to this:
57
-
58
-
```
59
-
service/mymaster-0 exposed
53
+
-`<pod-name>`: `master-#`
54
+
-`<connection port number>`: `1533`
55
+
-`<load-balancer-name>`: `mymaster-#`
56
+
-`<kubernetes namespace>`: `mssql-cluster`
60
57
61
-
service/mymaster-1 exposed
58
+
Update the following script for your environment, and run the commands:
62
59
63
-
service/mymaster-2 exposed
64
-
```
60
+
```bash
61
+
kubectl expose pod master-0 --port=1533 --name=mymaster-0 --type=LoadBalancer -n mssql-cluster
62
+
kubectl expose pod master-1 --port=1533 --name=mymaster-1 --type=LoadBalancer -n mssql-cluster
63
+
kubectl expose pod master-2 --port=1533 --name=mymaster-2 --type=LoadBalancer -n mssql-cluster
64
+
```
65
+
66
+
`kubectl` returns the following output.
67
+
68
+
```bash
69
+
service/mymaster-0 exposed
70
+
service/mymaster-1 exposed
71
+
service/mymaster-2 exposed
72
+
```
73
+
74
+
Each load balancer is a master replica endpoint.
75
+
76
+
### Enable script execution on each replica
77
+
78
+
1. Get the IP address for the master replica endpoint.
79
+
80
+
The following command returns the external IP address for the replica endpoint.
81
+
82
+
`kubectl get services <load-balancer-name> -n <kubernetes namespace>`
83
+
84
+
To get the external IP address for each replica in this scenario, run the following commands:
65
85
66
-
1. Connect to each master replica endpoint and enable script execution.
86
+
```bash
87
+
kubectl get services mymaster-0 -n mssql-cluster
88
+
kubectl get services mymaster-1 -n mssql-cluster
89
+
kubectl get services mymaster-2 -n mssql-cluster
90
+
```
91
+
92
+
>[!NOTE]
93
+
> It may take a little time before the external IP address is available. Run the preceding script periodically until each endpoint returns an external IP address.
94
+
95
+
1. Connect to the master replica endpoint and enable script execution.
67
96
68
97
Run this statement:
69
98
@@ -73,7 +102,37 @@ If you are using SQL Server Big Data Clusters with [Always On Availability Group
73
102
GO
74
103
```
75
104
76
-
You are now ready to run Python and R scripts on the master instance of Big Data Clusters. See the quickstarts below to run your first script.
105
+
For example, you can run the preceding command with `sqlcmd`. The following example connects to the master replica endpoint and enables script execution. Update the valuesin the script with for your environment.
You are now ready to run Python and R scripts on the master instance of Big Data Clusters. See the quickstarts under [Next steps](#next-steps) to run your first script.
120
+
121
+
### Delete the master replica endpoints
122
+
123
+
On the Kubernetes cluster, delete the endpoint for each replica. The endpoint is exposed in Kubernetes as a load-balancing service.
124
+
125
+
The following command deletes load-balancing service.
0 commit comments