diff --git a/samples/features/sql-big-data-cluster/app-deploy/README.md b/samples/features/sql-big-data-cluster/app-deploy/README.md index 4e3e928b..4c32e423 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/README.md @@ -7,10 +7,10 @@ Application deployment allows you to deploy applications into SQL Server big dat ## Pre-requisites * SQL Server big data cluster CTP 2.3 or later -* `mssqlctl` CLI familiarity. If you are unfamiliar with `mssqlctl` please refer to - [App Deployment in SQL Server big data cluster](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) for more information. +* `azdata` CLI familiarity. If you are unfamiliar with `azdata` please refer to - [App Deployment in SQL Server big data cluster](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) for more information. * Tip -**mssqlctl app -h** will display the various commands to manage the app +**azdata app -h** will display the various commands to manage the app ## Templates Templates are used by our [App Deploy add-ins](https://docs.microsoft.com/en-us/sql/big-data-cluster/app-deployment-extension?view=sqlallproducts-allversions) and can be used to quickly deploy applications. diff --git a/samples/features/sql-big-data-cluster/app-deploy/RollDice/README.md b/samples/features/sql-big-data-cluster/app-deploy/RollDice/README.md index 1e8c8c81..240d4d85 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/RollDice/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/RollDice/README.md @@ -34,7 +34,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -44,20 +44,20 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Deploy the application by running the following command, specifying the folder where your `spec.yaml` and `roll-dice.R` files are located: ```bash - mssqlctl app create --spec ./RollDice + azdata app create --spec ./RollDice ``` 4. Check the deployment by running the following command: ```bash - mssqlctl app list -n roll-dice -v [version] + azdata app list -n roll-dice -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 5. Test the app by running the following command: ```bash - mssqlctl app run -n roll-dice -v [version] --input x=3 + azdata app run -n roll-dice -v [version] --input x=3 ``` You should get output like the example for three dice below. The results of the dice rolled are in the `result` data frame: ```json @@ -88,7 +88,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name roll-dice --version [version] + azdata app delete --name roll-dice --version [version] ``` diff --git a/samples/features/sql-big-data-cluster/app-deploy/SSIS/README.md b/samples/features/sql-big-data-cluster/app-deploy/SSIS/README.md index 7b77325a..57037d8c 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/SSIS/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/SSIS/README.md @@ -23,7 +23,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server big data cluster. 3. Optional: to see the SSIS package itself, install Visual Studio 2017 if you don't have it already. After that download and install [SSDT](https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017#ssdt-for-vs-2017-standalone-installer). 4. Optional: install [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017) if it is not already installed. @@ -35,16 +35,16 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Replace `[SA_PASSWORD]` in the `spec.yaml` file with the password for SQL user `sa`. 4. Deploy the application by running the following command, specifying the folder where your `spec.yaml` and `back-up-db.dtsx` files are located: ```bash - mssqlctl app create --spec ./SSIS + azdata app create --spec ./SSIS ``` 5. Check the deployment by running the following command: ```bash - mssqlctl app list --name back-up-db --version [version] + azdata app list --name back-up-db --version [version] ``` Once the app is listed as `Ready` the job should run within a minute. You can check if the backup is created by running: @@ -56,7 +56,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name back-up-db --version [version] + azdata app delete --name back-up-db --version [version] # delete backup files kubectl -n [your namespace] exec -it mssql-master-pool-0 -c mssql-server -- /bin/bash -c "rm /var/opt/mssql/data/*.DWConfigbak" ``` @@ -73,7 +73,7 @@ Here is the spec file for this application. This sample uses the `SSIS` runtime |Setting|Description| |-|-| |options|Specifies any command line parameters passed to the execution of the SSIS package| -|schedule|Specifies when the job should run. This follows cron expressions. A value of '*/1 * * * *' means the job runs *every minute*. If omitted the package will not run automatically and you can run the package on demand using `mssqlctl run -n back-up-db -v [version]` or making a call to the API.| +|schedule|Specifies when the job should run. This follows cron expressions. A value of '*/1 * * * *' means the job runs *every minute*. If omitted the package will not run automatically and you can run the package on demand using `azdata run -n back-up-db -v [version]` or making a call to the API.| ```yaml name: back-up-db diff --git a/samples/features/sql-big-data-cluster/app-deploy/addpy/README.md b/samples/features/sql-big-data-cluster/app-deploy/addpy/README.md index 449efbbb..cbb7bd95 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/addpy/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/addpy/README.md @@ -35,7 +35,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -45,20 +45,20 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Deploy the application by running the following command, specifying the folder where your `spec.yaml` and `add.py` files are located: ```bash - mssqlctl app create --spec ./addpy + azdata app create --spec ./addpy ``` 4. Check the deployment by running the following command: ```bash - mssqlctl app list -n addpy -v [version] + azdata app list -n addpy -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 5. Test the app by running the following command: ```bash - mssqlctl app run -n addpy -v [version] --input x=3,y=5 + azdata app run -n addpy -v [version] --input x=3,y=5 ``` You should get output like the example below. The result of adding 3+5 are returned as `result`. ```json @@ -75,7 +75,7 @@ To run this sample, you need the following prerequisites. ``` 6. Any app you create is also accessible using a RESTful web service that is [Swagger](swagger.io) compliant. You can get the endpoint for the web service by running: ```bash - mssqlctl app describe --name addpy --version [version] + azdata app describe --name addpy --version [version] ``` This will return an output much like the following: ```json @@ -106,7 +106,7 @@ To run this sample, you need the following prerequisites. } ``` Note the IP address and the port number in this output. Open the following URL in your browser: - `https://[IP]:[PORT]/api/docs/swagger.json`. You will have to log in with the same credentials you used for `mssqlctl login`. The contents of the `swagger.json` you can paste into [Swagger Editor](https://editor.swagger.io) to understand what methods are available: + `https://[IP]:[PORT]/api/docs/swagger.json`. You will have to log in with the same credentials you used for `azdata login`. The contents of the `swagger.json` you can paste into [Swagger Editor](https://editor.swagger.io) to understand what methods are available: ![API Swagger](api_swagger.png) Notice the `app` GET method as well as the `token` POST method. Since the authentication for apps uses JWT tokens you will need to get a token my using your favorite tool to make a POST call to the `token` method. Here is an example of how to do just that in [Postman](https://www.getpostman.com/): @@ -114,20 +114,20 @@ To run this sample, you need the following prerequisites. The result of this request will give you an `access_token`, which you will need to call the URL to run the app. - > *Optional*: If you want, you can open the URL for the `swagger` that was returned when you ran `mssqlctl app describe --name addpy --version [version]` in your browser. You will have to log in with the same credentials you used for `mssqlctl login`. The contents of the `swagger.json` you can paste into [Swagger Editor](https://editor.swagger.io). You will see that the web service exposes the `run` method. + > *Optional*: If you want, you can open the URL for the `swagger` that was returned when you ran `azdata app describe --name addpy --version [version]` in your browser. You will have to log in with the same credentials you used for `azdata login`. The contents of the `swagger.json` you can paste into [Swagger Editor](https://editor.swagger.io). You will see that the web service exposes the `run` method. You can use your favorite tool to call the `run` method (`https://[IP]:30778/api/app/addpy/[version]/run`), passing in the parameters in the body of your POST request as json. In this example we will use [Postman](https://www.getpostman.com/). Before making the call, you will need to set the `Authorization` to `Bearer Token` and paste in the token you retrieved earlier. This will set a header on your request. See the screenshot below. ![Postman Run Headers](postman_run_1.png) Next, in the requests body, pass in the parameters to the app you are calling and set the `content-type` to `application/json`: ![Postman Run Body](postman_run_2.png) - When you send the request, you will get the same output as you did when you ran the app through `mssqlctl app run`: + When you send the request, you will get the same output as you did when you ran the app through `azdata app run`: ![Postman Run Result](postman_result.png) You have now successfully called the app through the web service! 7. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name addpy --version [version] + azdata app delete --name addpy --version [version] ``` diff --git a/samples/features/sql-big-data-cluster/app-deploy/magic8ball/README.md b/samples/features/sql-big-data-cluster/app-deploy/magic8ball/README.md index 82a4eaa0..0d526304 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/magic8ball/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/magic8ball/README.md @@ -34,7 +34,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -44,20 +44,20 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Deploy the application by running the following command, specifying the folder where your `spec.yaml` and `magic8ball.py` files are located: ```bash - mssqlctl app create --spec ./magic8ball + azdata app create --spec ./magic8ball ``` 4. Check the deployment by running the following command: ```bash - mssqlctl app list -n magic8ball -v [version] + azdata app list -n magic8ball -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 5. Test the app by running the following command: ```bash - mssqlctl app run -n magic8ball -v [version] --input txt="Will it rain tomorrow?" + azdata app run -n magic8ball -v [version] --input txt="Will it rain tomorrow?" ``` You should get output like the example below. The answer to your question are returned as `result`. ```json @@ -78,7 +78,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name magic8ball --version [version] + azdata app delete --name magic8ball --version [version] ``` diff --git a/samples/features/sql-big-data-cluster/app-deploy/mleap/README.md b/samples/features/sql-big-data-cluster/app-deploy/mleap/README.md index df135f69..b666d9ac 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/mleap/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/mleap/README.md @@ -31,7 +31,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -41,17 +41,17 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. This example uses a TensorFlow Machine Learning Model that uses public US Census data predict income. [More details and information on the example are here](https://docs.microsoft.com/en-us/sql/big-data-cluster/train-and-create-machinelearning-models-with-spark?view=sqlallproducts-allversions). The application you will be deploying as part of this sample is a Random Forest Model that was built in Spark and has been [serialized as an MLeap bundle](https://docs.microsoft.com/en-us/sql/big-data-cluster/export-model-with-spark-mleap?view=sqlallproducts-allversions). Deploy the app using the `create` command and pass the location of the spec file. In the example below, the spec file is expected to be in the `mleap` folder: ```bash - mssqlctl app create --spec ./mleap/ + azdata app create --spec ./mleap/ ``` 1. Check the deployment by running the following command: ```bash - mssqlctl app list -n mleap-census -v [version] + azdata app list -n mleap-census -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 2. Now that the app has been deployed you can test if the app works correctly by passing in a sample input that is available in the `mleap` folder. The deployed app is a RESTful webservice that is [Swagger](swagger.io) compliant. For this sample we will show you how you can test this using the CLI. @@ -59,7 +59,7 @@ To run this sample, you need the following prerequisites. To test the app, run the command below. The input parameter is a `MLeapFrame`, a `json` file that describes the parameters and the values provided to the model for predicting income. Note that the input parameter has a special character '@' to indicate that a `json` file is being passed. This command needs to be run within the `mleap` folder. ```bash - mssqlctl app run --name mleap-census --version [version] --input schema=@census_frame.json + azdata app run --name mleap-census --version [version] --input schema=@census_frame.json ``` The result will be a json output that includes the predicted income along with additional data. @@ -69,7 +69,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name mleap-census --version [version] + azdata app delete --name mleap-census --version [version] ``` diff --git a/samples/features/sql-big-data-cluster/app-deploy/sentiment-analysis/README.md b/samples/features/sql-big-data-cluster/app-deploy/sentiment-analysis/README.md index 69decc53..df6ceb16 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/sentiment-analysis/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/sentiment-analysis/README.md @@ -35,7 +35,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -45,20 +45,20 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Deploy the application by running the following command, specifying the folder where your `spec.yaml`, `sentiment.rds` and `sentiment.R` files are located: ```bash - mssqlctl app create --spec ./sentiment-analysis + azdata app create --spec ./sentiment-analysis ``` 4. Check the deployment by running the following command: ```bash - mssqlctl app list -n sentiment-r -v [version] + azdata app list -n sentiment-r -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 5. Test the app by running the following command: ```bash - mssqlctl app run -n sentiment-r -v [version] --input reviewText="Absolutely the best movie experience I have ever had!" + azdata app run -n sentiment-r -v [version] --input reviewText="Absolutely the best movie experience I have ever had!" ``` You should get output like the example below. The result of the sentiment analysis scoring is returned as a data frame in `out`. A `PredictedLabel` equal to `1` indicates the sentiment is deemed positive, whereas a `PredictedLabel` of `0` indicates a negative sentiment. The `Probability.1` indicates the level of certainty for the `PredictedLabel` to be the true sentiment. ```json @@ -89,7 +89,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name sentiment-r --version [version] + azdata app delete --name sentiment-r --version [version] ``` diff --git a/samples/features/sql-big-data-cluster/app-deploy/sumofsq/README.md b/samples/features/sql-big-data-cluster/app-deploy/sumofsq/README.md index 130134c9..fb74dabb 100644 --- a/samples/features/sql-big-data-cluster/app-deploy/sumofsq/README.md +++ b/samples/features/sql-big-data-cluster/app-deploy/sumofsq/README.md @@ -35,7 +35,7 @@ To run this sample, you need the following prerequisites. **Software prerequisites:** 1. SQL Server big data cluster CTP 2.3 or later. -2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server 2019 big data cluster. +2. `azdata`. Refer to [installing azdata](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-azdata?view=sqlallproducts-allversions) document on setting up the `azdata` and connecting to a SQL Server 2019 big data cluster. @@ -45,20 +45,20 @@ To run this sample, you need the following prerequisites. 2. Log in to the SQL Server big data cluster using the command below using the IP address of the `mgmtproxy-svc-external` in your cluster. If you are not familiar with `mssqltctl` you can refer to the [documentation](https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-create-apps?view=sqlallproducts-allversions) and then return to this sample. ```bash - mssqlctl login -e https://:30777 -u -p + azdata login -e https://:30777 -u -p ``` 3. Deploy the application by running the following command, specifying the folder where your `spec.yaml` and `sum_of_squares.R` files are located: ```bash - mssqlctl app create --spec ./sumofsq + azdata app create --spec ./sumofsq ``` 4. Check the deployment by running the following command: ```bash - mssqlctl app list -n sum-of-sq -v [version] + azdata app list -n sum-of-sq -v [version] ``` Once the app is listed as `Ready` you can continue to the next step. 5. Test the app by running the following command: ```bash - mssqlctl app run -n sum-of-sq -v [version] --input a=42,b=3435 + azdata app run -n sum-of-sq -v [version] --input a=42,b=3435 ``` You should get output like the example below. The answer to your question are returned as `result`. ```json @@ -79,7 +79,7 @@ To run this sample, you need the following prerequisites. 6. You can clean up the sample by running the following commands: ```bash # delete app - mssqlctl app delete --name sum-of-sq --version [version] + azdata app delete --name sum-of-sq --version [version] ```