Moves all application processes (masters and replicas) currently running on a given shared "multi-instance" host to another (newly launched, if necessary) shared instance, so that the original host can be freed up, e.g., for termination or maintenance. The source host must be a multi-instance host intended for sharing, indicated by the tag value ___multi___ on its sailing-analytics-server tag; otherwise the operation is rejected. Replicas are moved by launching a replacement on the new host, adding it to its target group once healthy and then removing the old one. Moving a master is more intrusive: it is de-registered from its target groups and re-deployed on the new host. Because moving a master interrupts a race being tracked live on it, masters serving live content are protected by default; see the forceReplicaSet parameter below.
| Webservice Type: | POST |
| Output format: | json |
| Mandatory query parameters: |
regionId, region where the host is located, e.g., eu-west-1
instanceId, the AWS instance ID of the shared multi-instance host to move all application processes away from
|
| Optional form parameters: |
instanceType, AWS instance type, such as I3_2_XLARGE, to use in case a new instance must be launched
to accommodate the moved processes. If not specified, the new instance uses the same instance type as the
host the processes are moved away from.
keyName, the name of the SSH key to use; must identify an existing SSH key by that name in the region specified
and will be used to log on to existing and new instances using a root ssh connection. If not specified, the
key used to launch an instance will be used for trying to connect to it, and a private key with matching name
for the respective region will be looked up.
privateKeyEncryptionPassphrase, the pass phrase to decrypt the private key for the key specified by the keyName parameter
forceReplicaSet, the name of a replica set whose master should be moved even if it currently serves
live content, that is, a race that is being tracked live. This parameter may be repeated to name
several replica sets (e.g., -d 'forceReplicaSet=alpha' -d 'forceReplicaSet=beta'). Before any master
is moved, each affected master whose replica set is not named here is checked for live content; if
any such replica set is found to have live content, no master is moved and the service responds with HTTP
status 409 Conflict and a JSON body describing the offending replica set(s), events and races (the
body has the same structure as the response of the
live-content service). Naming a
replica set here skips that safety check for it and forces its master to be moved regardless of any live
content, knowingly accepting the disruption of any live tracking on it. Unlike the force flag of the
other landscape services, this parameter is per replica set rather than a single boolean, because this
operation may affect the masters of several replica sets at once.
|
| Request method: | POST |
| Example: | curl -X POST -d 'regionId=eu-west-2' -d 'instanceId=i-0123456789abcdef0' -d 'keyName=Horst' --data-urlencode 'privateKeyEncryptionPassphrase=HorstsSuperSecretPassword' -H 'Authorization: Bearer RwGK+DV38LKjeuDu+Bx87/3blLJHD7Ff+NCLeud9nRQ=' "https://sapsailing.com/sailinglandscape/api/landscape/moveallapplicationprocessesawayfrom" produces output (the masterProcessesMoved and replicaProcessesMoved arrays list the moved processes by their replica set name):
{
"newHostId": "i-0fedcba9876543210",
"masterProcessesMoved": [
{ "replicaSetName": "alpha", "port": 8080 }
],
"replicaProcessesMoved": [
{ "replicaSetName": "beta", "port": 8081 }
]
}
|