Teflo Output

Data Folder

When you call teflo, all runtime files, logs, artifacts, etc get stored within a data folder. By default teflo sets the base data folder as the /tmp directory. This can be overridden by either the command line option or within the teflo.cfg. Each teflo run creates a unique data folder for that specific run. This unique data folder is stored at the parent data folder mentioned above. With having this unique data folder per teflo run. It allows you to keep those logs for that specific run for historical purposes. These unique data folders are based on a UUID. You must be thinking, how can I reference a data folder to my given run? To help easily find the last execution data folder, teflo provides an additional folder for easily accessing this. At the end of each teflo run, a new directory named .results will be created at the data folder you supplied to teflo. This directory is a exact copy of the data folder for the last given teflo run. It allows you to easily access the last runs files.

Results File

Each time you call teflo, you supply it a scenario descriptor file. This file tells teflo exactly what it should do. After teflo finishes running the task it was supplied with it needs to potentially update the scenario descriptor file with additional information from that given run. Instead of modifying the input file, teflo creates a new scenario descriptor file (an exact copy of the input one) just with additional information from the run. For example: the provision task finishes and has additional data about the host machines created. The results file would include this additional data returned back from the provision task. This file is stored in the data folder .results directory named {scenario descriptor file name without file extension}_results.yml. This allows users to continue executing teflo tasks if run individually. It eliminates the need for restarting the entire scenario from the beginning.

Below is an example emphasizing on the additional data added back to the scenario descriptor file after a successful provision task run:

...
name: ffdriver
provider:
  credential: openstack
  flavor: m1.small
  floating_ip_pool: <definied ip pool>
  hostname: ffdriver_l3zqh
  image: rhel-7.5-server-x86_64-released
  keypair: pit-jenkins
  name: openstack
  networks:
  - pit-jenkins
  node_id: 4beb3789-1e61-4f7c-bf9e-722ed480b280
ip_address: 10.8.249.2
...

Included Scenario Results File

If include section is present in the scenario file and it has a valid scenario descriptor file, then on a teflo run there will be an additional results file for this included scenario with its filename(without file extension) in the prefix. e.g. common_results.yml will be the name of the results file for included scenario with file name common.yml. This allows the users to use this common_results.yml file and include it in other scenarios as needed, reducing the execution time and code duplication. The included scenario results file is also located in the .results folder where results.yml is stored

Results Folder

As mentioned above in the data folder section, at the end of each teflo run a .results directory is created with the latest results for a given run. You will find a variety of directories/files here. Lets go over some of the common ones you will see.

Note

Each teflo task can produce different files that will be archived in the results directory. For example: when running the orchestrate task you would see an inventory directory created along with an ansible log. During the execute task you would see a directory for artifacts containing results produced from automated test suites.

.results/
├── artifacts
│   ├── client-a
│   │   ├── suite1_results.xml
│   │   └── suite2_results.xml
│   └── client-b
│       ├── suite1_results.xml
│       └── suite2_results.xml
├── inventory
│   └── inventory_uuid
├── logs
│   ├── ansible_executor
│   │   └── ansible.log
│   └── ansible_orchestrator
│       └── ansible.log
├──  <scenaio_filename_without_file_extension>_results.yml
└──  results.yml

Name

Description

Type

artifacts

A directory containing all artifacts generated by the given tests stored in sub directories named by the test machine they were fetched from.

Directory

inventory

A directory where all ansible inventory files are stored for the given run.

Diretory

logs

A directory where all log files are stored from the run. Logs here consist of teflo runtime logs, ansible logs, etc.

Directory

ansible_orchestrator

The directory under logs directory where ansible logs related to orchestrate actionsare stored

Directory

ansible_executor

The directory under logs directory where ansible logs related to execute tasks are stored

Directory

<scenaio_filename_without_file_extension>_results.yml

The updated scenario descriptor file(s) (created by teflo). This file can be used to pick up where you left off with teflo. You can easily run another task with this given file. It removes the need from starting a whole run over from the beginning.

File

results.yml

The updated scenario descriptor file (created by teflo).

File

Note

TEFLO_DATA_FOLDER, TEFLO_RESULTS_FOLDER, TEFLO_WORKSPACE are TEFLO environmental variables that are made available during a teflo run. They provide the absolute path for the data folder, results folder and workspace respectively