<commit_before># azure-scalable-iaas
ARM templates and Chef cookbooks for deployment of a simple, scalable IaaS based web application.

## Requirements
Tested with:

1. Microsoft Azure for hosting platform
2. Hosted Chef for configuration management
3. Ubuntu 14.04.4-LTS for OS
4. nginx 1.4.6 for web tier service
5. Apache Tomcat 8.5.3 for app tier service
6. Windows 10 for deployment workstation with
* Azure PowerShell Module 1.4.0
* Chef DK 0.14.25

Prerequesites

* [Azure PowerShell Module](http://aka.ms/webpi-azps) 
* [Chef DK](https://downloads.chef.io/chef-dk/) 
* [Azure Subscription](https://azure.microsoft.com/en-gb/free/)
* [Hosted Chef](https://manage.chef.io/signup)


## First Deployment

1. Create new Chef Organisation
2. Download and extract Chef Starter Kit
3. Create local copy of this repo
4. Update Azure deployment template parameters in ./azure-scalable-iaas/arm-template/Templates/azuredeploy.*.parameters.json files
* `chefValidationKey` must be JSON escaped string from validator pem
* `vmssNameAffix` must be no longer than 6 alphanumeric characters
5. Update web-cookbook attributes under ./azure-scalable-iaas/cookbooks/web-cookbook/attributes/default.rb
* `zip-source` must be URI to zip containing web app static content
* `static-dir-name` must match URI root path for web app
6. Update app-cookbook attributes under ./azure-scalable-iaas/cookbooks/app-cookbook/attributes/default.rb
* `war-source` must be URI to war containing web app dynamic content
* `prevayler-dir` must be added if Prevayler is used and hardcoded to write to specific path
7. Upload web-cookbook and app-cookbook to Hosted Chef instance with `berks install` and `berks upload`
8. Modify `cd` path root in ./azure-scalable-iaas/powershell-scripts/Main-Deploy.ps1
9. Validate resource group naming and run `Main-Deploy.ps1`

## Scaling

The number of instances in each tier can be modified by changing the `webInstanceCount` and `appInstanceCount` values in the Azure template parameter files and redeploying the template with `Main-Deploy.ps1`

## Licence and Authors
The MIT License (MIT) 
Copyright (c) 2016 farthir<commit_msg>markdown tweaks<commit_after># azure-scalable-iaas
ARM templates and Chef cookbooks for deployment of a simple, scalable IaaS based web application.

## Requirements
Tested with:

1. Microsoft Azure for hosting platform
2. Hosted Chef for configuration management
3. Ubuntu 14.04.4-LTS for OS
4. nginx 1.4.6 for web tier service
5. Apache Tomcat 8.5.3 for app tier service
6. Windows 10 for deployment workstation with
    * Azure PowerShell Module 1.4.0
    * Chef DK 0.14.25

Prerequesites

* [Azure PowerShell Module](http://aka.ms/webpi-azps) 
* [Chef DK](https://downloads.chef.io/chef-dk/) 
* [Azure Subscription](https://azure.microsoft.com/en-gb/free/)
* [Hosted Chef](https://manage.chef.io/signup)


## First Deployment

1. Create new Chef Organisation
2. Download and extract Chef Starter Kit
3. Create local copy of this repo
4. Update Azure deployment template parameters in ./azure-scalable-iaas/arm-template/Templates/azuredeploy.*.parameters.json files
    * `chefValidationKey` must be JSON escaped string from validator pem
    * `vmssNameAffix` must be no longer than 6 alphanumeric characters
5. Update web-cookbook attributes under ./azure-scalable-iaas/cookbooks/web-cookbook/attributes/default.rb
    * `zip-source` must be URI to zip containing web app static content
    * `static-dir-name` must match URI root path for web app
6. Update app-cookbook attributes under ./azure-scalable-iaas/cookbooks/app-cookbook/attributes/default.rb
    * `war-source` must be URI to war containing web app dynamic content
    * `prevayler-dir` must be added if Prevayler is used and hardcoded to write to specific path
7. Upload web-cookbook and app-cookbook to Hosted Chef instance with `berks install` and `berks upload`
8. Modify `cd` path root in ./azure-scalable-iaas/powershell-scripts/Main-Deploy.ps1
9. Validate resource group naming and run `Main-Deploy.ps1`

## Scaling

The number of instances in each tier can be modified by changing the `webInstanceCount` and `appInstanceCount` values in the Azure template parameter files and redeploying the template with `Main-Deploy.ps1`

## Licence and Authors
The MIT License (MIT) 
Copyright (c) 2016 farthir
{'fraction_non_alphanumeric': 0.08534322820037106, 'fraction_numerical': 0.02040816326530612, 'mean_word_length': 4.324691358024691, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '271634', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1290, 'n_words': 506}