Skip to content

Command line arguments

Jjk422 edited this page Sep 1, 2016 · 10 revisions

Table of Contents

Simple usage
Main arguments
Optional arguments
Main commands
In development

Simple usage

   ruby SecGen.rb [--options] <command>

Main arguments

   OPTIONS:
   --scenario [xml file], -s [xml file]: set the scenario to use
              (defaults to the default scenario)
   --project [output dir], -p [output dir]: directory for the generated project
              (output will default to the default output directory set via --output-dir) <-- Create --output-dir argument

Optional arguments

   OPTIONS:
   --gui-output: set the vms to spawn to the screen
              (defaults to false for headless/server environments)
   --memory-per-vm [amount of memory]: set the amount of ram to be designated to each machine
              (cannot be set with --total-memory)
   --total-memory [total amount of memory]: set the total/maximum amount of ram to be designated to all machines
              (cannot be set with --memory-per-vm)
   --max-cpu-cores [number of processors]: set the maximum amount of virtual processors
              (usually should not be greater then half the number of virtual processors)
   --max-cpu-usage [max cpu usage]: set the maximum usage of each processor running on the virtual machine
              (number from 0-100, default will be set to 100%)

Main commands

command
   --help, -h: shows this usage information

   COMMANDS:
   run, r: builds project and then builds the VMs
   build-project, p: builds project (vagrant and puppet config), but does not build VMs
   build-vms [/project/dir], v [project #]: builds VMs from a previously generated project
              (use in combination with --project [dir])

In development

OPTIONS:  
 --output-dir [output dir]: directory to place all puppet and vagrant output files into
 --validate-scenario [xml file]: validates the given xml file against the scenario schema, any errors are displayed so they can be corrected
 --validate-module [module path]: spins up the given module on a test virtual machine to make sure it functions as desired