content: extend = [
      { path = "make/common.toml" },
      { path = "make/minio.toml" },
      { path = "make/jaeger.toml" },
      { path = "make/prometheus.toml" },
      { path = "make/grafana.toml" },
  ]
  
  [env]
  RUST_BACKTRACE = 1
  CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
  
  [config]
  skip_core_tasks = true
  
  [tasks.clean-all]
  category = "Misc"
  description = "Clean all downloaded binaries by deleting .run folder."
  dependencies = ["prepare"]
  script = '''
  #!@duckscript
  rm -rf "${PREFIX}"
  '''
  
  [tasks.clean-data]
  category = "Misc"
  description = "Clean data by deleting files in .run/data and ./run/log folder."
  dependencies = ["prepare"]
  script = '''
  #!/bin/bash
  set -e
  rm -rf "${PREFIX_DATA}"
  rm -rf "${PREFIX_LOG}"
  '''
  
  [tasks.d]
  alias = "dev"
  
  [tasks.dev]
  category = "Develop"
  description = "Start development envirorment."
  dependencies = ["pre-dev", "setup-minio"]
  script = '''
  #!@duckscript
  echo success
  '''
  
  [tasks.pre-dev]
  category = "Develop"
  description = "Downloads necessary tools and build required components."
  dependencies = [
      "clean-data",
      "download-minio",
      "download-mcli",
      "download-jaeger",
      "download-prometheus",
      "download-grafana",
  ]
  script = '''
  #!/bin/bash
  # run minio
  tmux new -d -s runkv-minio ${PREFIX_BIN}/minio server --address 0.0.0.0:9000 --console-address 0.0.0.0:9090 ${PREFIX_DATA}
  # run jaeger
  tmux new -d -s runkv-jaeger ${PREFIX_BIN}/jaeger
  # run prometheus
  tmux new -d -s runkv-prometheus ${PREFIX_BIN}/prometheus/prometheus --config.file=etc/prometheus.yml --web.listen-address=0.0.0.0:9091 --storage.tsdb.path=${PREFIX_DATA}/prometheus-data
  # run grafana
  tmux new -d -s runkv-grafana ${PREFIX_BIN}/grafana/bin/grafana-server -homepath .run/bin/grafana -config etc/grafana.ini
  sleep 2
  '''
  
  [tasks.setup-minio]
  category = "Misc"
  description = "Clean minio data with mcli."
  dependencies = ["prepare"]
  script = '''
  #!/bin/bash
  set -e
  ${PREFIX_BIN}/mcli alias set local http://127.0.0.1:9000 minioadmin minioadmin
  ${PREFIX_BIN}/mcli mb --quiet local/test
  '''
  
  [tasks.k]
  alias = "kill"
  
  [tasks.kill]
  category = "Develop"
  description = "Kill development environment."
  script = '''
  #!/bin/bash
  tmux send-keys -t runkv-minio C-c
  tmux send-keys -t runkv-jaeger C-c
  tmux send-keys -t runkv-prometheus C-c
  tmux send-keys -t runkv-grafana C-c
  sleep 2
  '''
  