Deleting a Heat stack

To delete a running Heat stack we will make a simple call as shown in this recipe.

Getting ready

Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment. Refer to Chapter 2, The OpenStack Client for details of setting up your environment to use OpenStack.

How to do it...

In this section, we'll show how to delete a stack.

  1. To delete a running stack named myStack, issue the following command:
    openstack stack delete myStack
    
  2. You will be prompted to confirm this deletion, as shown here. Type y to continue destroying the stack:
    How to do it...
  3. You can check on the status of the deletion by listing the created stacks:
    openstack stack list
    

    This will bring back an empty list if there is no stack to show or the following during deletion:

    How to do it...

How it works...

In very much the same way that we can launch a stack easily, deleting one is achieved by simply specifying which stack we want to destroy and using the stack delete command.

If you prefer to destroy a stack without confirmation, use the following syntax:

openstack stack delete nameOfStack -y
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.145.109