Skip to content

Commit

Permalink
Merge pull request #12 from SolaceDev/master
Browse files Browse the repository at this point in the history
Feature Bug 71519: Move Solace Azure Quickstart to Azure Quickstart Templates
  • Loading branch information
efunneko committed Feb 15, 2018
2 parents 053e6b9 + f26f74b commit 25dc8c4
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 86 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ The fields that you need to fill out are:
| Admin Username | Username for the virtual Machine(s). Do not use special characters. |
| Admin Password | Password for the virtual Machine(s) and for the 'admin' SolOS CLI user. |
| Security Group Name | New or existing security group, where VMR default ports will be made publicly available. |
| Workspace Name | New or existing OMS Log Analytics workspace, where logs and diagnostics are monitored. Note that not all regions support workspaces. |
| Workspace Name | New or existing OMS Log Analytics workspace, where logs and diagnostics are monitored. |
| Workspace Region | Select region to deploy OMS Log Analytics workspace. |
| DNS Label for LB IP | Used for the public DNS name of the Load Balancer. |
| DNS Label for VM IP | Used for the public DNS name of each Virtual Machine(s). |
| CentOS Version | The CentOS version for deploying the Docker containers. Use CentOS 7.2, 7.3, or 7.4. |
Expand Down
127 changes: 45 additions & 82 deletions azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@
"description": "Unique OMS Workspace Name for Log Analytics."
}
},
"workspaceRegion": {
"type": "string",
"defaultValue": "East US",
"metadata": {
"description": "OMS Workspace Region for Log Analytics."
},
"allowedValues": [
"East US",
"West Europe",
"Southeast Asia",
"Australia Southeast",
"Japan East",
"UK South",
"Central India",
"Canada Central"
]
},
"dnsLabelForLbIp": {
"type": "string",
"metadata": {
Expand Down Expand Up @@ -128,6 +145,8 @@
"securitySharedTemplateName": "security-shared-resources.json",
"solaceLoadBalancerName": "SolaceLoadBalancer.Template",
"loadBalancerSharedTemplateName": "loadbalancer-shared-resources.json",
"solaceWorkspaceName": "SolaceWorkspace.Template",
"workspaceSharedTemplateName": "workspace-shared-resources.json",
"solaceInstallScriptName": "deploy_vmr.sh",
"sempQueryScriptName": "semp_query.sh",
"publicIPAddressName": "myPublicIPD",
Expand All @@ -152,9 +171,6 @@
"lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]",
"lbPoolName": "vmr-ha-group",
"lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/',variables('lbPoolName'))]",
"workspaceTier": "Free",
"containersMarketplaceName": "Containers",
"syslogFacilities": [ "kern", "user", "daemon", "auth", "syslog", "uucp", "authpriv", "ftp", "cron", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7" ],
"dataDiskVolume" : "/dev/sdc",
"dataDisksChoices": {
"0": [
Expand Down Expand Up @@ -236,6 +252,26 @@
}
}
},
{
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"name": "[variables('solaceWorkspaceName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('scriptUrl'), variables('workspaceSharedTemplateName'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceName": {
"value": "[parameters('workspaceName')]"
},
"workspaceRegion": {
"value": "[parameters('workspaceRegion')]"
}
}
}
},
{
"apiVersion": "2016-03-30",
"type": "Microsoft.Network/publicIPAddresses",
Expand Down Expand Up @@ -294,6 +330,9 @@
"[concat('Microsoft.Resources/deployments/', variables('solaceLoadBalancerName'))]"
],
"properties": {
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('securityGroupName'))]"
},
"ipConfigurations": [
{
"name": "ipconfig1",
Expand Down Expand Up @@ -409,82 +448,6 @@
"settings": { }
}
},
{
"apiVersion": "2015-03-20",
"type": "Microsoft.OperationalInsights/workspaces",
"name": "[parameters('workspaceName')]",
"location": "[resourceGroup().location]",
"properties": {
"sku": {
"name": "[variables('workspaceTier')]"
}
},
"resources": [
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationalInsights/workspaces/datasources",
"name": "[concat(parameters('workspaceName'), '/syslogCollection')]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"kind": "LinuxSyslogCollection",
"properties": {
"state": "Enabled"
}
}
]
},
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationalInsights/workspaces/datasources",
"name": "[concat(parameters('workspaceName'), '/syslog', copyindex())]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"copy": {
"name": "SyslogFacilityLoop",
"count": "[length(variables('syslogFacilities'))]"
},
"kind": "LinuxSyslog",
"properties": {
"syslogName": "[variables('syslogFacilities')[copyindex()]]",
"syslogSeverities": [
{
"severity": "emerg"
},
{
"severity": "alert"
},
{
"severity": "crit"
},
{
"severity": "err"
},
{
"severity": "warning"
}
]
}
},
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationsManagement/solutions",
"name": "[concat(variables('containersMarketplaceName'), '(', parameters('workspaceName'), ')')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"properties": {
"workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaceName'))]"
},
"plan": {
"name": "[concat(variables('containersMarketplaceName'), '(', parameters('workspaceName'), ')')]",
"publisher": "Microsoft",
"product": "[concat('OMSGallery/', variables('containersMarketplaceName'))]",
"promotionCode": ""
}
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
Expand All @@ -496,17 +459,17 @@
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vmName'), copyindex(), '/extensions/DockerExtension')]",
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
"[concat('Microsoft.Resources/deployments/', variables('solaceWorkspaceName'))]"
],
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "OmsAgentForLinux",
"typeHandlerVersion": "1.4",
"settings": {
"workspaceId": "[reference(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').customerId]"
"workspaceId": "[reference(variables('solaceWorkspaceName')).outputs.workspaceId.value]"
},
"protectedSettings": {
"workspaceKey": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').primarySharedKey]"
"workspaceKey": "[reference(variables('solaceWorkspaceName')).outputs.workspaceKey.value]"
}
}
},
Expand Down
7 changes: 5 additions & 2 deletions azuredeploy.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"value": "GEN-UNIQUE"
},
"adminUsername": {
"value": "ubuntu"
"value": "solace"
},
"adminPassword": {
"value": "P4$$w0rd"
"value": "GEN-PASSWORD"
},
"workspaceName": {
"value": "GEN-UNIQUE"
Expand All @@ -19,6 +19,9 @@
},
"dnsLabelForVmIp": {
"value": "GEN-UNIQUE"
},
"deploymentModel": {
"value": "SingleNode"
}
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"description": "This template allows you to deploy either a standalone Solace Message Router or a three node High Availability cluster of Solace Message Routers onto Azure Linux VM(s).",
"summary": "This template deploys either a standalone Solace Message Router or a three node High Availability cluster of Solace Message Routers onto Azure Linux VM(s).",
"githubUsername": "KenBarr",
"dateUpdated": "31/01/2018"
"dateUpdated": "2018-01-31"
}
122 changes: 122 additions & 0 deletions workspace-shared-resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspaceName": {
"type": "string",
"metadata": {
"description": "Unique OMS Workspace Name for Log Analytics."
}
},
"workspaceRegion": {
"type": "string",
"defaultValue": "East US",
"metadata": {
"description": "OMS Workspace Region for Log Analytics."
},
"allowedValues": [
"East US",
"West Europe",
"Southeast Asia",
"Australia Southeast",
"Japan East",
"UK South",
"Central India",
"Canada Central"
]
}
},
"variables": {
"workspaceTier": "Free",
"containersMarketplaceName": "Containers",
"syslogFacilities": [ "kern", "user", "daemon", "auth", "syslog", "uucp", "authpriv", "ftp", "cron", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7" ]
},
"outputs": {
"workspaceId": {
"type": "string",
"value": "[reference(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').customerId]"
},
"workspaceKey": {
"type": "string",
"value": "[listKeys(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName')), '2015-03-20').primarySharedKey]"
}
},
"resources": [
{
"apiVersion": "2015-03-20",
"type": "Microsoft.OperationalInsights/workspaces",
"name": "[parameters('workspaceName')]",
"location": "[parameters('workspaceRegion')]",
"properties": {
"sku": {
"name": "[variables('workspaceTier')]"
}
},
"resources": [
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationalInsights/workspaces/datasources",
"name": "[concat(parameters('workspaceName'), '/syslogCollection')]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"kind": "LinuxSyslogCollection",
"properties": {
"state": "Enabled"
}
}
]
},
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationalInsights/workspaces/datasources",
"name": "[concat(parameters('workspaceName'), '/syslog', copyindex())]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"copy": {
"name": "SyslogFacilityLoop",
"count": "[length(variables('syslogFacilities'))]"
},
"kind": "LinuxSyslog",
"properties": {
"syslogName": "[variables('syslogFacilities')[copyindex()]]",
"syslogSeverities": [
{
"severity": "emerg"
},
{
"severity": "alert"
},
{
"severity": "crit"
},
{
"severity": "err"
},
{
"severity": "warning"
}
]
}
},
{
"apiVersion": "2015-11-01-preview",
"type": "Microsoft.OperationsManagement/solutions",
"name": "[concat(variables('containersMarketplaceName'), '(', parameters('workspaceName'), ')')]",
"location": "[parameters('workspaceRegion')]",
"dependsOn": [
"[concat('Microsoft.OperationalInsights/workspaces/', parameters('workspaceName'))]"
],
"properties": {
"workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaceName'))]"
},
"plan": {
"name": "[concat(variables('containersMarketplaceName'), '(', parameters('workspaceName'), ')')]",
"publisher": "Microsoft",
"product": "[concat('OMSGallery/', variables('containersMarketplaceName'))]",
"promotionCode": ""
}
}
]
}

0 comments on commit 25dc8c4

Please sign in to comment.