chaostoolkit / chaostoolkit

Chaos Engineering Toolkit & Orchestration for Developers

Home Page:https://chaostoolkit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to see -var-file options

saiyantanghosh opened this issue · comments

Describe the bug
When I am trying to run experiment using --var-file to get and replace environment configurations , but it is not working . Below is sample command and files

chaos --var-file config.json run experiment.json

config.json
{ "configuration": { "CLUSTER" : "testcluster" } }

experiment.json

{ "title": "Testing", "description": "Perform failure", "configuration": { "cluster_name": { "type": "env", "key": "CLUSTER" } }, "steady-state-hypothesis": { }, "method": [ { } ], "rollbacks": [ ] }

Runtime versions
Please run:

$ python --version
Python 3.7.10
$ chaos info core
NAME                VERSION
CLI                 1.12.0
Core library        1.28.0

$ chaos info extensions

No info

To Reproduce
Steps to reproduce the behavior.

Expected behavior
As per documentation , --var-file filepath.json|yaml|.env option can be used for externalize configurations and setting values.

Additional context
Add any other context about the problem here.

I think the --var-file is on the run command. But I think more importantly, your config is wrong.

It should be

{ "configuration": { "cluster_name" : "testcluster" } }

@Lawouach Thanks for reply. Now It is working . Also --var-file is not working with "type" : "env" configuration key .