Installing for Azure

If you're installing on a running Azure role, you can remote in to the server to install just as in the previous guide for a normal installation.

If you want to make Stackify part of your deployment configuration so that it's installed automatically, you can do the following in your startup script.

Downloading the Azure Installation Zip File

Downloading the Azure Installation Zip File

To start, download the Zip file that you will find when you log in and navigate to the Settings tab of the Stackify web portal.

Prepare the Project

Unzip the zip file from the previous step. Include the Install.cmd and Install.ps1 files in the solution of the website or worker process that is being deployed. This should be at the root of the project. Be sure to set build action in Visual Studio to Copy Always on these two files.

Note for Node.js deployments: If you are running Node.js in an Azure role, you will need the Install.cmd and Install.ps1 files to be in the bin directory of your web role, not in the root.

Setup ServiceDefinition.csdef

Include this startup task in the ServiceDefinition.csdef of the Azure project in the solution:

      <Task commandLine="Install.cmd" executionContext="elevated" taskType="background">
          <Variable name="ACTIVATIONKEY" value="[your Stackify Activation Key]" />
          <Variable name="ENVIRONMENT" value="'[Environment name]'" />

Of course, replace [your Stackify Activation Key] with your real activation key (which you will find on first login, or under your Settings -> Client Info page), and [Environment name] with an environment name that reflects the environment that your application and roles will be running within. Environment name can be anything you choose, and the only real key here is to be sure you're consistent with your use of Environment (i.e. don't deploy Staging resources with Environment set to Production).

NOTE: Also, notice that for [Environment Name] there is a single quote nested inside of the regular quote (" '...' "). Please make sure you use this style of inner single quote for any environment names that include a space to ensure the whole value is utilized.


Advanced Azure Installation

For more on advanced Azure installation techniques, have a look at this article on selective installation.