Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit b8e193d

Browse files
authored
Merge pull request #9601 from jeroenterheerdt/master
Adding AppDeploy Concepts Page
2 parents d50ba9b + 9a8093e commit b8e193d

3 files changed

Lines changed: 103 additions & 37 deletions

File tree

docs/big-data-cluster/big-data-cluster-create-apps.md

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In SQL Server 2019 (preview) CTP 2.4 you can create, delete, describe, initializ
4444

4545
|Command |Description |
4646
|:---|:---|
47-
|`mssqlctl login` | Log into a SQL Server big data cluster |
47+
|`mssqlctl login` | Sign into a SQL Server big data cluster |
4848
|`mssqlctl app create` | Create application. |
4949
|`mssqlctl app delete` | Delete application. |
5050
|`mssqlctl app describe` | Describe application. |
@@ -61,9 +61,9 @@ mssqlctl app create --help
6161

6262
The following sections describe these commands in more detail.
6363

64-
## Log in
64+
## Sign in
6565

66-
Before you deploy or interact with applications, first log in to your SQL Server big data cluster with the `mssqlctl login` command. Specify the external IP address of the `endpoint-service-proxy` service (for example: `https://ip-address:30777`) along with the user name and password to the cluster.
66+
Before you deploy or interact with applications, first sign in to your SQL Server big data cluster with the `mssqlctl login` command. Specify the external IP address of the `endpoint-service-proxy` service (for example: `https://ip-address:30777`) along with the user name and password to the cluster.
6767

