5.3. Running PackStack Non-interactively

PackStack supports being run non-interactively. When you run the packstack command non-interactively you must provide your configuration options via a text file, referred to as an answer file, instead of via standard input.
To do this you must:
  • Use PackStack to generate a default answer file.
  • Edit the answer file inserting your desired configuration values.
  • Run the packstack command providing the completed answer file as a command line argument.
PackStack will then attempt to complete the deployment using the configuration options provided in the answer file.

Important

Red Hat Enterprise Linux OpenStack Platform requires that each system in the OpenStack environment is running Red Hat Enterprise Linux Server and that all systems are signed up to receive updates from Red Hat Network using Subscription Manager.
See Section 2.1.2.2, “Register to Red Hat Network” for information on registering to Red Hat Network.
  • You can ssh into each node and register it, attach an OpenStack subscription, and enable the required OpenStack repository. This will allow PackStack to install OpenStack on each node.
  • Alternatively, you can get PackStack to generate an answer file, then edit the answer file to contain your Red Hat subscription username and password, using the parameters CONFIG_RH_USER and CONFIG_RH_PW. Running PackStack with this answer file configures each node to receive updates from Red Hat Network using Subscription Manager. This will allow PackStack to install OpenStack on each node.

5.3.1. Generating a PackStack Answer File

PackStack is able to generate a generic answer file which you are then able to customize to suit your specific deployment needs.

Procedure 5.4. Generating a PackStack Answer File

  • Run the packstack command with the --gen-answer-file=FILE argument to generate an answer file. Replace FILE with the name of the file you wish to use to store the answer file.
    # packstack --gen-answer-file=FILE

    Example 5.5. Generating a PackStack Answer File

    In this example, a PackStack answer file is generated and saved to the file ~/answers.cfg.
    # packstack --gen-answer-file=~/answers.cfg
You have successfully generated an answer file and are ready to begin customizing it for your deployment.