Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix #810 merge conflict

  • Loading branch information...
commit fb989b75fb16e9ecfd457d4ba706216ce70920af 2 parents 5c2f272 + a7122ab
Molly Bostic authored
BIN  DevCenter/Mobile/Media/mobile-browse-updates-table.png
BIN  DevCenter/Mobile/Media/mobile-create-job-dialog.png
BIN  DevCenter/Mobile/Media/mobile-create-updates-table.png
BIN  DevCenter/Mobile/Media/mobile-data-tab-empty.png
BIN  DevCenter/Mobile/Media/mobile-schedule-job-enabled.png
BIN  DevCenter/Mobile/Media/mobile-schedule-job-script-new.png
BIN  DevCenter/Mobile/Media/mobile-schedule-job-script.png
BIN  DevCenter/Mobile/Media/mobile-services-selection.png
193 DevCenter/Mobile/Tutorials/mobile-services-command-prompt-administration.md
Source Rendered
... ... @@ -0,0 +1,193 @@
  1 +<properties linkid="develop-mobile-tutorials-command-prompt-administration" urlDisplayName="Command prompt administration" pageTitle="Automate mobile services with command-line tools" metaKeywords="Windows Azure Mobile Services, command prompt, command line tool, mobile services" metaDescription="Learn how to use the Windows Azure command-line tool to automate the creation of management of Windows Azure Mobile Services." metaCanonical="" disqusComments="1" umbracoNaviHide="1" />
  2 +
  3 +<div title="This is rendered content from macro" class="umbMacroHolder" onresizestart="return false;" umbpageid="15161" umbversionid="f1a70b05-645d-4fcd-bb15-74674509c46a" ismacro="true" umb_chunkpath="devcenter/Menu" umb_modaltrigger="" umb_chunkurl="" umb_hide="0" umb_chunkname="MobileArticleLeft" umb_modalpopup="0" umb_macroalias="AzureChunkDisplayer"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
  4 +
  5 +# Automate mobile services with command-line tools
  6 +
  7 +This topic shows you how to use use the Windows Azure command-line tools to automate the creation and management of Windows Azure Mobile Services. This topic shows you how to install and get started using the command-line tools and use them to perform the following Mobile Services tasks:
  8 +
  9 +- [Create a new mobile service]
  10 +- [Create a new table]
  11 +- [Register a script to a table operation][Register a new table script]
  12 +- [Delete an existing table]
  13 +- [Delete an existing mobile service]
  14 +
  15 +When combined into a single script or batch file, these individual commands automate the creation, verfication, and deletion process of a mobile service.
  16 +
  17 +To use the Windows Azure command-line tools to manage Mobile Services, you need a Windows Azure account that has the Windows Azure Mobile Services feature enabled.
  18 +
  19 ++ If you don't have an account, you can create a free trial account in just a couple of minutes. For details, see <a href="http://www.windowsazure.com/en-us/pricing/free-trial/?WT.mc_id=A0E0E5C02" target="_blank">Windows Azure Free Trial</a>.
  20 +
  21 ++ If you have an existing account but need to enable the Windows Azure Mobile Services preview, see <a href="../create-a-windows-azure-account/#enable" target="_blank">Enable Windows Azure preview features</a>.
  22 +
  23 +This topic covers a selection of common administration tasks supported by the Windows Azure command-line tools. For more information, see [Windows Azure command-line tools documentation][reference-docs].
  24 +
  25 +<!--+ You must download and install the Windows Azure command-line tools to your local machine. To do this, follow the instructions in the first section of this topic.
  26 +
  27 ++ (Optional) To be able to execute HTTP requests directly from the command-line, you must use cURL or an equivalent tool. cURL runs on a variety of platforms. Locate and install cURL for your specific platform from the <a href=http://go.microsoft.com/fwlink/p/?LinkId=275676 target="_blank">cURL download page</a>.-->
  28 +
  29 +<h2><a name="install"></a><span class="short-header">Install the tools</span>Install the Windows Azure Command-Line Tools</h2>
  30 +
  31 +The following list contains information for installing the command-line tools, depending on your operating system:
  32 +
  33 +* **Windows**: Download the [Windows Azure Command-Line Tools Installer][windows-installer]. Open the downloaded .msi file and complete the installation steps as you are prompted.
  34 +
  35 +* **Mac**: Download the [Windows Azure SDK Installer][mac-installer]. Open the downloaded .pkg file and complete the installation steps as you are prompted.
  36 +
  37 +* **Linux**: Install the latest version of [Node.js][nodejs-org] (see [Install Node.js via Package Manager][install-node-linux]), then run the following command:
  38 +
  39 + npm install azure-cli -g
  40 +
  41 + **Note**: You may need to run this command with elevated privileges:
  42 +
  43 + sudo npm install azure-cli -g
  44 +
  45 +To test the installation, type `azure` at the command prompt. When the installation is successful, you will see a list of all the available `azure` commands.
  46 +<h2><a name="import-account"></a><span class="short-header">Import settings</span>How to download and import publish settings</h2>
  47 +
  48 +To get started, you need to first download and import your publish settings. This will allow you to use the tools to create and manage Azure Services. To download your publish settings, use the `account download` command:
  49 +
  50 + azure account download
  51 +
  52 +This will open your default browser and prompt you to sign in to the Management Portal. After signing in, your `.publishsettings` file will be downloaded. Make note of where this file is saved.
  53 +
  54 +Next, import the `.publishsettings` file by running the following command, replacing `<path-to-settings-file>` with the path to your `.publishsettings` file:
  55 +
  56 + azure account import <path-to-settings-file>
  57 +
  58 +You can remove all of the information stored by the <code>import</code> command by using the <code>account clear</code> command:
  59 +
  60 + azure account clear
  61 +
  62 +To see a list of options for `account` commands, use the `-help` option:
  63 +
  64 + azure account -help
  65 +
  66 +After importing your publish settings, you should delete the `.publishsettings` file for security reasons.
  67 +
  68 +<div class="dev-callout"><strong>Note</strong>
  69 + <p>When you import publish settings, credentials for accessing your Windows Azure subscription are stored inside your <code>user</code> folder. Your <code>user</code> folder is protected by your operating system. However, it is recommended that you take additional steps to encrypt your <code>user</code> folder. You can do so in the following ways:</p>
  70 +
  71 + <ul>
  72 + <li>On Windows, modify the folder properties or use BitLocker.</li>
  73 + <li>On Mac, turn on FileVault for the folder.</li>
  74 + <li>On Ubuntu, use the Encrypted Home directory feature. Other Linux distributions offer equivalent features.</li>
  75 + </ul>
  76 +</div>
  77 +
  78 +You are now ready to begin creating and managing Windows Azure Mobile Services from the command line or in batch files.
  79 +
  80 +<h2><a name="create-service"></a><span class="short-header">Create service</span>How to create a new mobile service</h2>
  81 +
  82 +You can use the command-line tools to create a new mobile service instance. While creating the mobile service, you also create a new database instance in a new SQL Database server.
  83 +
  84 +The following command creates a new mobile service instance in your subscription, where `<service-name>` is the name of the new mobile service, `<server-admin>` is the login name of the new server, and `<server-password>` is the password for the new login:
  85 +
  86 + azure mobile create <service-name> <server-admin> <server-password>
  87 +
  88 +<div class="dev-callout"><strong>Security Note</strong>
  89 + <p><code>&lt;server-admin&gt;</code> and <code>&lt;server-password&gt;</code> are important security credentials. Because of this, we recommend that you take additional steps to encrypt any file or folder where these credentials are persisted. When you do not supply values for <code>&lt;server-admin&gt;</code> and <code>&lt;server-password&gt;</code> in the <code>mobile create</code> command, you are prompted to supply the values during execution.</p>
  90 +</div>
  91 +
  92 +The `mobile create` command fails when the specified mobile service already exists. In your automation scripts, you may want to attempt to delete a mobile service before attempting to recreate it.
  93 +
  94 +<h2><a name="delete-service"></a><span class="short-header">Delete service</span>How to delete an existing mobile service</h2>
  95 +
  96 +You can use the command-line tools to delete an existing mobile service, along with the related SQL Database and server. The following command deletes the mobile service, where `<service-name>` is the name of the mobile service to delete:
  97 +
  98 + azure mobile delete <service-name> -a -q
  99 +
  100 +By including `-a` and `-q` parameters, this command also deletes the SQL Database and server used by the mobile service without displaying a prompt.
  101 +
  102 +<div class="dev-callout"><strong>Note</strong>
  103 + <p>If you do not specify the <code>-q</code> parameter along with <code>-a</code> or <code>-d</code>, execution is paused and you are prompted to select delete options for your SQL Database. Only use the <code>-a</code> parameter when no other service using the database or server; otherwise use the <code>-d</code> parameter to only delete data that belongs to the mobile service being deleted.</p>
  104 +</div>
  105 +
  106 +<h2><a name="create-table"></a><span class="short-header">Create table</span>How to create a new table in the mobile service</h2>
  107 +
  108 +The following command creates a new table in the specified mobile service, where `<service-name>` is the name of the mobile service and `<table-name>` is the name of the table to create:
  109 +
  110 + mobile table create <service-name> <table-name>
  111 +
  112 +This creates a new table with the default permissions, `application`, for the table operations: `insert`, `read`, `update`, and `delete`. The following command creates a new table with `read` permission set to public and `delete` permission set to only adminstrators:
  113 +
  114 + mobile table create <service-name> <table-name> -p read=public,delete=admin
  115 +
  116 +The following table shows the script permission value compared to the permission value in the [Windows Azure Management Portal].
  117 +
  118 +<table border="1" width="100%"><tr><th>Script value</th><th>Management Portal value</th></tr>
  119 +<tr><td><code>public</code></td><td>Everyone</td></tr>
  120 +<tr><td><code>application</code> (default)</td><td>Anybody with the application key</td></tr>
  121 +<tr><td><code>user</code></td><td>Only authenticated users</td></tr>
  122 +<tr><td><code>admin </code></td><td>Only scripts and admins</td></tr></table>
  123 +
  124 +The `mobile table create` command fails when the specified table already exists. In your automation scripts, you may want to attempt to delete a table before attempting to recreate it.
  125 +
  126 +<h2><a name="delete-table"></a><span class="short-header">Delete table</span>How to delete an existing table from the mobile service</h2>
  127 +
  128 +The following command deletes a table from the mobile service, where `<service-name>` is the name of the mobile service and `<table-name>` is the name of the table to delete:
  129 +
  130 + azure mobile table delete <service-name> <table-name> -q
  131 +
  132 +In automation scripts, use the `-q` parameter to delete the table without displaying a confirmation prompt that blocks execution.
  133 +
  134 +<h2><a name="register-script"></a><span class="short-header">Register a script</span>How to register a script to a table operation</h2>
  135 +
  136 +Mobile Services enables you to register a JavaScript function to a given table operation, where the script is run when the table operation occurs. The following command uploads and registers a function to an operation on a table, where `<service-name>` is the name of the mobile service, `<table-name>` is the name of the table, and `<operation>` is the table operation, which can be `read`, `insert`, `update`, or `delete`:
  137 +
  138 + azure mobile script upload <service-name> table/<table-name>.<operation>.js
  139 +
  140 +Note that this operation uploads a JavaScript (.js) file from the local computer. The name of the file must be composed from the table and operation names, and it must be located in the `table` subfolder relative to the location where the command is executed. For example, the following operation uploads and registers a new `insert` script that belongs to the `TodoItems` table:
  141 +
  142 + azure mobile script upload todolist table/todoitems.insert.js
  143 +
  144 +The function declaration in the script file must also match the registered table operation. This means that from the above example, the uploaded script contains a function with the following signature:
  145 +
  146 + function insert(item, user, request) {
  147 + ...
  148 + }
  149 +
  150 +For more information about registering scripts, see [Mobile Services server script reference].
  151 +
  152 +<!--<h2><a name="test-service"></a><span class="short-header">Test the service</span>Test the new mobile service</h2>
  153 +
  154 +When you are automating the creation of your mobile service, you can optionally use cURL or another command-line request generator to
  155 +
  156 +## <a name="nextsteps"> </a>Next Steps
  157 +Next steps here....
  158 +-->
  159 +<!-- Anchors. -->
  160 +[Download and install the command-line tools]: #install
  161 +[Download and import publish settings]: #import
  162 +[Create a new mobile service]: #create-service
  163 +[Get the master key]: #get-master-key
  164 +[Create a new table]: #create-table
  165 +[Register a new table script]: #register-script
  166 +[Delete an existing table]: #delete-table
  167 +[Delete an existing mobile service]: #delete-service
  168 +[Test the mobile service]: #test-service
  169 +[Next steps]: #next-steps
  170 +
  171 +<!-- Images. -->
  172 +[1]: ../Media/mobile-portal-data-tables-channel.png
  173 +[2]: ../Media/mobile-insert-script-channel-clear.png
  174 +[3]: ../Media/mobile-services-selection.png
  175 +[4]: ../Media/mobile-schedule-new-job.png
  176 +[5]: ../Media/mobile-create-job-dialog.png
  177 +[6]: ../Media/mobile-schedule-job-script-new.png
  178 +[7]: ../Media/mobile-schedule-job-script.png
  179 +[8]: ../Media/mobile-verify-channel-duplicates.png
  180 +[9]: ../Media/mobile-schedule-job-logs.png
  181 +[10]: ../Media/mobile-schedule-job-enabled.png
  182 +
  183 +<!-- URLs. -->
  184 +[Mobile Services server script reference]: http://go.microsoft.com/fwlink/p?LinkId=262293
  185 +[WindowsAzure.com]: http://www.windowsazure.com/
  186 +[Windows Azure Management Portal]: https://manage.windowsazure.com/
  187 +[nodejs-org]: http://nodejs.org/
  188 +[install-node-linux]: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  189 +[download-wpi]: http://www.microsoft.com/web/downloads/platform.aspx
  190 +[mac-installer]: http://go.microsoft.com/fwlink/p?LinkId=252249
  191 +[windows-installer]: http://go.microsoft.com/fwlink/p?LinkID=275464
  192 +[reference-docs]: http://go.microsoft.com/fwlink/p?LinkId=252246
  193 +[http://www.windowsazure.com]: http://www.windowsazure.com
163 DevCenter/Mobile/Tutorials/mobile-services-schedule-jobs.md
Source Rendered
@@ -2,61 +2,33 @@
2 2
3 3 <div title="This is rendered content from macro" class="umbMacroHolder" onresizestart="return false;" umbpageid="15161" umbversionid="f1a70b05-645d-4fcd-bb15-74674509c46a" ismacro="true" umb_chunkpath="devcenter/Menu" umb_modaltrigger="" umb_chunkurl="" umb_hide="0" umb_chunkname="MobileArticleLeft" umb_modalpopup="0" umb_macroalias="AzureChunkDisplayer"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
4 4
5   -# Schedule backend jobs in Mobile Services
  5 +# Schedule recurring jobs in Mobile Services
6 6
7   -This topic shows you how to use the job scheduler functionality in the Management Portal to define server script code that is executed based on a schedule that you define. In this case, the script removes duplicate push notification channel URIs from a table. Duplicate records can occur when you do not check for duplicates before you insert a new channel URI. Duplicate URIs might result in a push notification being sent multiple times to the same device. Some other periodic tasks that can be scheduled include:
  7 +This topic shows you how to use the job scheduler functionality in the Management Portal to define server script code that is executed based on a schedule that you define. In this case, the script periodically check with a remote service, in this case Twitter, and stores the results in a new table. Some other periodic tasks that can be scheduled include:
8 8
9   -+ Archiving old data records.
  9 ++ Archiving old or duplicate data records.
10 10 + Requesting and storing external data, such as tweets, RSS entries, and location information.
11 11 + Processing or resizing stored images.
12 12
13   -This tutorial walks you through these basic steps to demonstrate how to use the job scheduler to create a job that removes duplicate push notification channel URIs from the Channel table:
  13 +This tutorial walks you through the basic steps of how to use the job scheduler to create a scheduled job that requests tweet data from Twitter and stores the tweets in a new Updates table.
14 14
15   -1. [Update Channel table scripts]
16   -2. [Insert data to create duplicate channels]
17   -3. [Create a new scheduled job]
18   -
19   -This tutorial uses the Channel table. This table is created when you complete the tutorial [Push notifications to app users for Windows Store apps] or [Push notifications to app users for Windows Phone 8 apps]. Completing one of these tutorials is a prerequisite for completing this tutorial. This approach can be used to clean up any duplicate data, no matter how it was generated.
20   -
21   -<a name="update-scripts"></a><h2><span class="short-header">Update scripts</span>Update Channel table scripts</h2>
  15 +<a name="create-table"></a><h2><span class="short-header">Create new table</span>Create the new Updates table</h2>
22 16
23 17 1. Log on to the [Windows Azure Management Portal], click **Mobile Services**, and then click your mobile service.
24 18
25   - ![][3]
26   -
27   -2. Click the **Data** tab, then click the **Channel** table.
28   -
29   - ![][1]
  19 +2. Click the **Data** tab, then click **+Create**.
30 20
31   -3. In **channel**, click the **Script** tab, select **Insert**, click **Clear**, then click **Yes** to confirm.
32   -
33 21 ![][2]
34 22
35   - This removes the code that checks for duplicate URI values before inserting them into the Channel table.
36   -
37   - <div class="dev-callout"><b>Note</b>
38   - <p>To restore the original functionality of the push notifications tutorial, replace the copied <strong>insert</strong> function code.</p>
39   - </div>
40   -
41   -Now that you have disabled duplicate checking on the Channel table, you can run the app to insert duplicate records.
42   -
43   -<a name="insert-duplicates"></a><h2><span class="short-header">Generate duplicates</span>Insert data to create duplicate channels</h2>
  23 + This displays the **Create new table** dialog.
44 24
45   -1. In the appropriate version of Visual Studio 2012 Express, open the app project from either [Push notifications to app users for Windows Store apps] or [Push notifications to app users for Windows Phone 8 apps].
  25 +3. In **Table name** type _Updates_, then click the check button.
46 26
47   -2. Press the **F5** key to rebuild the project and start the app.
48   -
49   -3. Stop or close the app and repeat steps 2.
50   -
51   - This adds duplicate channel URIs into the Channel table.
52   -
53   -5. Back in the Management Portal, click **Browse**
54   -
55   - ![][8]
  27 + ![][3]
56 28
57   - Notice that there are two or more entries in the table with the same **Uri** value.
  29 + This creates a new storage table **Updates**.
58 30
59   -6. Click the back arrow to return to the mobile service page.
  31 +Now that you have somewhere to store Twitter data, you can create the scheduled job.
60 32
61 33 <a name="add-job"></a><h2><span class="short-header">Create a new job</span>Create a new scheduled job</h2>
62 34
@@ -68,55 +40,91 @@ Now that you have disabled duplicate checking on the Channel table, you can run
68 40 <p>When you run your mobile service in <i>free</i> mode, you are only able to run one scheduled job at a time. In <i>reserved</i> mode, you can run up to ten scheduled jobs at a time.</p>
69 41 </div>
70 42
71   -3. In the scheduler dialog, enter <i>cleanup_channels</i> for the **Job Name**, set the schedule interval and units, then click the check button.
  43 +3. In the scheduler dialog, enter <i>getUpdates</i> for the **Job Name**, set the schedule interval and units, then click the check button.
72 44
73 45 ![][5]
74 46
75   - This creates a new job named **cleanup_channels**.
  47 + This creates a new job named **getUpdates**.
76 48
77 49 4. Click the new job you just created, then click the **Script** tab.
78 50
79 51 ![][6]
80 52
81   -5. Replace the placeholder function **cleanup_channels** with the following code:
82   -
83   - function cleanup_channels() {
84   - var sql = "SELECT MAX(Id) as Id, Uri FROM Channel " +
85   - "GROUP BY Uri HAVING COUNT(*) > 1";
86   - var channelTable = tables.getTable('Channel');
  53 +5. Replace the placeholder function **getUpdates** with the following code:
  54 +
  55 + var updatesTable = tables.getTable('Updates');
  56 + var request = require('request');
  57 +
  58 + function getUpdates() {
  59 + // Check what is the last tweet we stored when the job last ran
  60 + // and ask Twitter to only give us more recent tweets
  61 + appendLastTweetId(
  62 + 'http://search.twitter.com/search.json?q=%23mobileservices&result_type=recent',
  63 + function twitterUrlReady(url){
  64 + request(url, function tweetsLoaded (error, response, body) {
  65 + if (!error && response.statusCode == 200) {
  66 + var results = JSON.parse(body).results;
  67 + if(results){
  68 + console.log('Fetched new results from Twitter');
  69 + results.forEach(function visitResult(tweet){
  70 + if(!filterOutTweet(tweet)){
  71 + var update = {
  72 + twitterId: tweet.id,
  73 + text: tweet.text,
  74 + author: tweet.from_user,
  75 + date: tweet.created_at
  76 + };
  77 + updatesTable.insert(update);
  78 + }
  79 + });
  80 + }
  81 + } else {
  82 + console.error('Could not contact Twitter');
  83 + }
  84 + });
  85 +
  86 + });
  87 + }
  88 +
  89 + // Find the largest (most recent) tweet ID we have already stored
  90 + // (if we have stored any) and ask Twitter to only return more
  91 + // recent ones
  92 + function appendLastTweetId(url, callback){
  93 + updatesTable
  94 + .orderByDescending('twitterId')
  95 + .read({success: function readUpdates(updates){
  96 + if(updates.length){
  97 + callback(url + '&since_id=' + updates[0].twitterId + 1);
  98 + } else {
  99 + callback(url);
  100 + }
  101 + }});
  102 + }
87 103
88   - mssql.query(sql, {
89   - success: function(results) {
90   - if (results.length > 0) {
91   - for (var i = 0; i < results.length; i++) {
92   - channelTable.del(results[i].Id);
93   - console.log('Deleted duplicate channel:' +
94   - results[i].Uri);
95   - }
96   - } else {
97   - console.log('No duplicate rows found.');
98   - }
99   - }
100   - });
101   - }
102   -
103   -6. Click **Save**, then **Run Once** to test the script.
  104 + function filterOutTweet(tweet){
  105 + // Remove retweets and replies
  106 + return !((tweet.text.indexOf('RT') !== 0) && (tweet.to_user_id === 0));
  107 + }
  108 +
  109 + This script calls the Twitter query API to request recent tweets that contain the hashtag #mobileservices. Duplicate tweets and replies are removed from the results before they are stored in the table.
  110 +
  111 +6. Click **Run Once** to test the script.
104 112
105 113 ![][7]
106 114
107   - This executes the job while it remains disabled in the scheduler.
  115 + This saves and executes the job while it remains disabled in the scheduler.
108 116
109   -7. Click the back button, click **Logs**, locate the **Deleted duplicate...** item, click **Details**, and verify that a duplicate row was deleted.
  117 +7. Click the back button, click **Data**, click the **Updates** table, click **Browse**, and verify that Twitter data has been inserted into the table.
110 118
111   - ![][9]
  119 + ![][8]
112 120
113   -8. Click **Scheduler**, select **cleanup_channels**, then click **Enable**.
  121 +8. Click the back button, click **Scheduler**, select **getUpdates**, then click **Enable**.
114 122
115   - ![][10]
  123 + ![][9]
116 124
117 125 This enables the job to run on the specified schedule, in this case every hour.
118 126
119   -Congratulations, you have successfully created a new job schedule in your mobile service. This job will be executed as scheduled until you disable or modify it.
  127 +Congratulations, you have successfully created a new scheduled job in your mobile service. This job will be executed as scheduled until you disable or modify it.
120 128
121 129 ## <a name="nextsteps"> </a>Next Steps
122 130
@@ -124,27 +132,22 @@ Congratulations, you have successfully created a new job schedule in your mobile
124 132 <br/>Learn more about registering and using server scripts.
125 133
126 134 <!-- Anchors. -->
127   -[Update Channel table scripts]: #update-scripts
128   -[Insert data to create duplicate channels]: #insert-duplicates
  135 +[Create the new Tweets table]: #create-table
129 136 [Create a new scheduled job]: #add-job
130 137 [Next steps]: #next-steps
131 138
132 139 <!-- Images. -->
133   -[1]: ../Media/mobile-portal-data-tables-channel.png
134   -[2]: ../Media/mobile-insert-script-channel-clear.png
135   -[3]: ../Media/mobile-services-selection.png
  140 +[1]: ../Media/mobile-services-selection.png
  141 +[2]: ../Media/mobile-data-tab-empty.png
  142 +[3]: ../Media/mobile-create-updates-table.png
136 143 [4]: ../Media/mobile-schedule-new-job.png
137 144 [5]: ../Media/mobile-create-job-dialog.png
138 145 [6]: ../Media/mobile-schedule-job-script-new.png
139 146 [7]: ../Media/mobile-schedule-job-script.png
140   -[8]: ../Media/mobile-verify-channel-duplicates.png
141   -[9]: ../Media/mobile-schedule-job-logs.png
142   -[10]: ../Media/mobile-schedule-job-enabled.png
  147 +[8]: ../Media/mobile-browse-updates-table.png
  148 +[9]: ../Media/mobile-schedule-job-enabled.png
143 149
144 150 <!-- URLs. -->
145   -[Push notifications to app users for Windows Store apps]: ../tutorials/mobile-services-push-notifications-to-app-users-dotnet.md
146   -[Push notifications to app users for Windows Phone 8 apps]: ../tutorials/mobile-services-push-notifications-to-app-users-wp8.md
147   -[Push notifications to app users]: ../tutorials/mobile-services-push-notifications-to-app-users-ios.md
148 151 [Mobile Services server script reference]: http://go.microsoft.com/fwlink/?LinkId=262293
149 152 [WindowsAzure.com]: http://www.windowsazure.com/
150 153 [Windows Azure Management Portal]: https://manage.windowsazure.com/
34 Shared/Chunks/win-az-command-line-tools.md
Source Rendered
... ... @@ -1,6 +1,6 @@
1 1 #Windows Azure command-line tool for Mac and Linux#
2 2
3   -This tool provides functionality for creating, deploying, and managing virtual machines and websites from Mac and Linux desktops. This functionality is similar to that provided by the Windows PowerShell cmdlets that are installed with the Windows Azure SDKs for .NET, Node.JS, and PHP.
  3 +This tool provides functionality for creating, deploying, and managing virtual machines, web sites, and Windows Azure Mobile Services from Mac and Linux desktops. This functionality is similar to that provided by the Windows PowerShell cmdlets that are installed with the Windows Azure SDKs for .NET, Node.JS, and PHP.
4 4
5 5 To install the tool on a Mac, download and run the [Windows Azure SDK installer](http://go.microsoft.com/fwlink/?LinkId=252249).
6 6
@@ -22,9 +22,11 @@ In addition to command-specific optional parameters documented here, there are t
22 22 * [Commands to manage your Windows Azure cloud services](#Commands_to_manage_your_Azure_cloud_services)
23 23 * [Commands to manage your Windows Azure certificates](#Commands_to_manage_your_Azure_certificates)
24 24 * [Commands to manage your websites](#Commands_to_manage_your_web_sites)
  25 +* [Commands to manage Windows Azure Mobile Services](#Commands_to_manage_mobile_services)
25 26 * [Manage tool local settings](#Manage_tool_local_settings)
26 27
27 28 ##<a id="Manage_your_account_information_and_publish_settings"></a>Manage your account information and publish settings
  29 +
28 30 Your Windows Azure subscription information is used by the tool to connect to your account. This information can be obtained from the Windows Azure portal in a publish settings file as described here. The publish settings file can then be imported as a persistent local config setting that the tool will use for subsequent operations. You only need to import your publish settings once.
29 31
30 32 **account download [options]**
@@ -77,6 +79,7 @@ Affinity groups can be set when a group of virtual machines spans multiple physi
77 79 info: account affinity-group list command OK
78 80
79 81 ##<a id="Commands_to_manage_your_Azure_virtual_machines"></a>Commands to manage your Windows Azure virtual machines
  82 +
80 83 The following diagram shows how Windows Azure virtual machines are hosted in the production deployment environment of a Windows Azure cloud service.
81 84
82 85 ![Azure Technical Diagram](../media/architecturediagram.jpg)
@@ -224,6 +227,7 @@ A virtual machine image cannot be captured while the virtual machine state unles
224 227 info: vm capture command OK
225 228
226 229 ##<a id="Commands_to_manage_your_Azure_virtual_machine_endpoints"></a>Commands to manage your Windows Azure virtual machine endpoints
  230 +
227 231 The following diagram shows the architecture of a typical deployment of multiple instances of a virtual machine. Note that in this example port 3389 is open on each virtual machine (for RDP access), and there is also an internal IP address (for example, 168.55.11.1) on each virtual machine that is used by the load balancer to route traffic to the virtual machine. This internal IP address can also be used for communication between virtual machines.
228 232
229 233 ![Windows Azure Network Diagram](../media/networkdiagram.jpg)
@@ -265,6 +269,7 @@ This command lists all virtual machine endpoints. The -json option specifies tha
265 269
266 270 <span id="Commands_to_manage_your_Azure_virtual_machine_images"></span>
267 271 ##Commands to manage your Windows Azure virtual machine images
  272 +
268 273 Virtual machine images are captures of already configured virtual machines that can be replicated as required.
269 274
270 275 **vm image list [options]**
@@ -426,6 +431,7 @@ This command detaches a data disk attached to a Windows Azure virtual machine. &
426 431
427 432 <span id="Commands_to_manage_your_Azure_cloud_services"></span>
428 433 ##Commands to manage your Windows Azure cloud services
  434 +
429 435 Windows Azure cloud services are applications and services hosted on web roles and worker roles. The following commands can be used to manage Windows Azure cloud services.
430 436
431 437 **service list [options]**
@@ -450,6 +456,7 @@ This command deletes a Windows Azure cloud service.
450 456
451 457 <span id="Commands_to_manage_your_Azure_certificates"></span>
452 458 ##Commands to manage your Windows Azure certificates
  459 +
453 460 Windows Azure certificates are cerificates (that is, SSL certificates) connected to your Windows Azure account.
454 461
455 462 **service cert list [options]**
@@ -487,6 +494,7 @@ This command deletes a certificate.
487 494
488 495 <span id="Commands_to_manage_your_web_sites"></span>
489 496 ##Commands to manage your websites
  497 +
490 498 A Windows Azure website is a web configuration accessible by URI. Websites are hosted in virtual machines, but you do not need to think about the details of creating and deploying the virtual machine yourself. Those details are handled for you by Windows Azure.
491 499
492 500 **site list [options]**
@@ -593,8 +601,32 @@ This command stops a website.
593 601 info: Site mysite has been stopped
594 602 info: site stop command OK
595 603
  604 +<span id="Commands_to_manage_mobile_services"></span>
  605 +##Commands to manage Windows Azure Mobile Services
  606 +
  607 +Windows Azure Mobile Services
  608 +
  609 +###Commands to manage mobile services
  610 +
  611 +###Commands to manage configuration
  612 +
  613 +###Commands to manage logs
  614 +
  615 +###Commands to manage keys
  616 +
  617 +###Commands to manage tables
  618 +
  619 +<table border="1" width="100%"><tr><th>Script value</th><th>Management Portal value</th></tr>
  620 +<tr><td><code>public</code></td><td>Everyone</td></tr>
  621 +<tr><td><code>application</code> (default)</td><td>Anybody with the application key</td></tr>
  622 +<tr><td><code>user</code></td><td>Only authenticated users</td></tr>
  623 +<tr><td><code>admin </code></td><td>Only scripts and admins</td></tr></table>
  624 +
  625 +###Commands to manage table scripts
  626 +
596 627 <span id="Manage_tool_local_settings"></span>
597 628 ##Manage tool local settings
  629 +
598 630 Local settings are your subscription ID and Default Storage Account Name.
599 631
600 632 **config list [options]**

0 comments on commit fb989b7

Please sign in to comment.
Something went wrong with that request. Please try again.