Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
Created July 7, 2016 19:42
Show Gist options
  • Save johnrengelman/a302634c2aa7833a46584484df755f8d to your computer and use it in GitHub Desktop.
Save johnrengelman/a302634c2aa7833a46584484df755f8d to your computer and use it in GitHub Desktop.
Upgrade Rancher Cluster with Amazon EC2 Run Command
{
"schemaVersion":"1.2",
"description":"Upgrade Rancher cluster to specified version",
"parameters":{
"version":{
"type":"String",
"description":"(Required) The version to upgrade to.",
"maxChars":4096
}
},
"runtimeConfig":{
"aws:runShellScript":{
"properties":[
{
"runCommand": [
"docker pull rancher/server:{{version}}",
"docker rm -f $(sudo docker ps -a | grep rancher | awk {'print $1'}) ",
"/var/lib/rancher/bin/rancher-ha-start.sh rancher/server:{{version}}"
]
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment