curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X POST \
-H 'Content-Type: application/json' \
-d ' {
"inServiceStrategy" : {
"batchSize" : 1 ,
"intervalMillis" : 2000 ,
"launchConfig" : {
"accountId" : "reference[account]" ,
"blkioDeviceOptions" : "map[blkioDeviceOption]" ,
"blkioWeight" : 0 ,
"build" : {
"context" : "string" ,
"dockerfile" : "string" ,
"forcerm" : false ,
"nocache" : false ,
"remote" : "string" ,
"rm" : false
},
"capAdd" : "array[enum]" ,
"capDrop" : "array[enum]" ,
"cgroupParent" : "string" ,
"command" : [
"string1" ,
"...stringN"
],
"count" : 0 ,
"cpuCount" : 0 ,
"cpuPercent" : 0 ,
"cpuPeriod" : 0 ,
"cpuQuota" : 0 ,
"cpuSet" : "string" ,
"cpuSetMems" : "string" ,
"cpuShares" : 0 ,
"createIndex" : 0 ,
"created" : "date" ,
"dataVolumeMounts" : "map[reference[volume]]" ,
"dataVolumes" : [
"string1" ,
"...stringN"
],
"dataVolumesFrom" : "array[reference[container]]" ,
"dataVolumesFromLaunchConfigs" : [
"string1" ,
"...stringN"
],
"deploymentUnitUuid" : "string" ,
"description" : "string" ,
"devices" : [
"string1" ,
"...stringN"
],
"diskQuota" : 0 ,
"disks" : "array[virtualMachineDisk]" ,
"dns" : [
"string1" ,
"...stringN"
],
"dnsOpt" : [
"string1" ,
"...stringN"
],
"dnsSearch" : [
"string1" ,
"...stringN"
],
"domainName" : "string" ,
"entryPoint" : [
"string1" ,
"...stringN"
],
"environment" : {
"key" : "value-pairs"
},
"expose" : [
"string1" ,
"...stringN"
],
"externalId" : "string" ,
"extraHosts" : [
"string1" ,
"...stringN"
],
"firstRunning" : "date" ,
"groupAdd" : [
"string1" ,
"...stringN"
],
"healthCheck" : {
"healthyThreshold" : 0 ,
"initializingTimeout" : 0 ,
"interval" : 0 ,
"name" : "string" ,
"port" : 0 ,
"recreateOnQuorumStrategyConfig" : {
"quorum" : 0
},
"reinitializingTimeout" : 0 ,
"requestLine" : "string" ,
"responseTimeout" : 0 ,
"strategy" : "recreate" ,
"unhealthyThreshold" : 0
},
"healthCmd" : [
"string1" ,
"...stringN"
],
"healthInterval" : 0 ,
"healthRetries" : 0 ,
"healthState" : "enum" ,
"healthTimeout" : 0 ,
"hostId" : "reference[host]" ,
"hostname" : "string" ,
"id" : 0 ,
"imageUuid" : "string" ,
"instanceLinks" : "map[reference[instance]]" ,
"instanceTriggeredStop" : "stop" ,
"ioMaximumBandwidth" : 0 ,
"ioMaximumIOps" : 0 ,
"ip" : "string" ,
"ip6" : "string" ,
"ipcMode" : "string" ,
"isolation" : "string" ,
"kernelMemory" : 0 ,
"kind" : "container" ,
"labels" : {
"key" : "value-pairs"
},
"logConfig" : {
"config" : {
"key" : "value-pairs"
},
"driver" : "string"
},
"lxcConf" : {
"key" : "value-pairs"
},
"memory" : 0 ,
"memoryMb" : 0 ,
"memoryReservation" : 0 ,
"memorySwap" : 0 ,
"memorySwappiness" : 0 ,
"milliCpuReservation" : 0 ,
"mounts" : "array[mountEntry]" ,
"nativeContainer" : false ,
"netAlias" : [
"string1" ,
"...stringN"
],
"networkContainerId" : "reference[container]" ,
"networkIds" : "array[reference[network]]" ,
"networkLaunchConfig" : "string" ,
"networkMode" : "managed" ,
"oomKillDisable" : false ,
"oomScoreAdj" : 0 ,
"pidMode" : "enum" ,
"pidsLimit" : 0 ,
"ports" : [
"string1" ,
"...stringN"
],
"primaryIpAddress" : "string" ,
"primaryNetworkId" : "reference[network]" ,
"privileged" : false ,
"publishAllPorts" : false ,
"readOnly" : false ,
"registryCredentialId" : "reference[registryCredential]" ,
"removed" : "date" ,
"requestedHostId" : "reference[host]" ,
"requestedIpAddress" : "string" ,
"secrets" : "array[secretReference]" ,
"securityOpt" : [
"string1" ,
"...stringN"
],
"serviceIds" : "array[reference[service]]" ,
"shmSize" : 0 ,
"startCount" : 0 ,
"startOnCreate" : true ,
"state" : "enum" ,
"stdinOpen" : false ,
"stopSignal" : "string" ,
"storageOpt" : {
"key" : "value-pairs"
},
"sysctls" : {
"key" : "value-pairs"
},
"system" : false ,
"tmpfs" : {
"key" : "value-pairs"
},
"transitioning" : "enum" ,
"transitioningMessage" : "string" ,
"transitioningProgress" : 0 ,
"tty" : false ,
"ulimits" : "array[ulimit]" ,
"user" : "string" ,
"userPorts" : [
"string1" ,
"...stringN"
],
"userdata" : "string" ,
"usernsMode" : "string" ,
"uts" : "string" ,
"uuid" : "string" ,
"vcpu" : 1 ,
"version" : "0" ,
"volumeDriver" : "string" ,
"workingDir" : "string"
},
"previousLaunchConfig" : {
"accountId" : "reference[account]" ,
"blkioDeviceOptions" : "map[blkioDeviceOption]" ,
"blkioWeight" : 0 ,
"build" : {
"context" : "string" ,
"dockerfile" : "string" ,
"forcerm" : false ,
"nocache" : false ,
"remote" : "string" ,
"rm" : false
},
"capAdd" : "array[enum]" ,
"capDrop" : "array[enum]" ,
"cgroupParent" : "string" ,
"command" : [
"string1" ,
"...stringN"
],
"count" : 0 ,
"cpuCount" : 0 ,
"cpuPercent" : 0 ,
"cpuPeriod" : 0 ,
"cpuQuota" : 0 ,
"cpuSet" : "string" ,
"cpuSetMems" : "string" ,
"cpuShares" : 0 ,
"createIndex" : 0 ,
"created" : "date" ,
"dataVolumeMounts" : "map[reference[volume]]" ,
"dataVolumes" : [
"string1" ,
"...stringN"
],
"dataVolumesFrom" : "array[reference[container]]" ,
"dataVolumesFromLaunchConfigs" : [
"string1" ,
"...stringN"
],
"deploymentUnitUuid" : "string" ,
"description" : "string" ,
"devices" : [
"string1" ,
"...stringN"
],
"diskQuota" : 0 ,
"disks" : "array[virtualMachineDisk]" ,
"dns" : [
"string1" ,
"...stringN"
],
"dnsOpt" : [
"string1" ,
"...stringN"
],
"dnsSearch" : [
"string1" ,
"...stringN"
],
"domainName" : "string" ,
"entryPoint" : [
"string1" ,
"...stringN"
],
"environment" : {
"key" : "value-pairs"
},
"expose" : [
"string1" ,
"...stringN"
],
"externalId" : "string" ,
"extraHosts" : [
"string1" ,
"...stringN"
],
"firstRunning" : "date" ,
"groupAdd" : [
"string1" ,
"...stringN"
],
"healthCheck" : {
"healthyThreshold" : 0 ,
"initializingTimeout" : 0 ,
"interval" : 0 ,
"name" : "string" ,
"port" : 0 ,
"recreateOnQuorumStrategyConfig" : {
"quorum" : 0
},
"reinitializingTimeout" : 0 ,
"requestLine" : "string" ,
"responseTimeout" : 0 ,
"strategy" : "recreate" ,
"unhealthyThreshold" : 0
},
"healthCmd" : [
"string1" ,
"...stringN"
],
"healthInterval" : 0 ,
"healthRetries" : 0 ,
"healthState" : "enum" ,
"healthTimeout" : 0 ,
"hostId" : "reference[host]" ,
"hostname" : "string" ,
"id" : 0 ,
"imageUuid" : "string" ,
"instanceLinks" : "map[reference[instance]]" ,
"instanceTriggeredStop" : "stop" ,
"ioMaximumBandwidth" : 0 ,
"ioMaximumIOps" : 0 ,
"ip" : "string" ,
"ip6" : "string" ,
"ipcMode" : "string" ,
"isolation" : "string" ,
"kernelMemory" : 0 ,
"kind" : "container" ,
"labels" : {
"key" : "value-pairs"
},
"logConfig" : {
"config" : {
"key" : "value-pairs"
},
"driver" : "string"
},
"lxcConf" : {
"key" : "value-pairs"
},
"memory" : 0 ,
"memoryMb" : 0 ,
"memoryReservation" : 0 ,
"memorySwap" : 0 ,
"memorySwappiness" : 0 ,
"milliCpuReservation" : 0 ,
"mounts" : "array[mountEntry]" ,
"nativeContainer" : false ,
"netAlias" : [
"string1" ,
"...stringN"
],
"networkContainerId" : "reference[container]" ,
"networkIds" : "array[reference[network]]" ,
"networkLaunchConfig" : "string" ,
"networkMode" : "managed" ,
"oomKillDisable" : false ,
"oomScoreAdj" : 0 ,
"pidMode" : "enum" ,
"pidsLimit" : 0 ,
"ports" : [
"string1" ,
"...stringN"
],
"primaryIpAddress" : "string" ,
"primaryNetworkId" : "reference[network]" ,
"privileged" : false ,
"publishAllPorts" : false ,
"readOnly" : false ,
"registryCredentialId" : "reference[registryCredential]" ,
"removed" : "date" ,
"requestedHostId" : "reference[host]" ,
"requestedIpAddress" : "string" ,
"secrets" : "array[secretReference]" ,
"securityOpt" : [
"string1" ,
"...stringN"
],
"serviceIds" : "array[reference[service]]" ,
"shmSize" : 0 ,
"startCount" : 0 ,
"startOnCreate" : true ,
"state" : "enum" ,
"stdinOpen" : false ,
"stopSignal" : "string" ,
"storageOpt" : {
"key" : "value-pairs"
},
"sysctls" : {
"key" : "value-pairs"
},
"system" : false ,
"tmpfs" : {
"key" : "value-pairs"
},
"transitioning" : "enum" ,
"transitioningMessage" : "string" ,
"transitioningProgress" : 0 ,
"tty" : false ,
"ulimits" : "array[ulimit]" ,
"user" : "string" ,
"userPorts" : [
"string1" ,
"...stringN"
],
"userdata" : "string" ,
"usernsMode" : "string" ,
"uts" : "string" ,
"uuid" : "string" ,
"vcpu" : 1 ,
"version" : "0" ,
"volumeDriver" : "string" ,
"workingDir" : "string"
},
"previousSecondaryLaunchConfigs" : "array[secondaryLaunchConfig]" ,
"secondaryLaunchConfigs" : "array[secondaryLaunchConfig]" ,
"startFirst" : false
},
"toServiceStrategy" : {
"batchSize" : 1 ,
"finalScale" : 1 ,
"intervalMillis" : 2000 ,
"toServiceId" : "reference[service]" ,
"updateLinks" : false
}
} ' 'http://$ { RANCHER_URL } : 8080 /v 2 -beta/projects/$ { PROJECT_ID } /externalServices/$ { ID } ?action=upgrade'