Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Tools for developing applications for Windows Azure

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Windows Azure PowerShell for Node.js

This repo contains a set of PowerShell commandlets that let you deploy Node.js application to Windows Azure from the command line. For documentation on how to host Node.js applications on Windows Azure, please see the Windows Azure Node.js Developer Center.

Features

Configure machines for publishing to the cloud.

  • Get-AzurePublishSettings - Downloads a Windows Azure publish profile to your local computer
  • Import-AzurePublishSettings - Imports the Publish Profile to enable publishing to Azure and managing hosted services

Create services and roles that are preconfigured to use Node.js.

  • New-AzureService - Creates scaffolding for a new service
  • Add-AzureNodeWebRole - Creates scaffolding for a Node.js application which will be hosted in the cloud via IIS
  • Add-AzureNodeWorkerRole - Creates scaffolding for a Node.js application which will be hosted in the cloud via node.exe

Debug your applications in the local compute and storage emulators

  • Start-AzureEmulator - Starts both the compute and storage emulators and executes the service
  • Stop-AzureEmulator - Stops the compute emulator

Publish your service to the cloud and configure publish settings

  • Publish-AzureService - Publish the current service to the cloud
  • Set-AzureDeploymentStorage - Sets the storage account to be used when publishing the service to the cloud
  • Set-AzureDeploymentSubscription - Sets the subscription name to be used when publishing the service to the cloud
  • Set-AzureDeploymentLocation - Sets the deployment location for the current service
  • Set-AzureDeploymentSlot - Sets the deployment slot for the current service
  • Set-AzureInstances - Set the number of instances for the specified role

Manage your hosted services

  • Start-AzureService - Starts the current hosted service
  • Stop-AzureService - Stops the current hosted service
  • Remove-AzureService - Removes the current hosted service
  • Get-AzureStorageAccounts - Retrieves and displays storage account details for the specified Azure subscription. If no subscription is specified, uses the first subscription in your Azure publish profile

Getting Started

Download Source Code

To get the source code of the SDK via git just type:

git clone https://github.com/WindowsAzure/azure-sdk-tools.git
cd ./azure-sdk-tools

Install Prerequisites

Configure PowerShell to automatically load commandlets

  1. Create a folder inside your user's Documents folder and name it WindowsPowerShell
  2. Inside that folder create a file called Microsoft.PowerShell_profile.ps1
  3. Edit the file in a text editor and add the following contents
    Import-Module
    PATH_TO_AZURE-SDK-TOOLS_CLONE\AzureDeploymentCmdlets\src\AzureDeploymentCmdlets\bin\Debug\AzureDeploymentCmdlets.dll
  4. After you build the commandlets project, you can then open a PowerShell window and you should be able to use the commandlets. Please note that if you want to rebuild the project, you have close the PowerShell window, and then reopen it.

Usage

  1. First, create an Azure hosted service called HelloWorld by typing
    New-AzureService HelloWorld
  2. Inside the HelloWorld folder, add a new Web Role by typing
    Add-AzureNodeWebRole
  3. Test out the application in the local emulator by typing
    Start-AzureEmulator -Launch
  4. You are now ready to publish to the cloud service. Go ahead and register for a Windows Azure account and make sure you have your credentials handy.
  5. Get your account's publish settings and save them to a file
    Get-AzurePublishSettings
  6. Now import the settings
    Import-AzurePublishSettings PATH_TO_PUBLISH_SETTINGS_FILE
  7. You are now ready to publish to the cloud. Make sure you specify a unique name for your application to ensure there aren't any conflicts during the publish process
    Publish-AzureService -Name UNIQUE_NAME -Launch

Need Help?

Be sure to check out the Windows Azure Developer Forums on Stack Overflow if you have trouble with the provided code.

Feedback

For feedback related specificically to this SDK, please use the Issues section of the repository.

For general suggestions about Windows Azure please use our UserVoice forum.

Learn More

Something went wrong with that request. Please try again.