-
Notifications
You must be signed in to change notification settings - Fork 11
Walkthrough
This walkthrough demonstrates key features of the git-azure platform for running multiple node.js applications in Windows Azure Worker Role. It takes about 30 mins to present this content.
- MacOS - git-azure was developed primarily for use by MacOS developers; it may work on *nix, but I have not tested it there yet; I know it does not work on Windows, and fixing it is of relatively low prioroty
- GitHub account
- node.js and Git client installed; I've tested it with 0.7.8 of node.js; support for multiple versions SxS is planned
- openssl installed
- Windows Azure account created (https://windows.azure.com)
- Create a new GitHub repo with a README, so that it can immediately be cloned.
- Clone the repo into, say,
atest
directory. - Install git-azure with
sudo npm install git-azure -g
- Invoke
git azure
and explain the key concepts - Invoke
git azure init
and explain the key pieces of information that must be provided to initialize the system (publishSettings, serviceName, username, password) - Download the *.publishSettings from https://windows.azure.com/download/publishprofile.aspx
- Go to the
atest
directory and stay there for the rest of initialization - Provide configuration parameters required for initialization
git config azure.publishSettings <path_to_your_publishSettings_file>
git config azure.username <username>
git config azure.password <password>
(The username and password are at present used to set up RDP access; going forward they will be used for Basic Auth to a mini management portal as well as SSH access to the box; Please note RDP access to Azure VMs from MacOS does not work today due to a known issue with Azure certificates). 9. Start the initialization process:
git azure init --serviceName <your_service_name>
<your_service_name> must be unique in Windows Azure as it will become part of a hostname (your endpoints will be accessible at <your_service_name>.cloudapp.net). The one time initialization process takes between 8-12 minutes. In this time the following things happen:
- git-azure runtime is registerded as a submodule int the
atest\.git-azure
subdirectory, commited and pushed to the repo - A Windows Azure storage account is created is none exists
- The package is uploaded to the Windows Azure Blob Storage under that account
- A hosted service is created (one small instance - will be configurable going forward)
- RDP access is configured
- node.js and git are installed on the box
- The
atest
repo is cloned on the machine - an HTTP reverse proxy (part of the git-azure runtime) is started on the machine If the initialization process fails, it can be restarted with
git azure init --serviceName <your_service_name> --force
In general the script is re-entrant; the --force option will override any prior artifacts deployed with git azure init
.
After successful initialization, information similar to this one is displayed:
OK: your Windows Azure service git-azure-3 is ready
Configure a post-receive hook in your repository to enable automatic updates on 'git push'. Your post-receive hook URL is:
http://git-azure-3.cloudapp.net:31417/ec0291ff-3e5d-4f36-a3dd-c7b929dc6d8a
The service can be accessed at the following endpoints:
http://git-azure-3.cloudapp.net - HTTP application endpoint
https://git-azure-3.cloudapp.net - HTTPS application endpoint (if SSL is configured)
ws://git-azure-3.cloudapp.net - WebSocket application traffic
wss://git-azure-3.cloudapp.net - secure WebSocket application traffic (if SSL is configured)
You can configure additional A entires in your DNS directed at IP address 65.52.238.34 (useful for /etc/hosts).
You can configure additional CNAME entires in your DNS directed at git-azure-3.cloudapp.net (recommended for production).
Management endpoints:
https://git-azure-3.cloudapp.net:31415 - management endpoint (if SSL is configured)
http://git-azure-3.cloudapp.net:31415 - management endpoint (if SSL is not configured)
https://windows.azure.com - Windows Azure management portal (billing, accounts etc.)
Visit https://github.com/tjanczuk/git-azure for walkthroughs on setting up SSL, support for multiple apps, and more.
Finished at Fri May 11 2012 09:38:15 GMT-0700 (PDT)
Duration 10 min 8 sec.