Skip to main content

Generate deployment files

Use cradle.sh to compile a scenario and create provider-specific deployment files without starting virtual machines.

Command

Run the command from the CRADLE project root:

$ ./cradle.sh <scenario> [provider]

The scenario argument is the filename without .cradle. For example:

$ ./cradle.sh MyScenario libvirt

This reads files/input/MyScenario.cradle.

Provider names

ArgumentEffective providerGenerated directory name
omitted, libvirt, or locallibvirtDeployment_For_local
virtualbox or vboxVirtualBoxDeployment_For_virtualbox
sphereSPHEREDeployment_For_sphere

The local directory name is retained for compatibility with existing libvirt workflows.

What CRADLE generates

The compiler first writes:

files/output/<scenario>.yml

The assembler then writes:

assembler/bin/output/<scenario>/
└── Deployment_For_<testbed>/
└── <scenario>-experiment/
└── localhost/

Local deployment directories commonly contain a Vagrantfile, inventory, bootstrap scripts, and Ansible material. The exact files depend on the scenario and provider.

Review the result

For a libvirt scenario named MyScenario:

$ ls files/output/MyScenario.yml
$ cd assembler/bin/output/MyScenario/Deployment_For_local/MyScenario-experiment/localhost
$ ls
$ vagrant validate

vagrant validate requires Vagrant and the selected provider to be installed. It checks the generated Vagrant configuration but does not start the VMs.

Generated files are build output. Make durable changes in the source scenario or supported configuration rather than editing generated files that can be replaced during the next generation.

Generation failure messages

MessageCheck
A scenario name is requiredPass the basename without .cradle.
Unsupported providerUse libvirt, virtualbox, or sphere.
Python executable not foundActivate the Python environment.
CRADLE compilation failedReview syntax, block terminators, values, and references.
Deployment generation failedReview intermediary YAML and provider compatibility.

Next step

When generation succeeds and the files have been reviewed, continue to Deploy an environment.