Disassociate a Node from an AWS OpsWorks for Chef Automate Server - AWS OpsWorks

Disassociate a Node from an AWS OpsWorks for Chef Automate Server

Important

AWS OpsWorks for Chef Automate reached end of life on May 5, 2024 and has been disabled for both new and existing customers. We recommend that existing customers migrate to Chef SaaS or an alternative solution. If you have questions, you can reach out to the AWS Support Team on AWS re:Post or through AWS Premium Support.

This section describes how to disassociate, or remove, a managed node from management by an AWS OpsWorks for Chef Automate server. This operation is performed on the command line; you cannot disassociate nodes in the AWS OpsWorks for Chef Automate management console. Currently, the AWS OpsWorks for Chef Automate API does not allow for batch removal of multiple nodes. The command in this section disassociates one node at a time.

We recommend that you disassociate nodes from a Chef server before you delete the server, so that the nodes continue to operate without trying to reconnect with the server. To do this, run the disassociate-node AWS CLI command.

To disassociate nodes
  1. In the AWS CLI, run the following command to disassociate nodes. Node_name is the name of the node that you want to disassociate; for Amazon EC2 instances, this is the instance ID. Server_name is the name of the Chef server from which you want to disassociate the node. --engine-attributes specifies your default CHEF_AUTOMATE_ORGANIZATION name. All three of these parameters are required.

    The --region parameter is not required unless you want to disassociate a node from a Chef server that is not in your default region.

    aws opsworks-cm --region Region_name disassociate-node --node-name Node_name --server-name Server_name --engine-attributes "Name=CHEF_AUTOMATE_ORGANIZATION,Value='default'"

    The following command is an example.

    aws opsworks-cm --region us-west-2 disassociate-node --node-name i-0010zzz00d66zzz90 --server-name opsworkstest --engine-attributes "Name=CHEF_AUTOMATE_ORGANIZATION,Value='default'"
  2. Wait until a response message indicates that the disassociation is finished.

    After you successfully disassociate a node from an AWS OpsWorks for Chef Automate server, it might still be visible in the Chef Automate dashboard. By default, Chef enforces a retention period for node state information, and purges the node automatically after a few days.

For more information about how to delete an AWS OpsWorks for Chef Automate server, see Delete an AWS OpsWorks for Chef Automate Server.

The following AWS blog posts offer more information about automatically associating nodes with your Chef Automate server, by using Auto Scaling groups, or within multiple accounts.