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: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,25 @@ in this project. The frequency of node rotations is passed into the template as
28
28
### Running Manually
29
29
Sometimes it's useful to rotate an ES node manually (e.g. during an ES upgrade), you can optionally pass a `targetInstanceId` in the step function input object. It's usually easiest to open an existing execution and click `New Execution` then just edit the input object.
30
30
31
+
### Rotating nodes into a new ASG
32
+
33
+
Very occasionally, it is required to migrate a cluster into a new Autoscaling Group. To do this with the node rotation step function by:
34
+
35
+
1. Follow the setup steps above.
36
+
1. Create the new ASG with DesiredCapacity set to 0.
37
+
1. Set the MinimumCapacity of the old ASG to 0.
38
+
1. Tag the new ASG with `gu:riffraff:new-asg = True`. (This is the tag that is already used by riff-raff for identifying the newer ASG during migrations).
39
+
1. Run as normal, either manually or letting the schedule rotate the instances.
40
+
41
+
The step function will detect and launch new instances in the new ASG, while removing nodes from the old ASG.
42
+
43
+
> [!WARNING]
44
+
> This feature has been developed and tested for Elasticsearch clusters which exist in a single ASG, and the "new" ASG can be
45
+
> matched to the "old" one using Stage/Stack/App tags. If your usecase doesn't match this, you'll likely need to do some more testing
46
+
> and possibly improve this feature. If you're at all unsure, get in touch in the Elasticsearch chat space and we can figure out
47
+
> any potential issues together.
48
+
49
+
31
50
## Implementation
32
51
33
52
This Step Function triggers a number of TypeScript lambdas, which coordinate the process of replacing a node by:
// TODO it would be nice to not need the Tags on the instances as well, but currently used in the ElasticsearchAdminSsmPolicy IAM policy in cloudformation.yaml
0 commit comments