6868
```bash
6969
mssqlctl login -e https://<ip-address-of-endpoint-service-proxy>:30777 -u <user-name> -p <password>
@@ -93,54 +93,50 @@ To create an application, you use `mssqlctl` with the `app create` command. Thes
9393
Use the following syntax to create a new app in big data cluster:
9494

9595
```bash
96-
mssqlctl app create -n <app_name> -v <version_number> --spec <directory containing spec file>
96+
mssqlctl app create --spec <directory containing spec file>
9797
```
9898

9999
The following command shows an example of what this command might look like:
100100

101-
This assumes that you have file called `spec.yaml` within the `addpy` folder.
102-
The `addpy` folder contains the `add.py` and `spec.yaml`
103-
The `spec.yaml` is a specification file for the `add.py` app.
101+
```bash
102+
mssqlctl app create --spec ./addpy
103+
```
104104

105+
This assumes that you have your application stored in the `addpy` folder. This folder should also contain a specification file for the application, called called `spec.yaml`. Please see [the Application Deployment page](concept-application-deployment.md) for more information on the `spec.yaml` file.
105106

106-
`add.py` creates the following python app:
107+
To deploy this app sample app, create the following files in a directory called `addpy`:
107108

108-
```py
109-
#add.py
110-
def add(x,y):
109+
- `add.py`. Copy the following Python code into this file:
110+
```py
111+
#add.py
112+
def add(x,y):
111113
result = x+y
112114
return result
113-
result=add(x,y)
114-
```
115-
116-
The following script is a sample of the contents for `spec.yaml`:
117-
118-
```yaml
119-
#spec.yaml
120-
name: add-app #name of your python script
121-
version: v1 #version of the app
122-
runtime: Python #the language this app uses (R or Python)
123-
src: ./add.py #full path to the location of the app
124-
entrypoint: add #the function that will be called upon execution
125-
replicas: 1 #number of replicas needed
126-
poolsize: 1 #the pool size that you need your app to scale
127-
inputs: #input parameters that the app expects and the type
128-
x: int
129-
y: int
130-
output: #output parameter the app expects and the type
131-
result: int
132-
```
133-
134-
To try this, copy the above lines of code into two files in the directory `addpy` as `add.py` and `spec.yaml` and run the command below:
115+
result=add(x,y)
116+
```
117+
- `spec.yaml`. Copy the following code into this file:
118+
```yaml
119+
#spec.yaml
120+
name: add-app #name of your python script
121+
version: v1 #version of the app
122+
runtime: Python #the language this app uses (R or Python)
123+
src: ./add.py #full path to the location of the app
124+
entrypoint: add #the function that will be called upon execution
125+
replicas: 1 #number of replicas needed
126+
poolsize: 1 #the pool size that you need your app to scale
127+
inputs: #input parameters that the app expects and the type
128+
x: int
129+
y: int
130+
output: #output parameter the app expects and the type
131+
result: int
132+
```
133+
134+
Then, run the command below:
135135
136136
```bash
137137
mssqlctl app create --spec ./addpy
138138
```
139139

140-
> [!NOTE]
141-
> The `spec.yaml` file specifies both a `poolsize` and a number of `replicas`. The number of `replicas` specifies the number of copies of the service need to be deployed. The `poolsize` specifies the number of pools you want to create per replica. These settings have an impact on the amount of requests the deployment can handle in parallel. The maximum number of requests at one given time is equal to `replicas` times `poolsize`, i.e if you have 5 replicas and 2 pools per replica the deployment can handle 10 requests in parallel. See the image below for a graphical representation of `replicas` and `poolsize`:
142-
![Poolsize and replicas](media/big-data-cluster-create-apps/poolsize-vs-replicas.png)
143-
144140
You can check if the app is deployed using the list command:
145141

146142
```bash
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: What is Application Deployment?
3+
titleSuffix: SQL Server 2019 big data clusters
4+
description: This article describes application deployment on a SQL Server 2019 big data cluster (preview).
5+
author: jterh
6+
ms.author: jroth
7+
manager: craigg
8+
ms.date: 03/26/2019
9+
ms.topic: conceptual
10+
ms.prod: sql
11+
ms.technology: big-data-cluster
12+
ms.custom: seodec18
13+
---
14+
15+
# What is Application Deployment on a SQL Server 2019 big data cluster?
16+
17+
Application Deployment enables the deployment of applications on the big data cluster by providing interfaces to create, manage, and run applications. Applications deployed on the big data cluster benefit from the computational power of the cluster and can access the data that is available on the cluster. This increases scalability and performance of the applications, while managing the applications where the data lives.
18+
The following sections describe the architecture and functionality of Application Deployment.
19+
20+
## Application Deployment architecture
21+
22+
Application deployment consists of a controller and app runtime handlers. When creating an application, a specification file (`spec.yaml`) is provided. This `spec.yaml` file contains everything the controller needs to know to successfully deploy the application. The following is a sample of the contents for `spec.yaml`:
23+
24+
```yaml
25+
#spec.yaml
26+
name: add-app #name of your python script
27+
version: v1 #version of the app
28+
runtime: Python #the language this app uses (R or Python)
29+
src: ./add.py #full path to the location of the app
30+
entrypoint: add #the function that will be called upon execution
31+
replicas: 1 #number of replicas needed
32+
poolsize: 1 #the pool size that you need your app to scale
33+
inputs: #input parameters that the app expects and the type
34+
x: int
35+
y: int
36+
output: #output parameter the app expects and the type
37+
result: int
38+
```
39+
40+
The controller inspects the `runtime` specified in the `spec.yaml` file and calls the corresponding runtime handler. The runtime handler creates the application. First, a Kubernetes ReplicaSet is created containing one or more pods, each of which contains the application to be deployed. The number of pods is defined by the `replicas` parameter set in the `spec.yaml` file for the application. Each pod can have one of more pools. The number of pools is defined by the `poolsize` parameter set in the `spec.yaml` file.
41+
42+
These settings have an impact on the amount of requests the deployment can handle in parallel. The maximum number of requests at one given time is equals to `replicas` times `poolsize`. If you have 5 replicas and 2 pools per replica the deployment can handle 10 requests in parallel. See the image below for a graphical representation of `replicas` and `poolsize`:
43+
44+
![Poolsize and replicas](media/big-data-cluster-create-apps/poolsize-vs-replicas.png)
45+
46+
After the ReplicaSet has been created and the pods have started, a cron job is created if a `schedule` was set in the `spec.yaml` file. Finally, a Kubernetes Service is created that can be used to manage and run the application (see below).
47+
48+
When an application is executed, the Kubernetes service for the application proxies the requests to a replica and returns the results.
49+
50+
## How to work with Application Deployment
51+
52+
The two main interfaces for Application Deployment are:
53+
- [Command line interface `mssqlctl`](big-data-cluster-create-apps.md)
54+
- [Visual Studio Code and Azure Data Studio extension](app-deployment-extension.md)
55+
56+
It is also possible for an application to be executed using a RESTful web service. For more information, see [Consume applications on big data clusters](big-data-cluster-consume-apps.md).
57+
58+
## Next steps
59+
60+
To learn more about how to create and run applications on SQL Server big data clusters, see the following:
61+
62+
- [Deploy applications using mssqlctl](big-data-cluster-create-apps.md)
63+
- [Deploy applications using the App Deploy extension](app-deployment-extension.md)
64+
- [Consume applications on big data clusters](big-data-cluster-consume-apps.md)
65+
66+
To learn more about the SQL Server big data clusters, see the following overview:
67+
68+
- [What are SQL Server 2019 big data clusters?](big-data-cluster-overview.md)

docs/toc/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
href: ../big-data-cluster/deploy-on-minikube.md
8080
- name: Concepts
8181
items:
82+
- name: Application deployment
83+
href: ../big-data-cluster/concept-application-deployment.md
8284
- name: Controller
8385
href: ../big-data-cluster/concept-controller.md
8486
- name: Master instance

0 commit comments

Comments
 (0)