addServer($serversArray[$i], 11211);
12 | }
13 |
14 | $result = $mem->get("key1");
15 |
16 | $date = date("Y-m-d G:i");
17 | print("Today's date ".$date."
");
18 |
19 | if ($result) {
20 | echo $result;
21 | } else {
22 | echo "No matching key found. It will be added now.";
23 | $mem->set("key1","This is the data in the key added on ".$date) or die("Could not save");
24 | }
25 |
26 | print("memcached stats
");
27 | print_r($mem->getStats());
28 | print("
");
29 |
30 | ?>
--------------------------------------------------------------------------------
/memcached-multi-vm-ubuntu/install_apache.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get passed in parameters
4 | numberOfMemcachedInstances=$1
5 | subnetMemcachedPrefix=$2
6 |
7 | # Create simple python script to iterate over the IPs skipping first 3
8 | echo "c=$numberOfMemcachedInstances" > p.py
9 | echo "ip='$subnetMemcachedPrefix'" >> p.py
10 | echo "octets=ip.split('/')[0].split('.')" >> p.py
11 | echo "octets[3]=str(int(octets[3])+3)" >> p.py
12 | echo "s=[]" >> p.py
13 | echo "for i in range(0,c):" >> p.py
14 | echo " octets[3]=str(int(octets[3])+1)" >> p.py
15 | echo " s.append('.'.join(octets))" >> p.py
16 | echo "print(','.join(s))" >> p.py
17 |
18 | # Get comma delimited list of servers
19 | servers=$(python ./p.py)
20 |
21 | # Get today's date into YYYYMMDD format
22 | now=$(date +"%Y%m%d")
23 |
24 | echo "Installing apache $now, numberOfMemcachedInstances=$numberOfMemcachedInstances, subnetMemcachedPrefix=$subnetMemcachedPrefix, servers=$servers" >> /var/log/apache_install.log
25 |
26 | # Re-synchronize the package index files from their sources. An update should always be performed before an upgrade.
27 | apt-get -y update
28 |
29 | # Install apache, php5, and php5-memcached extension
30 | apt-get -y install apache2 php5 php5-memcached
31 |
32 | # Delete Apache index page
33 | rm /var/www/html/index.html
34 |
35 | # Download cache_test.php page
36 | wget -O /var/www/html/index.php https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/memcached-multi-vm-ubuntu/cache_test.php
37 |
38 | # Replace the placeholder with the string of comma delimited memcached server IPs that was passed to this script as a parameter
39 | sed -i "s/{COMMA_DELIMITED_SERVERS_LIST}/$servers/g" /var/www/html/index.php
40 |
41 | # restart Apache
42 | apachectl restart
--------------------------------------------------------------------------------
/memcached-multi-vm-ubuntu/install_memcached.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get passed in parameters
4 | memcachedIndex=$1
5 | privateIP=$2
6 | apacheIP=$3
7 |
8 | # Get today's date into YYYYMMDD format
9 | now=$(date +"%Y%m%d")
10 |
11 | # Re-synchronize the package index files from their sources. An update should always be performed before an upgrade.
12 | apt-get -y update
13 |
14 | # Memcached is a C program and depends on a recent version of GCC and a recent version of libevent.
15 | apt-get -y install memcached
16 |
17 | echo "Memcached installed on $now index $memcachedIndex, private ip $privateIP, and apache ip $apacheIP" >> /var/log/memcached_install.log
18 |
19 | # By default memcached listens on TCP and UDP ports 11211. You must not expose memcached directly to the internet.
20 |
21 | # Change memcached.conf to listen on all IPs not just 127.0.0.1 and use 512MB of RAM instead of default 64MB
22 | sed -i "s/-l 127.0.0.1/#-l 127.0.0.1/g" /etc/memcached.conf
23 | sed -i "s/^-m 64$/-m 512/g" /etc/memcached.conf
24 |
25 | # Restart memcached service with the new configuration
26 | service memcached restart
27 |
28 | # Inspect running configuration by issuing a "stats settings" command to the proper ports
29 | echo "stats settings" | nc localhost 11211 > /var/log/memcached_stats_$now.log
--------------------------------------------------------------------------------
/memcached-multi-vm-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Memcached service cluster using multiple Ubuntu VMs",
3 | "description": "This template creates one or more memcached services on Ubuntu 14.04 VMs in a private subnet. It also creates one publicly accessible Apache VM with a PHP test page to confirm that memcached is installed and accessible.",
4 | "summary": "Multiple memcached servers in a private subnet and a publicly accessible Apache test page.",
5 | "githubUsername": "arsenvlad",
6 | "dateUpdated": "2015-04-25"
7 | }
8 |
--------------------------------------------------------------------------------
/mongodb-high-availability/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "adminUsername": {
3 | "value": "MongoAdmin"
4 | },
5 | "adminPassword": {
6 | "value": ""
7 | },
8 | "storageAccountName": {
9 | "value": ""
10 | },
11 | "region": {
12 | "value": "West US"
13 | },
14 | "virtualNetworkName": {
15 | "value": "mongodbVnet"
16 | },
17 | "subnetName": {
18 | "value": "mongodbSubnet"
19 | },
20 | "addressPrefix": {
21 | "value": "10.0.0.0/16"
22 | },
23 | "subnetPrefix": {
24 | "value": "10.0.0.0/24"
25 | },
26 | "nodeAddressPrefix": {
27 | "value": "10.0.0.1"
28 | },
29 | "jumpbox": {
30 | "value": "Disabled"
31 | },
32 | "tshirtSize": {
33 | "value": "XSmall"
34 | },
35 | "osFamily": {
36 | "value": "Ubuntu"
37 | },
38 | "mongodbVersion": {
39 | "value": "3.0.2"
40 | },
41 | "replicaSetName": {
42 | "value": "rs0"
43 | },
44 | "replicaSetKey": {
45 | "value": ""
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/mongodb-high-availability/empty-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "commonSettings": {
6 | "type": "object",
7 | "metadata": {
8 | "Description": "Common settings object"
9 | }
10 | },
11 | "storageSettings": {
12 | "type": "object",
13 | "metadata": {
14 | "Description": "Storage settings object"
15 | }
16 | },
17 | "networkSettings": {
18 | "type": "object",
19 | "metadata": {
20 | "Description": "Network settings object"
21 | }
22 | },
23 | "machineSettings": {
24 | "type": "object",
25 | "metadata": {
26 | "Description": "Machine settings object"
27 | }
28 | }
29 | },
30 | "variables": {
31 | },
32 | "resources": [
33 | ],
34 | "outputs": {
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/mongodb-high-availability/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "MongoDB on Ubuntu VMs",
3 | "description": "This template creates a multi-server MongoDB deployment on Ubuntu virtual machines, and configures the MongoDB installation for high availability",
4 | "summary": "This template creates a multi-server MongoDB deployment on Ubuntu virtual machines",
5 | "githubUsername": "TheAzureGuy",
6 | "dateUpdated": "2015-04-18"
7 | }
--------------------------------------------------------------------------------
/mongodb-on-centos/README.md:
--------------------------------------------------------------------------------
1 | # Install Mongo DB on a CentOS Virtual Machine using Custom Script Linux Extension
2 |
3 |
4 |
5 |
6 |
7 | This template deploys Mongo DB on a CentOS Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.
8 |
9 | Note: Cent OS disables Username/Password on Azure SKUs by default. This template will be updated with SSH Keys for the VMs soon.
10 |
11 | Below are the parameters that the template expects
12 |
13 | | Name | Description |
14 | |:--- |:---|
15 | | newStorageAccountName | Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed. |
16 | | adminUsername | Username for the Virtual Machines |
17 | | adminPassword | Password for the Virtual Machine |
18 | | dnsNameForPublicIP | Unique DNS Name for the Public IP used to access the Virtual Machine. |
19 | | subscriptionId | Subscription ID where the template will be deployed |
20 | | vmSourceImageName | Source Image Name for the VM. Example: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_5-LTS-amd64-server-20140927-en-us-30GB |
21 | | location | location where the resources will be deployed |
22 | | virtualNetworkName | Name of Virtual Network |
23 | | vmSize | Size of the Virtual Machine |
24 | | vmName | Name of Virtual Machine |
25 | | publicIPAddressName | Name of Public IP Address Name |
26 | | nicName | Name of Network Interface |
27 |
--------------------------------------------------------------------------------
/mongodb-on-centos/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "newStorageAccountName" : {
3 | "value":"uniqueStorageAccountName"
4 | },
5 | "adminUsername": {
6 | "value": ""
7 | },
8 | "adminPassword": {
9 | "value": ""
10 | },
11 | "dnsNameForPublicIP": {
12 | "value": "uniqueDnsNameForPublicIP"
13 | },
14 | "location": {
15 | "value": "West US"
16 | },
17 | "virtualNetworkName": {
18 | "value": "myVNET"
19 | },
20 | "vmSize": {
21 | "value": "Standard_A0"
22 | },
23 | "vmName" : {
24 | "value" : "myVM"
25 | },
26 | "publicIPAddressName" : {
27 | "value" : "myPublicIP"
28 | },
29 | "nicName" : {
30 | "value" : "myNic"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/mongodb-on-centos/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Install Mongo DB on a CentOS VM using Custom Script Linux Extension",
3 | "description": "This template deploys Mongo DB on a CentOS Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.",
4 | "summary": "Install Mongo DB on a CentOS VM using Custom Script Linux Extension",
5 | "githubUsername": "mahthi",
6 | "dateUpdated": "2015-03-22"
7 | }
8 |
--------------------------------------------------------------------------------
/mongodb-on-centos/mongo-install-centos.sh:
--------------------------------------------------------------------------------
1 | #Modify Sudoers file to not require tty for shell script execution on CentOS
2 | # sudo sed -i '/Defaults[[:space:]]\+requiretty/s/^/#/' /etc/sudoers
3 |
4 | # Enable write access to the mongodb.repo and configure it for installation
5 |
6 | #sudo chmod 777 /etc/yum.repos.d/mongodb.repo
7 | touch /etc/yum.repos.d/mongodb.repo
8 | echo "[mongodb]" >> /etc/yum.repos.d/mongodb.repo
9 | echo "name=MongoDB Repository" >> /etc/yum.repos.d/mongodb.repo
10 | echo "baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64" >> /etc/yum.repos.d/mongodb.repo
11 | echo "gpgcheck=0" >> /etc/yum.repos.d/mongodb.repo
12 | echo "enabled=1" >> /etc/yum.repos.d/mongodb.repo
13 |
14 | # Install updates
15 | yum -y update
16 |
17 | #Install Mongo DB
18 | yum install -y mongo-10gen mongo-10gen-server
19 |
--------------------------------------------------------------------------------
/mongodb-on-ubuntu/README.md:
--------------------------------------------------------------------------------
1 | # Install Mongo DB on a Ubuntu Virtual Machine using Custom Script Linux Extension
2 |
3 |
4 |
5 |
6 |
7 | This template deploys Mongo DB on a Ubuntu Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.
8 |
9 | Below are the parameters that the template expects
10 |
11 | | Name | Description |
12 | |:--- |:---|
13 | | newStorageAccountName | Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed. |
14 | | adminUsername | Username for the Virtual Machines |
15 | | adminPassword | Password for the Virtual Machine |
16 | | dnsNameForPublicIP | Unique DNS Name for the Public IP used to access the Virtual Machine. |
17 | | subscriptionId | Subscription ID where the template will be deployed |
18 | | vmSourceImageName | Source Image Name for the VM. Example: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_5-LTS-amd64-server-20140927-en-us-30GB |
19 | | location | location where the resources will be deployed |
20 | | virtualNetworkName | Name of Virtual Network |
21 | | vmSize | Size of the Virtual Machine |
22 | | vmName | Name of Virtual Machine |
23 | | publicIPAddressName | Name of Public IP Address Name |
24 | | nicName | Name of Network Interface |
25 |
--------------------------------------------------------------------------------
/mongodb-on-ubuntu/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "newStorageAccountName" : {
3 | "value":"uniqueStorageAccountName"
4 | },
5 | "adminUsername": {
6 | "value": ""
7 | },
8 | "adminPassword": {
9 | "value": ""
10 | },
11 | "dnsNameForPublicIP": {
12 | "value": "uniqueDnsNameForPublicIP"
13 | },
14 | "location": {
15 | "value": "West US"
16 | },
17 | "virtualNetworkName": {
18 | "value": "myVNET"
19 | },
20 | "vmSize": {
21 | "value": "Standard_A0"
22 | },
23 | "vmName" : {
24 | "value" : "myVM"
25 | },
26 | "publicIPAddressName" : {
27 | "value" : "myPublicIP"
28 | },
29 | "nicName" : {
30 | "value" : "myNic"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/mongodb-on-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Install Mongo DB on an Ubuntu VM using Custom Script Linux Extension",
3 | "description": "This template deploys Mongo DB on an Ubuntu Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.",
4 | "summary": "Install Mongo DB on an Ubuntu VM using Custom Script Linux Extension",
5 | "githubUsername": "mahthi",
6 | "dateUpdated": "2015-03-22"
7 | }
8 |
--------------------------------------------------------------------------------
/mongodb-on-ubuntu/mongo-install-ubuntu.sh:
--------------------------------------------------------------------------------
1 | # Configure mongodb.list file with the correct location
2 | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
3 | echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
4 |
5 | # Install updates
6 | sudo apt-get -y update
7 |
8 | #Install Mongo DB
9 | sudo apt-get install -y mongodb-10gen
10 |
--------------------------------------------------------------------------------
/nagios-on-ubuntu/README.md:
--------------------------------------------------------------------------------
1 | # Install Nagios Core on Ubuntu Virtual Machines using Custom Script Linux Extension
2 |
3 |
4 |
5 |
6 |
7 | This template deploys Nagios Core, a host/service/network monitoring solution released under the GNU General Public License. This template also provisions a storage account, virtual network, public IP addresses and network interfaces required by the installation.
8 |
9 | Visit the Nagios homepage at http://www.nagios.org for documentation, new releases, bug reports, information on discussion forums, and more.
10 |
11 | The template requires the following parameters:
12 |
13 | | Name | Description |
14 | |:--- |:---|
15 | | storageAccountName | Unique namespace for a new storage account where the virtual machine's disks will be placed (cannot be an existing storage account) |
16 | | adminUsername | Admin user name for the virtual machine |
17 | | adminPassword | Admin password for the virtual machine |
18 | | region | Region name where the corresponding Azure artifacts will be created |
19 | | virtualNetworkName | Name of virtual network |
20 | | subnetName | Name of the virtual network subnet |
21 | | addressPrefix | The IP address mask used by the virtual network |
22 | | subnetPrefix | The subnet mask used by the virtual network subnet |
23 | | domainName | Domain name of the publicly accessible Apache web server hosting Nagios |
24 | | tshirtSize | T-shirt size of the Nagios deployment |
25 |
26 | Topology
27 | --------
28 | The Nagios deployment topology is comprised of a single VM instance that can be customized and scaled up using the _tshirtSize_ parameter. The following table outlines the VM characteristics for each supported t-shirt size:
29 |
30 | | T-Shirt Size | VM Size | CPU Cores | Memory |
31 | |:--- |:---|:---|:---|
32 | | Small | Standard_A1 | 1 | 1.75 GB |
33 | | Medium | Standard_D1 | 1 | 3.5 GB |
34 | | Large | Standard_D2 | 2 | 7 GB |
35 | | XLarge | Standard_D3 | 4 | 14 GB |
36 | | XXLarge | Standard_D3 | 8 | 28 GB |
37 |
38 | ##Known Issues and Limitations
39 | - A single instance installation Nagios Core is performed by the template
40 | - This template does not install any monitoring targets
--------------------------------------------------------------------------------
/nagios-on-ubuntu/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "storageAccountName": {
3 | "value": "armdeploy4"
4 | },
5 | "adminUsername": {
6 | "value": "NagiosAdmin"
7 | },
8 | "adminPassword": {
9 | "value": ""
10 | },
11 | "region": {
12 | "value": "West US"
13 | },
14 | "virtualNetworkName": {
15 | "value": "nagiosClustVnet"
16 | },
17 | "subnetName": {
18 | "value": "Subnet1"
19 | },
20 | "addressPrefix": {
21 | "value": "10.0.0.0/16"
22 | },
23 | "subnetPrefix": {
24 | "value": "10.0.0.0/24"
25 | },
26 | "domainName": {
27 | "value": "nagiosonazure"
28 | },
29 | "tshirtSize": {
30 | "value": "Medium"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/nagios-on-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Nagios Core on Ubuntu VMs",
3 | "description": "This template installs and configures Nagios Core, the industry standard, Open Source IT monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes",
4 | "summary": "This template creates a Nagios Core installation on Ubuntu virtual machines",
5 | "githubUsername": "TheAzureGuy",
6 | "dateUpdated": "2015-04-10"
7 | }
--------------------------------------------------------------------------------
/postgresql-on-ubuntu/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "storageAccountNamePrefix": {
3 | "value": "psgwgddsg"
4 | },
5 | "adminUsername": {
6 | "value": "adminuser"
7 | },
8 | "region": {
9 | "value": "West US"
10 | },
11 | "adminPassword": {
12 | "value": "azure@1234"
13 | },
14 | "domainName": {
15 | "value": "kasafdf"
16 | },
17 | "replicatorPassword": {
18 | "value": "azure@1234"
19 | },
20 | "jumpbox": {
21 | "value": "Enabled"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/postgresql-on-ubuntu/empty-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "adminPassword": {
6 | "type": "securestring",
7 | "defaultValue": ""
8 | },
9 | "commonSettings": {
10 | "type": "object",
11 | "defaultValue": {}
12 | },
13 | "networkSettings": {
14 | "type": "object",
15 | "defaultValue": {}
16 | },
17 | "machineSettings": {
18 | "type": "object",
19 | "defaultValue": {}
20 | },
21 | "osSettings": {
22 | "type": "object",
23 | "defaultValue": {}
24 | },
25 | "appSettings": {
26 | "type": "object",
27 | "defaultValue": {}
28 | },
29 | "appPassword": {
30 | "type": "securestring",
31 | "defaultValue": ""
32 | },
33 | "subnet": {
34 | "type": "object",
35 | "defaultValue": {}
36 | },
37 | "dnsName": {
38 | "type": "string",
39 | "defaultValue":""
40 | },
41 | "storageSettings": {
42 | "type": "object",
43 | "defaultValue": {}
44 | }
45 | },
46 | "variables": {},
47 | "resources": [],
48 | "outputs": {}
49 | }
--------------------------------------------------------------------------------
/postgresql-on-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "PostgreSQL 9.3 on Ubuntu VMs",
3 | "description": "This template creates PostgreSQL streaming replication from one master to one or more slaves each configured with multiple striped data disks. The database servers are deployed into a private subnet with an optional externally accessible jumpbox.",
4 | "summary": "PostgreSQL stream-replication with multiple slave servers and a publicly accessible jumpbox VM",
5 | "githubUsername": "trentmswanson",
6 | "dateUpdated": "2015-04-26"
7 | }
8 |
--------------------------------------------------------------------------------
/postgresql-on-ubuntu/shared-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "region": {
6 | "type": "string"
7 | },
8 | "storageSettings": {
9 | "type": "object"
10 | },
11 | "availabilitySetSettings": {
12 | "type": "object"
13 | },
14 | "networkSettings": {
15 | "type": "object"
16 | }
17 | },
18 | "variables": {},
19 | "resources": [
20 | {
21 | "type": "Microsoft.Storage/storageAccounts",
22 | "name": "[concat(parameters('storageSettings').name, copyindex())]",
23 | "apiVersion": "2015-05-01-preview",
24 | "location": "[parameters('region')]",
25 | "copy": {
26 | "name":"dbStoragePoolLoop",
27 | "count": "[parameters('storageSettings').count]"
28 | },
29 | "properties": {
30 | "accountType": "Standard_LRS"
31 | }
32 | },
33 | {
34 | "apiVersion": "2015-05-01-preview",
35 | "type": "Microsoft.Network/virtualNetworks",
36 | "name": "[parameters('networkSettings').vnetName]",
37 | "location": "[parameters('region')]",
38 | "properties": {
39 | "addressSpace": {
40 | "addressPrefixes": [
41 | "[parameters('networkSettings').addressPrefix]"
42 | ]
43 | },
44 | "subnets": [
45 | {
46 | "name": "[parameters('networkSettings').subnets.dmz.name]",
47 | "properties": {
48 | "addressPrefix": "[parameters('networkSettings').subnets.dmz.prefix]"
49 | }
50 | },
51 | {
52 | "name": "[parameters('networkSettings').subnets.data.name]",
53 | "properties": {
54 | "addressPrefix": "[parameters('networkSettings').subnets.data.prefix]"
55 | }
56 | }
57 | ]
58 | }
59 | },
60 | {
61 | "type": "Microsoft.Compute/availabilitySets",
62 | "name": "[parameters('availabilitySetSettings').name]",
63 | "apiVersion": "2015-05-01-preview",
64 | "location": "[parameters('region')]",
65 | "properties": {
66 | "platformFaultDomainCount": "[parameters('availabilitySetSettings').fdCount]",
67 | "platformUpdateDomainCount": "[parameters('availabilitySetSettings').udCount]"
68 | }
69 | }
70 | ],
71 | "outputs": {}
72 | }
--------------------------------------------------------------------------------
/python-proxy-on-ubuntu/README.md:
--------------------------------------------------------------------------------
1 | # Install Python Proxy on a Ubuntu Virtual Machine using Custom Script Linux Extension
2 |
3 |
4 |
5 |
6 |
7 | This template deploys Python Proxy on a Ubuntu Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.
8 |
9 | Below are the parameters that the template expects
10 |
11 | | Name | Description |
12 | |:--- |:---|
13 | | newStorageAccountName | Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed. |
14 | | adminUsername | Username for the Virtual Machines |
15 | | adminPassword | Password for the Virtual Machine |
16 | | dnsNameForPublicIP | Unique DNS Name for the Public IP used to access the Virtual Machine. |
17 | | subscriptionId | Subscription ID where the template will be deployed |
18 | | vmSourceImageName | Source Image Name for the VM. Example: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_5-LTS-amd64-server-20140927-en-us-30GB |
19 | | location | location where the resources will be deployed |
20 | | virtualNetworkName | Name of Virtual Network |
21 | | vmSize | Size of the Virtual Machine |
22 | | vmName | Name of Virtual Machine |
23 | | publicIPAddressName | Name of Public IP Address Name |
24 | | nicName | Name of Network Interface |
25 |
--------------------------------------------------------------------------------
/python-proxy-on-ubuntu/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "newStorageAccountName" : {
3 | "value":"uniqueStorageAccountName"
4 | },
5 | "adminUsername": {
6 | "value": ""
7 | },
8 | "adminPassword": {
9 | "value": ""
10 | },
11 | "dnsNameForPublicIP": {
12 | "value": "uniqueDnsNameForPublicIP"
13 | },
14 | "imagePublisher":{
15 | "value" : "Canonical"
16 | },
17 | "imageOffer": {
18 | "value": "UbuntuServer"
19 | },
20 | "imageSKU": {
21 | "value": "14.04.2-LTS"
22 | },
23 | "location": {
24 | "value": "West US"
25 | },
26 | "virtualNetworkName": {
27 | "value": "myVNET"
28 | },
29 | "vmSize": {
30 | "value": "Standard_A0"
31 | },
32 | "vmName" : {
33 | "value" : "myVM"
34 | },
35 | "publicIPAddressName" : {
36 | "value" : "myPublicIP"
37 | },
38 | "nicName" : {
39 | "value" : "myNic"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/python-proxy-on-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Install Python Proxy on an Ubuntu VM using Custom Script Linux Extension",
3 | "description": "This template deploys Python Proxy on an Ubuntu Virtual Machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.",
4 | "summary": "Install Python Proxy on an Ubuntu VM using Custom Script Linux Extension",
5 | "githubUsername": "yuezh",
6 | "dateUpdated": "2015-04-23"
7 | }
8 |
--------------------------------------------------------------------------------
/python-proxy-on-ubuntu/python-proxy-install-ubuntu.sh:
--------------------------------------------------------------------------------
1 | #Install pip
2 | apt-get update
3 | apt-get install python-pip python-dev build-essential -y
4 | pip install proxy.py
5 |
6 | host=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'`
7 |
8 | init_script="/etc/init/pythonproxy.conf"
9 | echo "#Python Proxy" > $init_script
10 | echo "" >> $init_script
11 | echo "description \"A http proxy service\"" >> $init_script
12 | echo "author \"Yue Zhang\"" >> $init_script
13 | echo "" >> $init_script
14 | echo "exec proxy.py --host $host --port 8888" >> $init_script
15 |
16 | service pythonproxy start
17 |
18 |
--------------------------------------------------------------------------------
/redis-high-availability/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "storageAccountName": {
3 | "value": "redisdeploy1"
4 | },
5 | "adminUsername": {
6 | "value": ""
7 | },
8 | "adminPassword": {
9 | "value": ""
10 | },
11 | "region": {
12 | "value": "West US"
13 | },
14 | "virtualNetworkName": {
15 | "value": "redisClustVnet"
16 | },
17 | "subnetName": {
18 | "value": "Subnet1"
19 | },
20 | "addressPrefix": {
21 | "value": "10.0.0.0/16"
22 | },
23 | "subnetPrefix": {
24 | "value": "10.0.0.0/24"
25 | },
26 | "nodeAddressPrefix": {
27 | "value": "10.0.0.1"
28 | },
29 | "redisVersion": {
30 | "value": "3.0.0"
31 | },
32 | "redisClusterName": {
33 | "value": "redis-arm-cluster"
34 | },
35 | "jumpbox": {
36 | "value": "Enabled"
37 | },
38 | "tshirtSize": {
39 | "value": "Small"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/redis-high-availability/empty-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "commonSettings": {
6 | "type": "object",
7 | "metadata": {
8 | "Description": "Common settings object"
9 | }
10 | },
11 | "storageSettings": {
12 | "type": "object",
13 | "metadata": {
14 | "Description": "Storage settings object"
15 | }
16 | },
17 | "networkSettings": {
18 | "type": "object",
19 | "metadata": {
20 | "Description": "Network settings object"
21 | }
22 | },
23 | "machineSettings": {
24 | "type": "object",
25 | "metadata": {
26 | "Description": "Machine settings object"
27 | }
28 | },
29 | "adminPassword": {
30 | "type": "securestring",
31 | "metadata": {
32 | "Description": "Administrator password used when provisioning virtual machines"
33 | }
34 | }
35 | },
36 | "variables": {
37 | },
38 | "resources": [
39 | ],
40 | "outputs": {
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/redis-high-availability/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Redis cluster on Ubuntu VMs",
3 | "description": "This template creates a Redis cluster on Ubuntu virtual machine images, configures persistence and applies well known optimizations and proven practices",
4 | "summary": "This template creates a Redis cluster on Ubuntu virtual machines",
5 | "githubUsername": "TheAzureGuy",
6 | "dateUpdated": "2015-04-06"
7 | }
--------------------------------------------------------------------------------
/redis-high-availability/redis-sentinel-startup.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | ### BEGIN INIT INFO
3 | # Provides: redis-sentinel
4 | # Required-Start: $syslog $remote_fs
5 | # Required-Stop: $syslog $remote_fs
6 | # Should-Start: $local_fs
7 | # Should-Stop: $local_fs
8 | # Default-Start: 2 3 4 5
9 | # Default-Stop: 0 1 6
10 | # Short-Description: redis-sentinel - Failover for Redis
11 | # Description: redis-sentinel - Failover for Redis
12 | ### END INIT INFO
13 |
14 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15 | DAEMON=/usr/local/bin/redis-sentinel
16 | DAEMON_ARGS=/etc/redis/sentinel.conf
17 | NAME=redis-sentinel
18 | DESC=redis-sentinel
19 | PIDFILE=/var/run/redis-sentinel.pid
20 |
21 | case "$1" in
22 | start)
23 | echo -n "Starting $DESC: "
24 | touch $PIDFILE
25 | chown redis:redis $PIDFILE
26 | if start-stop-daemon --start --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
27 | then
28 | echo "$NAME."
29 | else
30 | echo "failed"
31 | fi
32 | ;;
33 | stop)
34 | echo -n "Stopping $DESC: "
35 | if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
36 | then
37 | echo "$NAME."
38 | else
39 | echo "failed"
40 | fi
41 | rm -f $PIDFILE
42 | ;;
43 |
44 | restart|force-reload)
45 | ${0} stop
46 | ${0} start
47 | ;;
48 |
49 | status)
50 | echo -n "$DESC is "
51 | if start-stop-daemon --stop --quiet --signal 0 --name ${NAME} --pidfile ${PIDFILE}
52 | then
53 | echo "running"
54 | else
55 | echo "not running"
56 | exit 1
57 | fi
58 | ;;
59 |
60 | *)
61 | echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|force-reload}" >&2
62 | exit 1
63 | ;;
64 | esac
65 |
66 | exit 0
--------------------------------------------------------------------------------
/resource-loop-vms-userimage/README.md:
--------------------------------------------------------------------------------
1 | # Deploy 'n' Virtual Machines from a user image using Resource Loops
2 |
3 |
4 |
5 |
6 |
7 | This template allows you to create 'N' number of Virtual Machines from a User image based on the 'numberOfInstances' parameter specified during the template deployment. This template also deploys a Virtual Network, 'N' number of Public IP addresses/Network Inerfaces/Virtual Machines.
8 |
9 | Prerequisite: The Storage Account with the User Image VHD should already exist in the same resource group.
10 |
11 | Note: The Recommended limit of number of disks per Storage Account is 40.
12 |
13 | Below are the parameters that the template expects
14 |
15 | | Name | Description |
16 | |:--- |:---|
17 | | userImageStorageAccountName | Name of the Storage Account where the User Image disk is placed. |
18 | | userImageStorageContainerName | Name of the Container Name in the Storage Account where the User Image disk is placed. |
19 | | userImageVhdName | Name of the User Image VHD file. |
20 | | osType | Specify the type of the OS of the User Image (Windows|Linux) |
21 | | adminUsername | Username for the Virtual Machines |
22 | | adminPassword | Password for the Virtual Machine |
23 | | vmNamePrefix | VM Name Prefix for the Virtual Machine Instances |
24 | | subscriptionId | Subscription ID where the template will be deployed |
25 | | numberOfInstances | Number of Virtual Machine instances to create |
26 | | region | Region where the resources will be deployed |
27 | | virtualNetworkName | Name of Virtual Network |
28 | | vmSize | Size of the Virtual Machine |
29 |
--------------------------------------------------------------------------------
/resource-loop-vms-userimage/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "userImageStorageAccountName": {
3 | "value" : "userImageStorageAccountName"
4 | },
5 | "userImageStorageContainerName" : {
6 | "value" : "userImageStorageContainerName"
7 | },
8 | "userImageVhdName" : {
9 | "value" : "userImageVhdName"
10 | },
11 | "osType" : {
12 | "value" : "linux"
13 | },
14 | "vmNamePrefix" : {
15 | "value" : "cloudvm"
16 | },
17 | "adminUsername": {
18 | "value": ""
19 | },
20 | "adminPassword": {
21 | "value": ""
22 | },
23 | "numberOfInstances": {
24 | "value": 2
25 | },
26 | "region": {
27 | "value": "West US"
28 | },
29 | "virtualNetworkName": {
30 | "value": "cloudVNET"
31 | },
32 | "vmSize": {
33 | "value": "Standard_A2"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/resource-loop-vms-userimage/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Deploy 'n' Virtual Machines from a user image using Resource Loops",
3 | "description": "This template allows you to create 'N' number of Virtual Machines from a User image based on the 'numberOfInstances' parameter specified during the template deployment. This template also deploys a Virtual Network, 'N' number of Public IP addresses/Network Inerfaces/Virtual Machines.",
4 | "summary": "Deploy 'n' Virtual Machines from a user image using Resource Loops",
5 | "githubUsername": "mahthi",
6 | "dateUpdated": "2015-04-04"
7 | }
8 |
--------------------------------------------------------------------------------
/resource-loop-vms-vnet/README.md:
--------------------------------------------------------------------------------
1 | # Create Virtual Machines using Resource Loops
2 |
3 |
4 |
5 |
6 |
7 | This template allows you to create 'N' number of Virtual Machines based on the 'numberOfInstances' parameter specified during the template deployment. This template also deploys a Storage Account, Virtual Network, 'N' number of Public IP addresses/Network Inerfaces/Virtual Machines.
8 |
9 | Note: The Recommended limit of number of disks per Storage Account is 40.
10 |
11 | Below are the parameters that the template expects
12 |
13 | | Name | Description |
14 | |:--- |:---|
15 | | newStorageAccountName | Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed. |
16 | | adminUsername | Username for the Virtual Machines |
17 | | adminPassword | Password for the Virtual Machine |
18 | | numberOfInstances | Number of Virtual Machine instances to create |
19 | | region | Region where the resources will be deployed |
20 | | vmSize | Size of the Virtual Machine |
21 | | imagePublisher | Name of Image Publisher |
22 | | imageOffer | Name of Image Publisher offer |
23 | | imageSKU | Name of SKU for the selected offer |
24 |
--------------------------------------------------------------------------------
/resource-loop-vms-vnet/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "newStorageAccountName" : {
3 | "value":"kaystore4d"
4 | },
5 | "adminUsername": {
6 | "value": "kay"
7 | },
8 | "adminPassword": {
9 | "value": "Azure12345"
10 | },
11 | "numberOfInstances": {
12 | "value": 2
13 | },
14 | "location": {
15 | "value": "West US"
16 | },
17 | "vmSize": {
18 | "value": "Standard_D1"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/resource-loop-vms-vnet/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Create Virtual Machines using Resource Loops",
3 | "description": "Create Virtual Machines using Resource Loops",
4 | "summary": "Create Virtual Machines using Resource Loops",
5 | "githubUsername": "mahthi",
6 | "dateUpdated": "2015-04-04"
7 | }
8 |
--------------------------------------------------------------------------------
/shared_scripts/README.md:
--------------------------------------------------------------------------------
1 | # Shared Scripts
2 |
3 | This folder contains a set of reusable scripts to perform tasks that are common across a number of resource templates. Given the fact that these scripts are used by multiple resource templates, please take care in making changes. The goal is to promote reuse and have a set of very well tested, reviewed, and resilient scripts to use when performing those common tasks, like formatting a data disk.
4 |
5 | ##Versioning
6 | - Do not bump the version on the file name when making backwards compatible bug fixes
7 | - Create a copy of the file and bump the minor version when adding functionality that is backwards compatible
8 | - Create a copy of the file and bump the major version when making changes that are not backwards compatible
9 |
10 | | Name | Author | Description |
11 | |:----------------------------|:-----------------------|:------------------------------------------------------|
12 | | ubuntu/vm-disk-utils | [trentmswanson](https://github.com/trentmswanson) | This script automates the partitioning and formatting of data disks as individual disks or in a RAID0 configuration.|
13 |
--------------------------------------------------------------------------------
/spark-on-ubuntu/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "storageAccountName": {
3 | "value": ""
4 | },
5 | "adminUsername": {
6 | "value": "adminuser"
7 | },
8 | "adminPassword": {
9 | "value": "azure@1234"
10 | },
11 | "region": {
12 | "value": "West US"
13 | },
14 | "virtualNetworkName": {
15 | "value": "sparkClustVnet"
16 | },
17 | "subnetName": {
18 | "value": "Subnet1"
19 | },
20 | "addressPrefix": {
21 | "value": "10.0.0.0/16"
22 | },
23 | "subnetPrefix": {
24 | "value": "10.0.0.0/24"
25 | },
26 | "sparkVersion": {
27 | "value": "3.0.0"
28 | },
29 | "sparkClusterName": {
30 | "value": "spark-arm-cluster"
31 | },
32 | "sparkNodeIPAddressPrefix": {
33 | "value": "10.0.0.1"
34 | },
35 | "sparkSlaveNodeIPAddressPrefix": {
36 | "value": "10.0.0.3"
37 | },
38 | "jumpbox": {
39 | "value": "enabled"
40 | },
41 | "tshirtSize": {
42 | "value": "S"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/spark-on-ubuntu/jumpbox-resources-disabled.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | },
6 | "variables": {
7 | },
8 | "resources": [
9 | ],
10 | "outputs": {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spark-on-ubuntu/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Provisions a Spark Cluster on Ubuntu Virtual Machines",
3 | "description": "This template creates a Spark cluster on Ubuntu virtual machine image, enables persistence (by default) and applies all well-known optimizations and best practices",
4 | "summary": "This template creates a Spark Cluster on Ubuntu virtual machines",
5 | "githubUsername": "CognosysTech",
6 | "dateUpdated": "2015-04-06"
7 | }
8 |
--------------------------------------------------------------------------------
/spark-on-ubuntu/spark-cluster-install.sh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/azure-quickstart-templates/ed782d32fc6eab84c1a695b511b049098cb42307/spark-on-ubuntu/spark-cluster-install.sh
--------------------------------------------------------------------------------
/spark-ubuntu-multidisks/azuredeploy-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "storageAccountNamePrefix": {
3 | "value": "cgnsparkstorev1"
4 | },
5 | "adminUsername": {
6 | "value": "adminuser"
7 | },
8 | "region": {
9 | "value": "West US"
10 | },
11 | "adminPassword": {
12 | "value": "azure@1234"
13 | },
14 | "domainName": {
15 | "value": "cgnsparkv1"
16 | },
17 | "sparkversion": {
18 | "value": "1.2.1"
19 | },
20 | "jumpbox": {
21 | "value": "Enabled"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/spark-ubuntu-multidisks/empty-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "adminPassword": {
6 | "type": "securestring",
7 | "defaultValue": ""
8 | },
9 | "commonSettings": {
10 | "type": "object",
11 | "defaultValue": {}
12 | },
13 | "networkSettings": {
14 | "type": "object",
15 | "defaultValue": {}
16 | },
17 | "machineSettings": {
18 | "type": "object",
19 | "defaultValue": {}
20 | },
21 | "osSettings": {
22 | "type": "object",
23 | "defaultValue": {}
24 | },
25 | "appSettings": {
26 | "type": "object",
27 | "defaultValue": {}
28 | },
29 | "appPassword": {
30 | "type": "securestring",
31 | "defaultValue": ""
32 | },
33 | "subnet": {
34 | "type": "object",
35 | "defaultValue": {}
36 | },
37 | "dnsName": {
38 | "type": "string",
39 | "defaultValue":""
40 | }
41 | },
42 | "variables": {},
43 | "resources": [],
44 | "outputs": {}
45 | }
--------------------------------------------------------------------------------
/spark-ubuntu-multidisks/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Spark on Ubuntu VMs",
3 | "description": "This template creates Spark streaming replication from one master to one or more slaves each configured with multiple striped data disks. The database servers are deployed into a private subnet with an optional externally accessible jumpbox.",
4 | "summary": "Spark stream-replication with multiple slave servers and a publicly accessible jumpbox VM",
5 | "githubUsername": "CognosysTech",
6 | "dateUpdated": "2015-04-26"
7 | }
8 |
--------------------------------------------------------------------------------
/spark-ubuntu-multidisks/shared-resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "region": {
6 | "type": "string"
7 | },
8 | "storageSettings": {
9 | "type": "object"
10 | },
11 | "availabilitySetSettings": {
12 | "type": "object"
13 | },
14 | "networkSettings": {
15 | "type": "object"
16 | }
17 | },
18 | "variables": {},
19 | "resources": [
20 | {
21 | "type": "Microsoft.Storage/storageAccounts",
22 | "name": "[concat(parameters('storageSettings').name, copyindex())]",
23 | "apiVersion": "2015-05-01-preview",
24 | "location": "[parameters('region')]",
25 | "copy": {
26 | "name":"dbStoragePoolLoop",
27 | "count": "[parameters('storageSettings').count]"
28 | },
29 | "properties": {
30 | "accountType": "Standard_LRS"
31 | }
32 | },
33 | {
34 | "apiVersion": "2015-05-01-preview",
35 | "type": "Microsoft.Network/virtualNetworks",
36 | "name": "[parameters('networkSettings').vnetName]",
37 | "location": "[parameters('region')]",
38 | "properties": {
39 | "addressSpace": {
40 | "addressPrefixes": [
41 | "[parameters('networkSettings').addressPrefix]"
42 | ]
43 | },
44 | "subnets": [
45 | {
46 | "name": "[parameters('networkSettings').subnets.dmz.name]",
47 | "properties": {
48 | "addressPrefix": "[parameters('networkSettings').subnets.dmz.prefix]"
49 | }
50 | },
51 | {
52 | "name": "[parameters('networkSettings').subnets.data.name]",
53 | "properties": {
54 | "addressPrefix": "[parameters('networkSettings').subnets.data.prefix]"
55 | }
56 | }
57 | ]
58 | }
59 | },
60 | {
61 | "type": "Microsoft.Compute/availabilitySets",
62 | "name": "[parameters('availabilitySetSettings').name]",
63 | "apiVersion": "2015-05-01-preview",
64 | "location": "[parameters('region')]",
65 | "properties": {
66 | "platformFaultDomainCount": "[parameters('availabilitySetSettings').fdCount]",
67 | "platformUpdateDomainCount": "[parameters('availabilitySetSettings').udCount]"
68 | }
69 | }
70 | ],
71 | "outputs": {}
72 | }
--------------------------------------------------------------------------------
/spark-ubuntu-multidisks/spark-cluster-install.sh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/azure-quickstart-templates/ed782d32fc6eab84c1a695b511b049098cb42307/spark-ubuntu-multidisks/spark-cluster-install.sh
--------------------------------------------------------------------------------
/symantec-extension-windows-vm/README.md:
--------------------------------------------------------------------------------
1 | # Create a Windows VM with Symantec Endpoint Protection extension enabled
2 |
3 |
4 |
5 |
6 |
7 | Create a Windows VM with Symantec Endpoint Protection extension enabled. This is a sample template that shows how to set up a VM with a trial version of Symantec Endpoint Protection service with this configuration.
--------------------------------------------------------------------------------
/symantec-extension-windows-vm/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "newStorageAccountName": {
6 | "value": ""
7 | },
8 | "location": {
9 | "value": ""
10 | },
11 | "publicIPAddressName": {
12 | "value": ""
13 | },
14 | "publicIPAddressType": {
15 | "value": "Dynamic"
16 | },
17 | "vmName": {
18 | "value": ""
19 | },
20 | "vmSize": {
21 | "value": "Standard_A2"
22 | },
23 | "adminUserName": {
24 | "value": ""
25 | },
26 | "adminPassword": {
27 | "value": ""
28 | },
29 | "virtualNetworkName": {
30 | "value": ""
31 | },
32 | "nicName": {
33 | "value": ""
34 | },
35 | "vmExtensionName": {
36 | "value": "malware"
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/symantec-extension-windows-vm/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Symantec Endpoint Protection extension (trial license) on Windows VM",
3 | "description": "This template creates a Windows VM and sets up a trial version of Symantec Endpoint Protection",
4 | "summary": "Windows VM with Symantec Endpoint Protection",
5 | "githubUsername": "sung-msft",
6 | "dateUpdated": "2015-04-27"
7 | }
8 |
--------------------------------------------------------------------------------
/windows-puppet-agent/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "newStorageAccountName": {
3 | "value": "your storage"
4 | },
5 | "adminUserName": {
6 | "value": "admin name"
7 | },
8 | "adminPassword": {
9 | "value": "admin password"
10 | },
11 | "vmDnsName": {
12 | "value": "unique dns name"
13 | },
14 | "imagePublisher": {
15 | "value": "image Publisher"
16 | },
17 | "imageOffer": {
18 | "value": "image Offer"
19 | },
20 | "imageSKU": {
21 | "value": "image SKU"
22 | },
23 | "location": {
24 | "value": "VM Location"
25 | },
26 | "vmSize": {
27 | "value": "VM Size"
28 | },
29 | "puppet_master_server": {
30 | "value": "Puppet Master Agent"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/windows-puppet-agent/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Puppet agent on Windows VM",
3 | "description": "Deploy a windows VM with Puppet Agent",
4 | "summary": "Deploy an Windows VM With Puppet Agent",
5 | "githubUsername": "kundanap",
6 | "dateUpdated": "2015-04-23"
7 | }
8 |
--------------------------------------------------------------------------------
/windows-puppet-agent/readme.md:
--------------------------------------------------------------------------------
1 | # Deploy a windows VM with Puppet.
2 |
3 |
4 | | Deploy to Azure | Author | Template Name | Description |
5 | |:-----------------|:--------------------------------| :---------------| :---------------|
6 | |
| [kundanap](https://github.com/gbowerman) | [Puppet Agent on windows Azure VM(https://github.com/azurermtemplates/azurermtemplates/tree/master/windows-puppet-agent) | This template provisions a windows VM on Azure and bootstraps it with Puppet agent version 3.2.|
7 |
--------------------------------------------------------------------------------
/windows-vm-push-certificate/README.md:
--------------------------------------------------------------------------------
1 | # Push a certificate onto a VM
2 |
3 |
4 |
5 |
6 |
7 | Push a certificate onto a VM. Pass in the URL of the secret in KeyVault.
8 |
9 | Pre-Requisistes - You need a certificate
10 |
11 | These are the steps that need to be followed to upload the certificate into the KeyVault as a secret
12 |
13 | 1. base64 encode the cert file
14 | 2. Paste the base64 value into data field in this JSON object
15 | {
16 | “data”:””,
17 | “dataType” :””,
18 | “password”:””
19 | }
20 |
21 | 3. base64 the above JSON object
22 | 4. Convert the base64 value into a secure string
23 | $secret = ConvertTo-SecureString -String 'password' -AsPlainText –Force
24 |
25 | 5. Then use the secure string value for the SecretValue in this cmdlet
26 | Set-AzureKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret' –SecretValue $secret
27 |
28 | The following PowerShell script can make these steps easy
29 |
30 | $fileName = "C:\Users\kasing\Desktop\KayTest.pfx"
31 | $fileContentBytes = get-content $fileName -Encoding Byte
32 | $fileContentEncoded = [System.Convert]::ToBase64String($fileContentBytes)
33 |
34 | $jsonObject = @"
35 | {
36 | "data": "$filecontentencoded",
37 | "dataType" :"pfx",
38 | "password": ""
39 | }
40 | "@
41 |
42 | $jsonObjectBytes = [System.Text.Encoding]::UTF8.GetBytes($jsonObject)
43 | $jsonEncoded = [System.Convert]::ToBase64String($jsonObjectBytes)
44 |
45 | $secret = ConvertTo-SecureString -String $jsonEncoded -AsPlainText –Force
46 | Set-AzureKeyVaultSecret -VaultName kayvault -Name testkay -SecretValue $secret
47 |
--------------------------------------------------------------------------------
/windows-vm-push-certificate/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "newStorageAccountName": {
6 | "value": ""
7 | },
8 | "location": {
9 | "value": "East US"
10 | },
11 | "publicIPName": {
12 | "value": ""
13 | },
14 | "publicIPAddressType": {
15 | "value": "Dynamic"
16 | },
17 | "vmName": {
18 | "value": ""
19 | },
20 | "vmSize": {
21 | "value": "Standard_A2"
22 | },
23 | "adminUserName": {
24 | "value": ""
25 | },
26 | "adminPassword": {
27 | "value": ""
28 | },
29 | "virtualNetworkName": {
30 | "value": ""
31 | },
32 | "nicName": {
33 | "value": ""
34 | },
35 | "vaultName": {
36 | "value": ""
37 | },
38 | "vaultResourceGroup": {
39 | "value": ""
40 | },
41 | "secretUrlWithVersion": {
42 | "value": ""
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/windows-vm-push-certificate/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "itemDisplayName": "Push a certificate onto a Windows VM",
3 | "description": "Push a certificate onto a Windows VM",
4 | "summary": "Push a certificate onto a Windows VM",
5 | "githubUsername": "singhkay",
6 | "dateUpdated": "2015-04-27"
7 | }
8 |
--------------------------------------------------------------------------------
/zookeper-cluster-ubuntu-vm/README.md:
--------------------------------------------------------------------------------
1 | # Create a Zookeeper cluster on Ubuntu VMs
2 |
3 | Create a Zookeeper cluster -
4 |
5 |
6 |
7 | This template creates a 3 node Zookeper cluster on Ubuntu VMs
8 |
--------------------------------------------------------------------------------
/zookeper-cluster-ubuntu-vm/azuredeploy.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "newStorageAccountName": {
6 | "value": ""
7 | },
8 | "location": {
9 | "value": ""
10 | },
11 | "publicIPAddressType": {
12 | "value": "Dynamic"
13 | },
14 | "availabilitySetName": {
15 | "value": ""
16 | },
17 | "vmName": {
18 | "value": ""
19 | },
20 | "vmSize": {
21 | "value": "Standard_A2"
22 | },
23 | "adminUserName": {
24 | "value": ""
25 | },
26 | "adminPassword": {
27 | "value": ""
28 | },
29 | "virtualNetworkName": {
30 | "value": ""
31 | },
32 | "nicName": {
33 | "value": ""
34 | },
35 | "vmExtensionName": {
36 | "value": "zookeeper"
37 | },
38 | "customScriptFilePath": {
39 | "value": "https://raw.githubusercontent.com/azurermtemplates/azurermtemplates/master/zookeper-cluster-ubuntu-vm/zookeeper.sh"
40 | },
41 | "customScriptCommandToExecute": {
42 | "value": "sh zookeeper.sh "
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/zookeper-cluster-ubuntu-vm/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "TemplateName": "Zookeeper cluster on Ubuntu VMs",
3 | "Description": "This template creates a 3 node Zookeper cluster on Ubuntu VMs",
4 | "ShortDescription": "Deploy a Zookeeper cluster on Ubuntu VMs",
5 | "GithubUsername": "singhkay",
6 | "DateUpdated": "2015-043-25"
7 | }
8 |
--------------------------------------------------------------------------------
/zookeper-cluster-ubuntu-vm/zookeeper.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz"
3 | tar -xvf jdk-7*
4 | mkdir /usr/lib/jvm
5 | mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0
6 | update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
7 | update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
8 | update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
9 | chmod a+x /usr/bin/java
10 | chmod a+x /usr/bin/javac
11 | chmod a+x /usr/bin/javaws
12 |
13 | cd /usr/local
14 |
15 | wget "http://mirrors.ukfast.co.uk/sites/ftp.apache.org/zookeeper/stable/zookeeper-3.4.6.tar.gz"
16 | tar -xvf "zookeeper-3.4.6.tar.gz"
17 |
18 | touch zookeeper-3.4.6/conf/zoo.cfg
19 |
20 | echo "tickTime=2000" >> zookeeper-3.4.6/conf/zoo.cfg
21 | echo "dataDir=/var/lib/zookeeper" >> zookeeper-3.4.6/conf/zoo.cfg
22 | echo "clientPort=2181" >> zookeeper-3.4.6/conf/zoo.cfg
23 | echo "initLimit=5" >> zookeeper-3.4.6/conf/zoo.cfg
24 | echo "syncLimit=2" >> zookeeper-3.4.6/conf/zoo.cfg
25 | echo "server.1=10.0.0.4:2888:3888" >> zookeeper-3.4.6/conf/zoo.cfg
26 | echo "server.2=10.0.0.5:2888:3888" >> zookeeper-3.4.6/conf/zoo.cfg
27 | echo "server.3=10.0.0.6:2888:3888" >> zookeeper-3.4.6/conf/zoo.cfg
28 |
29 | mkdir -p /var/lib/zookeeper
30 |
31 | echo $(($1+1)) >> /var/lib/zookeeper/myid
32 |
33 | zookeeper-3.4.6/bin/zkServer.sh start
34 |
--------------------------------------------------------------------------------