You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/identity-server/5.10.0/docs/setup/deployment-guide.md
+108
Original file line number
Diff line number
Diff line change
@@ -251,7 +251,115 @@ WSO2 supports the following membership schemes for clustering
251
251
consume this docker image to
252
252
create a `Task Definition` and run a new `Service` or a `Task`
253
253
on the `AWS ECS cluster` that you created.
254
+
255
+
??? tip "Click to see the instructions for AWS EC2 membership scheme"
256
+
257
+
When WSO2 products are deployed in clustered mode on Amazon EC2 instances, it is recommended to use the AWS clustering mode. Open the `deployment.toml` file (stored in the `<IS_HOME>/repository/conf/` directory) and
258
+
do the following changes.
259
+
260
+
1. Apply the following configuration parameters and update the values for the server to enable AWS
261
+
clustering.
262
+
```toml
263
+
[clustering]
264
+
membership_scheme = "aws"
265
+
domain = "wso2.carbon.domain"
266
+
local_member_host = "10.0.21.80"
267
+
local_member_port = "5701"
268
+
```
269
+
The port used for communicating cluster messages has to be any port number between 5701 and 5800. The
270
+
local member host must be set to the IP address bound to the network interface used for communicating
271
+
with other members in the group (private IP address of EC2 instance).
272
+
273
+
2. Apply the following parameters to update the values to configure clustering properties.
274
+
```toml
275
+
[clustering.properties]
276
+
accessKey = "***"
277
+
secretKey = "***"
278
+
securityGroup = "security_group_name"
279
+
region = "us-east-1"
280
+
tagKey = "a_tag_key"
281
+
tagValue = "a_tag_value"
282
+
```
283
+
It's recommended to add all the nodes to the same security group. The AWS credentials and security
284
+
group depend on your configurations in the Amazon EC2 instance. The `tagKey` and `tagValue` are
285
+
optional and the rest of the above parameters are mandatory.
286
+
287
+
3. To provide specific permissions for creating an access key and secret key for only this AWS clustering attempt, use the custom policy block given below.
288
+
See the [AWS documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_managed-policies.html) for details on how to add the custom IAM policy.
289
+
Attach this to the user account that will operate AWS clustering in your WSO2 IS. The access key and secret key can only be used to list EC2 instance details in the AWS account.
290
+
```json
291
+
{ "Version": "2012-10-17",
292
+
"Statement":
293
+
[
294
+
{
295
+
"Effect": "Allow",
296
+
"Action":
297
+
[
298
+
"ec2:DescribeAvailabilityZones",
299
+
"ec2:DescribeInstances"
300
+
],
301
+
"Resource": [ "*" ]
302
+
}
303
+
]
304
+
}
305
+
```
306
+
307
+
??? tip "Click to see the instructions for Kubernetes membership scheme"
308
+
When WSO2 IS nodes are deployed in clustered mode on Kubernetes, the Kubernetes Membership Scheme enables automatic discovery of these servers. The Kubernetes Membership Scheme supports finding the pod IP
309
+
addresses using the Kubernetes API.
310
+
311
+
!!! note
312
+
We have updated clustering and adding the `kubernetes-membership-scheme-1.x.x.jar` is not required from update level **5.10.0.302** onwards (Updates 2.0 model). Additionally the usage of `membershipSchemeClassName`, `KUBERNETES_MASTER_SKIP_SSL_VERIFICATION`, and `USE_DNS` parameters are removed from the same update level onwards. See the instructions on [updating WSO2 products](https://updates.docs.wso2.com/en/latest/).
313
+
314
+
- If not already present, download and copy the [kubernetes-membership-scheme-1.x.x.jar](https://github.com/wso2/kubernetes-common/tags) to the `<IS_HOME>/repository/components/dropins/` directory.
315
+
316
+
- Configure the `<IS_HOME>/repository/conf/deployment.toml` file with the following configurations.
317
+
318
+
| Parameter | Description | Example |
319
+
|-----------|---------------|-----------|
320
+
| `membershipScheme` | This is the membership scheme that will be used to manage the membership of nodes in a cluster. | `kubernetes` |
321
+
| `local_member_host` | This is the member's hostname or IP address. Set it to the pod's local IP address. | `172.17.0.2` |
322
+
| `local_member_port` | This is the TCP port used by this member and through which other members will contact this member. | `4000` |
323
+
| `membershipSchemeClassName` | This is the class name of the membership scheme. Use `org.wso2.carbon.membership.scheme.kubernetes.KubernetesMembershipScheme`. | `org.wso2.carbon.membership.scheme.kubernetes.KubernetesMembershipScheme` |
324
+
| `KUBERNETES_NAMESPACE` | This is the Kubernetes Namespace in which the pods are deployed. | `wso2-is` |
325
+
| `KUBERNETES_SERVICES` | These are the Kubernetes Services that belong in the cluster. | `wso2is-service` |
326
+
| `KUBERNETES_MASTER_SKIP_SSL_VERIFICATION` | This defines whether the SSL certificate verification of the Kubernetes API should be carried out or not. | `true` |
327
+
| `USE_DNS` | This configures the membership scheme to use Kubernetes API for pod IP resolution. Set this to false. | `false` |
- In order to retrieve the pod IP address information from the Kubernetes api server, the Kubernetes
344
+
membership scheme uses the pod's service account. Hence, the pods need to be associated with a service
345
+
account that has permission to read the "endpoints" resource. Make sure the role you bind has the following permissions.
346
+
```toml
347
+
rules:
348
+
- apiGroups: [""]
349
+
verbs: ["get", "list"]
350
+
resources: ["endpoints"]
351
+
```
254
352
353
+
- Optionally, a Kubernetes token or basic authentication can be used to authenticate with the Kubernetes api server.
354
+
The following properties can be set under `[clustering.properties]` accordingly.
355
+
- `KUBERNETES_API_SERVER`: This is the Kubernetes API endpoint,e.g., `http://172.17.8.101:8080`. Alternatively, an https endpoint can be set via `KUBERNETES_SERVICE_HOST` and
356
+
`KUBERNETES_SERVICE_PORT_HTTPS`.
357
+
- `KUBERNETES_SERVICE_HOST`: This is the Kubernetes API hostname or IP address, e.g.,
358
+
`kuberneteshostname`.
359
+
- `KUBERNETES_SERVICE_PORT_HTTPS`: This is the Kubernetes API https listening port. This must be an
360
+
integer value.
361
+
- `KUBERNETES_API_SERVER_TOKEN`: This is the Kubernetes Master token for authentication (optional),
0 commit comments