SAP Sailing Analytics Webservices API Version 1.0

URL: /sailinglandscape/api/landscape/movemastertootherinstance

Description:

Moves a replica set's master process to another instance. For this, all {@link ApplicationReplicaSet#getReplicas() replicas} will stop replicating the current master and the current master is de-registered from the two target groups. Then, if necessary, a new (shared or dedicated) instance is launched if no existing eligible shared instance is found in case {@code useSharedInstance} is {@code true}. The new master process is deployed and launched on the instance and if ready will be registered with the two target groups again. Then, all replicas are re-started in place one after the other, always keeping the master and n-1 replicas available for reading if n was the original number of replicas in the set at the time the method was called.


Webservice Type: POST
Output format: json
Mandatory query parameters:
regionId, region where to set up the replica set, e.g., eu-west-1
replicaSetName, name of the replica set; used as the hostname to which the domain name is appended, as well as for the database and RabbitMQ exchange name
privateKeyEncryptionPassphrase, the pass phrase to decrypt the private key for the key specified by the keyName parameter
Optional form parameters:
sharedMasterInstance, defaults to false; if true, the new master will be deployed to a shared instance.
hostId, AWS instance ID of a shared instance to deploy the new master processes on. Only relevang if sharedMasterInstance is set to true.
instanceType, AWS instance type, such as I3_LARGE, that is used in case a new instance must be started to accomodate the new master process. This can be the case if sharedMasterInstance is false and hence a new dedicated instance must be launched, or if moving to a shared instance is requested and no eligible instance has been specified and none could be found.
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.
masterReplicationBearerToken, the bearer token the new replica set's master will use to replicate the security service and shared sailing data from the central security-service.sapsailing.com server; defaults to the bearer token of the user authenticated for this request. Note that this requires the server processing this request to share the security information from security-service.sapsailing.com, too.
replicaReplicationBearerToken, the bearer token the new replica set's replicas will use to replicate their master server; defaults to the bearer token of the user authenticated for this request. Note that this requires the server processing this request to share the security information from security-service.sapsailing.com, too.
memoryInMegabytes, can be used to specify the absolute amount of heap size used for the Java VM running the applications, both, on master and replicas; if not specified, memoryTotalSizeFactor may be used (see below); if that isn't used either, heap size is computed based on the amount of memory available on the instance, not considering any swap space available.
memoryTotalSizeFactor, can be used if memoryInMegabytes is not used; it roughly specifies how many processes are intended to be run on the host; e.g., if 4 is specified, approximately 1/4 of the physical memory available (not considering swap space) is assigned as the process's heap space. If neither memoryInMegabytes nor memoryTotalSizeFactor are specified then the amount of memory is calculated automatically based on the amount of physical memory available on the host.
timeoutInMilliseconds, timeout in milliseconds to wait for responses from nodes when analyzing the replica sets existing in the region; if not specified, a typical default for waiting for process responses will be used.
Request method: POST
Example: curl -X POST -d 'regionId=eu-west-2' -d 'replicaSetName=mynewevent' -d 'keyName=Horst' --data-urlencode 'privateKeyEncryptionPassphrase=HorstsSuperSecretPassword' -H 'Authorization: Bearer RwGK+DV38LKjeuDu+Bx87/3blLJHD7Ff+NCLeud9nRQ=' "https://sapsailing.com/sailinglandscape/api/landscape/movemastertootherinstance"
produces output:
            {
              "name": "mynewevent",
              "version": "build-202112151552"
            }
        
Back to Web Service Overview