Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix #810 merge conflict

  • Loading branch information...
commit fb989b75fb16e9ecfd457d4ba706216ce70920af 2 parents 5c2f272 + a7122ab
@mollybostic authored
View
BIN  DevCenter/Mobile/Media/mobile-browse-updates-table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-create-job-dialog.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-create-updates-table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-data-tab-empty.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-schedule-job-enabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-schedule-job-script-new.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-schedule-job-script.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-selection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
193 DevCenter/Mobile/Tutorials/mobile-services-command-prompt-administration.md
@@ -0,0 +1,193 @@
+<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" />
+
+<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>
+
+# Automate mobile services with command-line tools
+
+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:
+
+- [Create a new mobile service]
+- [Create a new table]
+- [Register a script to a table operation][Register a new table script]
+- [Delete an existing table]
+- [Delete an existing mobile service]
+
+When combined into a single script or batch file, these individual commands automate the creation, verfication, and deletion process of a mobile service.
+
+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.
+
++ 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>.
+
++ 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>.
+
+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].
+
+<!--+ 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.
+
++ (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>.-->
+
+<h2><a name="install"></a><span class="short-header">Install the tools</span>Install the Windows Azure Command-Line Tools</h2>
+
+The following list contains information for installing the command-line tools, depending on your operating system:
+
+* **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.
+
+* **Mac**: Download the [Windows Azure SDK Installer][mac-installer]. Open the downloaded .pkg file and complete the installation steps as you are prompted.
+
+* **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:
+
+ npm install azure-cli -g
+
+ **Note**: You may need to run this command with elevated privileges:
+
+ sudo npm install azure-cli -g
+
+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.
+<h2><a name="import-account"></a><span class="short-header">Import settings</span>How to download and import publish settings</h2>
+
+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:
+
+ azure account download
+
+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.
+
+Next, import the `.publishsettings` file by running the following command, replacing `<path-to-settings-file>` with the path to your `.publishsettings` file:
+
+ azure account import <path-to-settings-file>
+
+You can remove all of the information stored by the <code>import</code> command by using the <code>account clear</code> command:
+
+ azure account clear
+
+To see a list of options for `account` commands, use the `-help` option:
+
+ azure account -help
+
+After importing your publish settings, you should delete the `.publishsettings` file for security reasons.
+
+<div class="dev-callout"><strong>Note</strong>
+ <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>
+
+ <ul>
+ <li>On Windows, modify the folder properties or use BitLocker.</li>
+ <li>On Mac, turn on FileVault for the folder.</li>
+ <li>On Ubuntu, use the Encrypted Home directory feature. Other Linux distributions offer equivalent features.</li>
+ </ul>
+</div>
+
+You are now ready to begin creating and managing Windows Azure Mobile Services from the command line or in batch files.
+
+<h2><a name="create-service"></a><span class="short-header">Create service</span>How to create a new mobile service</h2>
+
+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.
+
+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:
+
+ azure mobile create <service-name> <server-admin> <server-password>
+
+<div class="dev-callout"><strong>Security Note</strong>
+ <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>
+</div>
+
+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.
+
+<h2><a name="delete-service"></a><span class="short-header">Delete service</span>How to delete an existing mobile service</h2>
+
+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:
+
+ azure mobile delete <service-name> -a -q
+
+By including `-a` and `-q` parameters, this command also deletes the SQL Database and server used by the mobile service without displaying a prompt.
+
+<div class="dev-callout"><strong>Note</strong>
+ <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>
+</div>
+
+<h2><a name="create-table"></a><span class="short-header">Create table</span>How to create a new table in the mobile service</h2>
+
+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:
+
+ mobile table create <service-name> <table-name>
+
+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:
+
+ mobile table create <service-name> <table-name> -p read=public,delete=admin
+
+The following table shows the script permission value compared to the permission value in the [Windows Azure Management Portal].
+
+<table border="1" width="100%"><tr><th>Script value</th><th>Management Portal value</th></tr>
+<tr><td><code>public</code></td><td>Everyone</td></tr>
+<tr><td><code>application</code> (default)</td><td>Anybody with the application key</td></tr>
+<tr><td><code>user</code></td><td>Only authenticated users</td></tr>
+<tr><td><code>admin </code></td><td>Only scripts and admins</td></tr></table>
+
+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.
+
+<h2><a name="delete-table"></a><span class="short-header">Delete table</span>How to delete an existing table from the mobile service</h2>
+
+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:
+
+ azure mobile table delete <service-name> <table-name> -q
+
+In automation scripts, use the `-q` parameter to delete the table without displaying a confirmation prompt that blocks execution.
+
+<h2><a name="register-script"></a><span class="short-header">Register a script</span>How to register a script to a table operation</h2>
+
+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`:
+
+ azure mobile script upload <service-name> table/<table-name>.<operation>.js
+
+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:
+
+ azure mobile script upload todolist table/todoitems.insert.js
+
+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:
+
+ function insert(item, user, request) {
+ ...
+ }
+
+For more information about registering scripts, see [Mobile Services server script reference].
+
+<!--<h2><a name="test-service"></a><span class="short-header">Test the service</span>Test the new mobile service</h2>
+
+When you are automating the creation of your mobile service, you can optionally use cURL or another command-line request generator to
+
+## <a name="nextsteps"> </a>Next Steps
+Next steps here....
+-->
+<!-- Anchors. -->
+[Download and install the command-line tools]: #install
+[Download and import publish settings]: #import
+[Create a new mobile service]: #create-service
+[Get the master key]: #get-master-key
+[Create a new table]: #create-table
+[Register a new table script]: #register-script
+[Delete an existing table]: #delete-table
+[Delete an existing mobile service]: #delete-service
+[Test the mobile service]: #test-service
+[Next steps]: #next-steps
+
+<!-- Images. -->
+[1]: ../Media/mobile-portal-data-tables-channel.png
+[2]: ../Media/mobile-insert-script-channel-clear.png
+[3]: ../Media/mobile-services-selection.png
+[4]: ../Media/mobile-schedule-new-job.png
+[5]: ../Media/mobile-create-job-dialog.png
+[6]: ../Media/mobile-schedule-job-script-new.png
+[7]: ../Media/mobile-schedule-job-script.png
+[8]: ../Media/mobile-verify-channel-duplicates.png
+[9]: ../Media/mobile-schedule-job-logs.png
+[10]: ../Media/mobile-schedule-job-enabled.png
+
+<!-- URLs. -->
+[Mobile Services server script reference]: http://go.microsoft.com/fwlink/p?LinkId=262293
+[WindowsAzure.com]: http://www.windowsazure.com/
+[Windows Azure Management Portal]: https://manage.windowsazure.com/
+[nodejs-org]: http://nodejs.org/
+[install-node-linux]: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
+[download-wpi]: http://www.microsoft.com/web/downloads/platform.aspx
+[mac-installer]: http://go.microsoft.com/fwlink/p?LinkId=252249
+[windows-installer]: http://go.microsoft.com/fwlink/p?LinkID=275464
+[reference-docs]: http://go.microsoft.com/fwlink/p?LinkId=252246
+[http://www.windowsazure.com]: http://www.windowsazure.com
View
163 DevCenter/Mobile/Tutorials/mobile-services-schedule-jobs.md
@@ -2,61 +2,33 @@
<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>
-# Schedule backend jobs in Mobile Services
+# Schedule recurring jobs in Mobile Services
-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:
+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:
-+ Archiving old data records.
++ Archiving old or duplicate data records.
+ Requesting and storing external data, such as tweets, RSS entries, and location information.
+ Processing or resizing stored images.
-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:
+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.
-1. [Update Channel table scripts]
-2. [Insert data to create duplicate channels]
-3. [Create a new scheduled job]
-
-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.
-
-<a name="update-scripts"></a><h2><span class="short-header">Update scripts</span>Update Channel table scripts</h2>
+<a name="create-table"></a><h2><span class="short-header">Create new table</span>Create the new Updates table</h2>
1. Log on to the [Windows Azure Management Portal], click **Mobile Services**, and then click your mobile service.
- ![][3]
-
-2. Click the **Data** tab, then click the **Channel** table.
-
- ![][1]
+2. Click the **Data** tab, then click **+Create**.
-3. In **channel**, click the **Script** tab, select **Insert**, click **Clear**, then click **Yes** to confirm.
-
![][2]
- This removes the code that checks for duplicate URI values before inserting them into the Channel table.
-
- <div class="dev-callout"><b>Note</b>
- <p>To restore the original functionality of the push notifications tutorial, replace the copied <strong>insert</strong> function code.</p>
- </div>
-
-Now that you have disabled duplicate checking on the Channel table, you can run the app to insert duplicate records.
-
-<a name="insert-duplicates"></a><h2><span class="short-header">Generate duplicates</span>Insert data to create duplicate channels</h2>
+ This displays the **Create new table** dialog.
-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].
+3. In **Table name** type _Updates_, then click the check button.
-2. Press the **F5** key to rebuild the project and start the app.
-
-3. Stop or close the app and repeat steps 2.
-
- This adds duplicate channel URIs into the Channel table.
-
-5. Back in the Management Portal, click **Browse**
-
- ![][8]
+ ![][3]
- Notice that there are two or more entries in the table with the same **Uri** value.
+ This creates a new storage table **Updates**.
-6. Click the back arrow to return to the mobile service page.
+Now that you have somewhere to store Twitter data, you can create the scheduled job.
<a name="add-job"></a><h2><span class="short-header">Create a new job</span>Create a new scheduled job</h2>
@@ -68,55 +40,91 @@ Now that you have disabled duplicate checking on the Channel table, you can run
<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>
</div>
-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.
+3. In the scheduler dialog, enter <i>getUpdates</i> for the **Job Name**, set the schedule interval and units, then click the check button.
![][5]
- This creates a new job named **cleanup_channels**.
+ This creates a new job named **getUpdates**.
4. Click the new job you just created, then click the **Script** tab.
![][6]
-5. Replace the placeholder function **cleanup_channels** with the following code:
-
- function cleanup_channels() {
- var sql = "SELECT MAX(Id) as Id, Uri FROM Channel " +
- "GROUP BY Uri HAVING COUNT(*) > 1";
- var channelTable = tables.getTable('Channel');
+5. Replace the placeholder function **getUpdates** with the following code:
+
+ var updatesTable = tables.getTable('Updates');
+ var request = require('request');
+
+ function getUpdates() {
+ // Check what is the last tweet we stored when the job last ran
+ // and ask Twitter to only give us more recent tweets
+ appendLastTweetId(
+ 'http://search.twitter.com/search.json?q=%23mobileservices&result_type=recent',
+ function twitterUrlReady(url){
+ request(url, function tweetsLoaded (error, response, body) {
+ if (!error && response.statusCode == 200) {
+ var results = JSON.parse(body).results;
+ if(results){
+ console.log('Fetched new results from Twitter');
+ results.forEach(function visitResult(tweet){
+ if(!filterOutTweet(tweet)){
+ var update = {
+ twitterId: tweet.id,
+ text: tweet.text,
+ author: tweet.from_user,
+ date: tweet.created_at
+ };
+ updatesTable.insert(update);
+ }
+ });
+ }
+ } else {
+ console.error('Could not contact Twitter');
+ }
+ });
+
+ });
+ }
+
+ // Find the largest (most recent) tweet ID we have already stored
+ // (if we have stored any) and ask Twitter to only return more
+ // recent ones
+ function appendLastTweetId(url, callback){
+ updatesTable
+ .orderByDescending('twitterId')
+ .read({success: function readUpdates(updates){
+ if(updates.length){
+ callback(url + '&since_id=' + updates[0].twitterId + 1);
+ } else {
+ callback(url);
+ }
+ }});
+ }
- mssql.query(sql, {
- success: function(results) {
- if (results.length > 0) {
- for (var i = 0; i < results.length; i++) {
- channelTable.del(results[i].Id);
- console.log('Deleted duplicate channel:' +
- results[i].Uri);
- }
- } else {
- console.log('No duplicate rows found.');
- }
- }
- });
- }
-
-6. Click **Save**, then **Run Once** to test the script.
+ function filterOutTweet(tweet){
+ // Remove retweets and replies
+ return !((tweet.text.indexOf('RT') !== 0) && (tweet.to_user_id === 0));
+ }
+
+ 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.
+
+6. Click **Run Once** to test the script.
![][7]
- This executes the job while it remains disabled in the scheduler.
+ This saves and executes the job while it remains disabled in the scheduler.
-7. Click the back button, click **Logs**, locate the **Deleted duplicate...** item, click **Details**, and verify that a duplicate row was deleted.
+7. Click the back button, click **Data**, click the **Updates** table, click **Browse**, and verify that Twitter data has been inserted into the table.
- ![][9]
+ ![][8]
-8. Click **Scheduler**, select **cleanup_channels**, then click **Enable**.
+8. Click the back button, click **Scheduler**, select **getUpdates**, then click **Enable**.
- ![][10]
+ ![][9]
This enables the job to run on the specified schedule, in this case every hour.
-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.
+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.
## <a name="nextsteps"> </a>Next Steps
@@ -124,27 +132,22 @@ Congratulations, you have successfully created a new job schedule in your mobile
<br/>Learn more about registering and using server scripts.
<!-- Anchors. -->
-[Update Channel table scripts]: #update-scripts
-[Insert data to create duplicate channels]: #insert-duplicates
+[Create the new Tweets table]: #create-table
[Create a new scheduled job]: #add-job
[Next steps]: #next-steps
<!-- Images. -->
-[1]: ../Media/mobile-portal-data-tables-channel.png
-[2]: ../Media/mobile-insert-script-channel-clear.png
-[3]: ../Media/mobile-services-selection.png
+[1]: ../Media/mobile-services-selection.png
+[2]: ../Media/mobile-data-tab-empty.png
+[3]: ../Media/mobile-create-updates-table.png
[4]: ../Media/mobile-schedule-new-job.png
[5]: ../Media/mobile-create-job-dialog.png
[6]: ../Media/mobile-schedule-job-script-new.png
[7]: ../Media/mobile-schedule-job-script.png
-[8]: ../Media/mobile-verify-channel-duplicates.png
-[9]: ../Media/mobile-schedule-job-logs.png
-[10]: ../Media/mobile-schedule-job-enabled.png
+[8]: ../Media/mobile-browse-updates-table.png
+[9]: ../Media/mobile-schedule-job-enabled.png
<!-- URLs. -->
-[Push notifications to app users for Windows Store apps]: ../tutorials/mobile-services-push-notifications-to-app-users-dotnet.md
-[Push notifications to app users for Windows Phone 8 apps]: ../tutorials/mobile-services-push-notifications-to-app-users-wp8.md
-[Push notifications to app users]: ../tutorials/mobile-services-push-notifications-to-app-users-ios.md
[Mobile Services server script reference]: http://go.microsoft.com/fwlink/?LinkId=262293
[WindowsAzure.com]: http://www.windowsazure.com/
[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
34 Shared/Chunks/win-az-command-line-tools.md
@@ -1,6 +1,6 @@
#Windows Azure command-line tool for Mac and Linux#
-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.
+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.
To install the tool on a Mac, download and run the [Windows Azure SDK installer](http://go.microsoft.com/fwlink/?LinkId=252249).
@@ -22,9 +22,11 @@ In addition to command-specific optional parameters documented here, there are t
* [Commands to manage your Windows Azure cloud services](#Commands_to_manage_your_Azure_cloud_services)
* [Commands to manage your Windows Azure certificates](#Commands_to_manage_your_Azure_certificates)
* [Commands to manage your websites](#Commands_to_manage_your_web_sites)
+* [Commands to manage Windows Azure Mobile Services](#Commands_to_manage_mobile_services)
* [Manage tool local settings](#Manage_tool_local_settings)
##<a id="Manage_your_account_information_and_publish_settings"></a>Manage your account information and publish settings
+
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.
**account download [options]**
@@ -77,6 +79,7 @@ Affinity groups can be set when a group of virtual machines spans multiple physi
info: account affinity-group list command OK
##<a id="Commands_to_manage_your_Azure_virtual_machines"></a>Commands to manage your Windows Azure virtual machines
+
The following diagram shows how Windows Azure virtual machines are hosted in the production deployment environment of a Windows Azure cloud service.
![Azure Technical Diagram](../media/architecturediagram.jpg)
@@ -224,6 +227,7 @@ A virtual machine image cannot be captured while the virtual machine state unles
info: vm capture command OK
##<a id="Commands_to_manage_your_Azure_virtual_machine_endpoints"></a>Commands to manage your Windows Azure virtual machine endpoints
+
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.
![Windows Azure Network Diagram](../media/networkdiagram.jpg)
@@ -265,6 +269,7 @@ This command lists all virtual machine endpoints. The -json option specifies tha
<span id="Commands_to_manage_your_Azure_virtual_machine_images"></span>
##Commands to manage your Windows Azure virtual machine images
+
Virtual machine images are captures of already configured virtual machines that can be replicated as required.
**vm image list [options]**
@@ -426,6 +431,7 @@ This command detaches a data disk attached to a Windows Azure virtual machine. &
<span id="Commands_to_manage_your_Azure_cloud_services"></span>
##Commands to manage your Windows Azure cloud services
+
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.
**service list [options]**
@@ -450,6 +456,7 @@ This command deletes a Windows Azure cloud service.
<span id="Commands_to_manage_your_Azure_certificates"></span>
##Commands to manage your Windows Azure certificates
+
Windows Azure certificates are cerificates (that is, SSL certificates) connected to your Windows Azure account.
**service cert list [options]**
@@ -487,6 +494,7 @@ This command deletes a certificate.
<span id="Commands_to_manage_your_web_sites"></span>
##Commands to manage your websites
+
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.
**site list [options]**
@@ -593,8 +601,32 @@ This command stops a website.
info: Site mysite has been stopped
info: site stop command OK
+<span id="Commands_to_manage_mobile_services"></span>
+##Commands to manage Windows Azure Mobile Services
+
+Windows Azure Mobile Services
+
+###Commands to manage mobile services
+
+###Commands to manage configuration
+
+###Commands to manage logs
+
+###Commands to manage keys
+
+###Commands to manage tables
+
+<table border="1" width="100%"><tr><th>Script value</th><th>Management Portal value</th></tr>
+<tr><td><code>public</code></td><td>Everyone</td></tr>
+<tr><td><code>application</code> (default)</td><td>Anybody with the application key</td></tr>
+<tr><td><code>user</code></td><td>Only authenticated users</td></tr>
+<tr><td><code>admin </code></td><td>Only scripts and admins</td></tr></table>
+
+###Commands to manage table scripts
+
<span id="Manage_tool_local_settings"></span>
##Manage tool local settings
+
Local settings are your subscription ID and Default Storage Account Name.
**config list [options]**

0 comments on commit fb989b7

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