
Answer-first summary for fast verification
Answer: Use AWS OpsWorks Stacks to layer the server nodes of that cluster. Create a Chef recipe that populates the content of the /etc/cluster/nodes.config file and restarts the service by using the current members of the layer. Assign that recipe to the Configure lifecycle event.
The best solution to automate the task of adding new nodes to the cluster is to use AWS OpsWorks Stacks with a Chef recipe. This approach allows you to manage the server nodes of the cluster by defining a recipe that updates the /etc/cluster/nodes.config file and restarts the service using the current members of the layer. By assigning the recipe to the Configure lifecycle event, AWS OpsWorks ensures that any changes in the cluster's configuration are automatically applied. This method is highly effective and aligns well with AWS best practices for configuration management and automation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company requires automation for managing the addition of new nodes to their proprietary enterprise in-memory data store cluster on AWS. The cluster operates on multiple Linux-based server nodes and necessitates a complete reconfiguration upon any node addition or removal. This reconfiguration involves updating the /etc/cluster/nodes.config file with the current node members' IP addresses. What solution can a DevOps engineer propose to automate this process?
A
Use AWS OpsWorks Stacks to layer the server nodes of that cluster. Create a Chef recipe that populates the content of the /etc/cluster/nodes.config file and restarts the service by using the current members of the layer. Assign that recipe to the Configure lifecycle event.
B
Put the file nodes.config in version control. Create an AWS CodeDeploy deployment configuration and deployment group based on an Amazon EC2 tag value for the cluster nodes. When adding a new node to the cluster, update the file with all tagged instances, and make a commit in version control. Deploy the new file and restart the services.
C
Create an Amazon S3 bucket and upload a version of the /etc/cluster/nodes.config file. Create a crontab script that will poll for that S3 file and download it frequently. Use a process manager, such as Monit or systemd, to restart the cluster services when it detects that the new file was modified. When adding a node to the cluster, edit the file’s most recent members. Upload the new file to the S3 bucket.
D
Create a user data script that lists all members of the current security group of the cluster and automatically updates the /etc/cluster/nodes.config file whenever a new instance is added to the cluster.