Skip to content

Commit

Permalink
Use Azure Storage for Spinnaker template
Browse files Browse the repository at this point in the history
  • Loading branch information
ejizba committed Feb 10, 2017
1 parent f0d7f1c commit 719216b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
10 changes: 6 additions & 4 deletions spinnaker-vm-simple/azuredeploy.json
Expand Up @@ -25,7 +25,7 @@
"metadata": {
"description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated."
},
"defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/spinnaker-vm-simple/scripts/"
"defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/spinnaker-vm-simple/"
},
"_artifactsLocationSasToken": {
"type": "securestring",
Expand Down Expand Up @@ -181,9 +181,11 @@
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('_artifactsLocation'), 'set_spinnaker.sh', parameters('_artifactsLocationSasToken'))]"
],
"commandToExecute": "[concat('sh set_spinnaker.sh', ' ', parameters('adminUserName'), ' ', parameters('adminPassword'))]"
"[concat(parameters('_artifactsLocation'), 'scripts/set_spinnaker.sh', parameters('_artifactsLocationSasToken'))]"
]
},
"protectedSettings": {
"commandToExecute": "[concat('./set_spinnaker.sh', ' ', variables('storageAccountName'), ' ', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value)]"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion spinnaker-vm-simple/metadata.json
Expand Up @@ -4,5 +4,5 @@
"description": "This template allows you to deploy an instance of Spinnaker on a Linux Ubuntu 14.04 LTS VM. This will deploy a D3_v2 size VM in the resource group location and return the FQDN of the VM. You will have to manually configure the instance to target a deployment environment.",
"summary": "This template deploys an instance of Spinnaker on a Linux Ubuntu 14.05 LTS VM, with no configuration.",
"githubUsername": "EricJizbaMSFT",
"dateUpdated": "2017-01-26"
"dateUpdated": "2017-02-10"
}
13 changes: 12 additions & 1 deletion spinnaker-vm-simple/scripts/set_spinnaker.sh
@@ -1,3 +1,14 @@
#!/bin/bash

curl --silent https://raw.githubusercontent.com/spinnaker/spinnaker/master/InstallSpinnaker.sh | sudo bash -s -- --quiet
storage_account_name=$1
storage_account_key=$2

curl --silent https://raw.githubusercontent.com/spinnaker/spinnaker/master/InstallSpinnaker.sh | sudo bash -s -- --quiet --noinstall_cassandra

# Enable Azure storage
sudo /opt/spinnaker/install/change_cassandra.sh --echo=inMemory --front50=azs
sudo sed -i "s|storageAccountName:|storageAccountName: ${storage_account_name}|" /opt/spinnaker/config/spinnaker-local.yml
sudo sed -i "s|storageAccountKey:|storageAccountKey: ${storage_account_key}|" /opt/spinnaker/config/spinnaker-local.yml

# Restart spinnaker so that config changes take effect
sudo service spinnaker restart

0 comments on commit 719216b

Please sign in to comment.