diff --git a/utils/chaos_recommender/README.md b/utils/chaos_recommender/README.md index c7de815e..1d1b0061 100644 --- a/utils/chaos_recommender/README.md +++ b/utils/chaos_recommender/README.md @@ -7,8 +7,8 @@ This tool profiles an application and gathers telemetry data such as CPU, Memory ## Pre-requisites - Openshift Or Kubernetes Environment where the application is hosted -- Access to the telemetry data via the exposed Prometheus endpoint -- Python3 +- Access to the metrics via the exposed Prometheus endpoint +- Python3.9 ## Usage @@ -22,14 +22,14 @@ This tool profiles an application and gathers telemetry data such as CPU, Memory $ pip3 install -r requirements.txt Edit configuration file: $ vi config/recommender_config.yaml - $ python3.9 utils/chaos_recommender/chaos_recommender.py + $ python3.9 utils/chaos_recommender/chaos_recommender.py -c utils/chaos_recommender/recommender_config.yaml ``` 2. Follow the prompts to provide the required information. ## Configuration To run the recommender with a config file specify the config file path with the `-c` argument. -You can customize the default values by editing the `krkn/config/recommender_config.yaml` file. The configuration file contains the following options: +You can customize the default values by editing the `recommender_config.yaml` file. The configuration file contains the following options: - `application`: Specify the application name. - `namespaces`: Specify the namespaces names (separated by coma or space). If you want to profile @@ -115,6 +115,6 @@ You can customize the thresholds and options used for data analysis and identify ## Additional Files -- `config/recommender_config.yaml`: The configuration file containing default values for application, namespace, labels, and kubeconfig. +- `recommender_config.yaml`: The configuration file containing default values for application, namespace, labels, and kubeconfig. Happy Chaos! diff --git a/utils/chaos_recommender/recommender_config.yaml b/utils/chaos_recommender/recommender_config.yaml new file mode 100644 index 00000000..dc23c3ac --- /dev/null +++ b/utils/chaos_recommender/recommender_config.yaml @@ -0,0 +1,35 @@ +application: openshift-etcd +namespaces: openshift-etcd +labels: app=openshift-etcd +kubeconfig: ~/.kube/config.yaml +prometheus_endpoint: +auth_token: +scrape_duration: 10m +chaos_library: "kraken" +log_level: INFO +json_output_file: False +json_output_folder_path: + +# for output purpose only do not change if not needed +chaos_tests: + GENERIC: + - pod_failure + - container_failure + - node_failure + - zone_outage + - time_skew + - namespace_failure + - power_outage + CPU: + - node_cpu_hog + NETWORK: + - application_outage + - node_network_chaos + - pod_network_chaos + MEM: + - node_memory_hog + - pvc_disk_fill + +threshold: .7 +cpu_threshold: .5 +mem_threshold: .5