Files
sailing-analytics/java/com.sap.sailing.landscape.gateway/webservices/api/movemastertootherinstance.html
T

96 lines
6.7 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href='../../../../sailing-fontface-1.0.cache.css' media='screen' rel='stylesheet' title='Default stylesheet' type='text/css' />
<link href='../../../main.css' media='screen' rel='stylesheet' title='Default stylesheet' type='text/css' />
<link rel='icon' href='../../../../sap.ico' type='image/x-icon'>
<title>SAP Sailing Analytics Webservices API Version 1.0</title>
</head>
<body>
<h1>SAP Sailing Analytics Webservices API Version 1.0</h1>
<h2>URL: /sailinglandscape/api/landscape/movemastertootherinstance</h2>
<b>Description:</b>
<p> 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.
</p>
<br />
<table>
<tr>
<td>Webservice Type:</td>
<td>POST</td>
</tr>
<tr>
<td>Output format:</td>
<td>json</td>
</tr>
<tr>
<td>Mandatory query parameters:</td>
<td>
<div><tt>regionId</tt>, region where to set up the replica set, e.g., eu-west-1</div>
<div><tt>replicaSetName</tt>, 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</div>
<div><tt>privateKeyEncryptionPassphrase</tt>, the pass phrase to decrypt the private key for the key specified by the keyName parameter</div>
</td>
</tr>
<tr>
<td>Optional form parameters:</td>
<td>
<div><tt>sharedMasterInstance</tt>, defaults to <tt>false</tt>; if <tt>true</tt>, the new master will be deployed
to a shared instance.</div>
<div><tt>hostId</tt>, AWS instance ID of a shared instance to deploy the new master processes on. Only relevang if
<tt>sharedMasterInstance</tt> is set to <tt>true</tt>.</div>
<div><tt>instanceType</tt>, AWS instance type, such as <tt>I3_LARGE</tt>, that is used in case a new instance must
be started to accomodate the new master process. This can be the case if <tt>sharedMasterInstance</tt>
is <tt>false</tt> 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.</div>
<div><tt>keyName</tt>, 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.</div>
<div><tt>masterReplicationBearerToken</tt>, 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.</div>
<div><tt>replicaReplicationBearerToken</tt>, 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.</div>
<div><tt>memoryInMegabytes</tt>, 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.</div>
<div><tt>memoryTotalSizeFactor</tt>, 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.</div>
<div><tt>timeoutInMilliseconds</tt>, 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.</div>
</td>
</tr>
<tr>
<td>Request method:</td>
<td>POST</td>
</tr>
<tr>
<td>Example:</td>
<td>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"
<br>
produces output:<pre>
{
"name": "mynewevent",
"version": "build-202112151552"
}
</pre>
</td>
</tr>
</table>
<div style="height: 1em;"></div>
<a href="index.html">Back to Web Service Overview</a>
</body>
</html>