6.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.

6.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 6.3. 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.
    $ sudo packstack --gen-answer-file=FILE

    Example 6.4. Generating a PackStack Answer File

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