1.9. Terminate Instances


Terminating EC2 instances

Terminating an EC2 compute instance means that the instance is completely destroyed and the hardware resources are returned to the pool. In contrast, stopping an instance (which is possible for some machine images) merely shuts down the processes running on the instance, preserving any data and software on the instance.
You can use either of the following approaches to terminate instances on Amazon EC2:
Important
You should always terminate instances when you are finished with them, in order to minimize usage charges. Stopping an instance is not the same as terminating an instance

Terminate individual instances

The cleanest way to terminate an individual compute instance is to use the fabric:container-delete console command—for example:
JBossFuse:karaf@root> fabric:container-delete mqserver2
The advantage of this command is that all of the corresponding entries in the Fabric Registry are cleaned up, before the container's compute instance is terminated.

Terminate all containers

You can quickly terminate all of your compute instances on the EC2 cloud using the jclouds:node-destroy-all command, as follows:
JBossFuse:karaf@root> jclouds:node-destroy-all
Note
This example assumes that your entire fabric is hosted in the cloud, so that you do not need to worry about the consistency of registry entries when you delete it. This approach would not be appropriate, however, if you have a fabric that overlaps with host machines outside the cloud.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.