Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Allow shared storage account to be configured for azure repository pl…
Browse files Browse the repository at this point in the history
…ugin (#212)

This commit allows the shared storage account to be configured to use with the
azure repository plugin. A value of "Yes" can be supplied for azureCloudPlugin,
without azureCloudStorageAccountName and azureCloudStorageAccountKey,
and the shared storage account will be configured for the plugin
  • Loading branch information
russcam committed Jul 20, 2018
1 parent 593a422 commit 4d81653
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build/arm-tests/1d-0m-0c-int-kp-yml.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "1 data node cluster using temp disk, with additional yaml configuration",
"description": "1 data node cluster using temp disk, with additional yaml configuration and azure repository plugin",
"isValid" : true,
"deploy" : true,
"why" : "",
Expand All @@ -9,6 +9,7 @@
"kibana":{"value":"Yes"},
"kibanaAdditionalYaml":{"value":"server.name: \"My server\"\nserver.defaultRoute: \"/app/kibana\""},
"esAdditionalYaml":{"value":"action.auto_create_index: +.*\nindices.queries.cache.size: 5%"},
"azureCloudPlugin":{"value":"Yes"},
"jumpbox":{"value":"No"},
"vmSizeKibana":{"value":"Standard_DS1_v2"},
"vmSizeDataNodes":{"value":"Standard_DS1_v2"},
Expand Down
9 changes: 8 additions & 1 deletion src/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
],
"defaultValue": "No",
"metadata": {
"description": "Choose whether to install Azure Repository plugin. The plugin allows an existing Azure storage account to be used for snapshot and restore"
"description": "Choose whether to install Azure Repository plugin. The plugin allows a Azure storage account to be used for snapshot and restore. If azureCloudStorageAccountName and azureCloudStorageAccountKey are not supplied, will use the shared storage account deployed."
}
},
"azureCloudStorageAccountName": {
Expand Down Expand Up @@ -1795,6 +1795,13 @@
"kibanaIp": {
"value": "[reference('kibana-ip').outputs.fqdn.value]"
},
"sharedStorageAccount": {
"value": {
"name": "[variables('commonVmSettings').storageAccountName]",
"key": "[reference('shared').outputs.sharedStorageAccountKey.value]",
"suffix": "[reference('shared').outputs.sharedStorageAccountSuffix.value]"
}
},
"elasticTags": {
"value": "[parameters('elasticTags')]"
}
Expand Down
19 changes: 14 additions & 5 deletions src/settings/ubuntuSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,23 @@
}
},
"azureCloudStorageAccount": {
"type": "object",
"metadata": {
"description": "The storage settings for the Azure Cloud plugin"
}
"type": "secureObject",
"metadata": {
"description": "The storage settings for the Azure Cloud plugin"
}
},
"kibanaIp": {
"type": "string",
"metadata": {
"description": "The public IP address for Kibana"
}
},
"sharedStorageAccount": {
"type": "secureObject",
"metadata": {
"description": "The shared storage settings"
}
},
"elasticTags": {
"type": "object",
"defaultValue": {
Expand Down Expand Up @@ -79,13 +85,16 @@
"Yes": "j"
},
"installAzureCloudPluginShortOpt": "[variables('installAzureCloudPluginShortOpts')[parameters('azureCloudStorageAccount').install]]",
"azureCloudStorageName": "[if(equals(parameters('azureCloudStorageAccount').install, 'Yes'), if(empty(parameters('azureCloudStorageAccount').name), parameters('sharedStorageAccount').name, parameters('azureCloudStorageAccount').name), '')]",
"azureCloudStorageKey": "[if(equals(parameters('azureCloudStorageAccount').install, 'Yes'), if(empty(parameters('azureCloudStorageAccount').key), parameters('sharedStorageAccount').key, parameters('azureCloudStorageAccount').key), '')]",
"azureCloudStorageSuffix": "[if(equals(parameters('azureCloudStorageAccount').install, 'Yes'), if(empty(parameters('azureCloudStorageAccount').name), parameters('sharedStorageAccount').suffix, parameters('azureCloudStorageAccount').suffix), '')]",
"installPluginsShortOpts": {
"No": "",
"Yes": "l"
},
"installPluginsShortOpt": "[variables('installPluginsShortOpts')[parameters('esSettings').installPlugins]]",
"commonShortOpts": "[concat(variables('dedicatedMasterNodesShortOpt'), variables('installPluginsShortOpt'), variables('installAzureCloudPluginShortOpt'), 'n ')]",
"commonInstallParams": "[concat('\"', parameters('esSettings').clusterName, '\" -v \"', parameters('esSettings').version, '\" -m ', parameters('esSettings').heapSize,' -A \"', parameters('esSettings').securityAdminPwd, '\" -R \"', parameters('esSettings').securityReadPwd, '\" -K \"', parameters('esSettings').securityKibanaPwd, '\" -S \"', parameters('esSettings').securityLogstashPwd, '\" -B \"', parameters('esSettings').securityBootstrapPwd, '\" -Z ', parameters('topologySettings').vmDataNodeCount,' -p \"', variables('namespacePrefix'), '\" -a \"', parameters('azureCloudStorageAccount').name, '\" -k \"', parameters('azureCloudStorageAccount').key, '\" -E \"', parameters('azureCloudStorageAccount').suffix, '\" -L \"', parameters('esSettings').installAdditionalPlugins, '\" -C \"', replace(parameters('esSettings').yamlConfiguration, '\"', '\\\"'), '\" -D \"', parameters('topologySettings').vNetLoadBalancerIp, '\" -H \"', parameters('esSettings').httpCertBlob,'\" -G \"', parameters('esSettings').httpCertPassword, '\" -V \"', parameters('esSettings').httpCaCertBlob, '\" -J \"', parameters('esSettings').httpCaCertPassword, '\" -T \"', parameters('esSettings').transportCaCertBlob, '\" -W \"', parameters('esSettings').transportCaCertPassword, '\" -N \"', parameters('esSettings').transportCertPassword, '\" -O \"', parameters('esSettings').samlMetadataUri, '\" -P \"', variables('kibanaDomainName'), '\"')]",
"commonInstallParams": "[concat('\"', parameters('esSettings').clusterName, '\" -v \"', parameters('esSettings').version, '\" -m ', parameters('esSettings').heapSize,' -A \"', parameters('esSettings').securityAdminPwd, '\" -R \"', parameters('esSettings').securityReadPwd, '\" -K \"', parameters('esSettings').securityKibanaPwd, '\" -S \"', parameters('esSettings').securityLogstashPwd, '\" -B \"', parameters('esSettings').securityBootstrapPwd, '\" -Z ', parameters('topologySettings').vmDataNodeCount,' -p \"', variables('namespacePrefix'), '\" -a \"', variables('azureCloudStorageName'), '\" -k \"', variables('azureCloudStorageKey'), '\" -E \"', variables('azureCloudStorageSuffix'), '\" -L \"', parameters('esSettings').installAdditionalPlugins, '\" -C \"', replace(parameters('esSettings').yamlConfiguration, '\"', '\\\"'), '\" -D \"', parameters('topologySettings').vNetLoadBalancerIp, '\" -H \"', parameters('esSettings').httpCertBlob,'\" -G \"', parameters('esSettings').httpCertPassword, '\" -V \"', parameters('esSettings').httpCaCertBlob, '\" -J \"', parameters('esSettings').httpCaCertPassword, '\" -T \"', parameters('esSettings').transportCaCertBlob, '\" -W \"', parameters('esSettings').transportCaCertPassword, '\" -N \"', parameters('esSettings').transportCertPassword, '\" -O \"', parameters('esSettings').samlMetadataUri, '\" -P \"', variables('kibanaDomainName'), '\"')]",
"ubuntuScripts": [
"[concat(parameters('templateBaseUrl'), 'scripts/elasticsearch-ubuntu-install.sh')]",
"[concat(parameters('templateBaseUrl'), 'scripts/kibana-install.sh')]",
Expand Down

0 comments on commit 4d81653

Please sign in to comment.