This is a simple scaffold for packaging a Ruby app to run on Windows Azure, inspired by Steve Marx's https://github.com/smarx/pythonrole.
This sample requires a Windows operating system and at least version 1.6 of the
Windows Azure SDK (available at http://www.windowsazure.com/en-us/develop/overview/).
This sample was devoloped using the Other language version of the SDK, but should work with all language versions.
- Edit
app.rbto do whatever you want. If this is a web app, be sure to listen on the port specified in thePORTenvironment variable (and for best results when running locally, listen on the IP address specified in theADDRESSenvironment variable. - Run
run.cmdto build and run the application locally. When running locally, ruby.exe must be in the path. (It is not automatically installed as it is in the cloud.) - Run
pack.cmdto outputRubyRole.cspkg. That file, along withServiceConfiguration.Cloud.cscfgis what you need to deploy via the Windows Azure portal (or with some other tool) to get the app running in the cloud.
- This sample uses the Ruby 1.9.3 package provuded at http://rubyinstaller.org. This is installed using the
installRuby.cmdfile. - DevKit is also installed and configured using the
installDK.cmdfile. installDependencies.cmdinstalls the bundler gem and then uses it to install the gems listed in the Gemfile.- The
run.cmdin the WorkerRole/app directory launchesapp.rbby runningruby app.rb. If you need to launch a Rails application, or by usingrackup, you may need to use the following format:call rails ....orcall rackup ..... The CALL command must be used for anything that is implemented as a .cmd or .bat file under windows.