diff --git a/.github/ISSUE_TEMPLATE/run_stack_issue.md b/.github/ISSUE_TEMPLATE/run_stack_issue.md new file mode 100644 index 0000000..4f579eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/run_stack_issue.md @@ -0,0 +1,26 @@ +--- +name: Issue running bee-stack +about: Create a report to help us improve bee-stack +title: "" +labels: debug +assignees: "" +--- + +**Tasks** + +- [ ] I have run through the + [troubleshooting guide](https://github.com/i-am-bee/bee-stack/blob/main/docs/troubleshooting.md) +- [ ] My container provider (docker / podman / rancher) and the compose extension are up to date + (`docker compose version` or `podman compose version` returns a version >= `2.26`) + + +**Description** + + +**Logs** + diff --git a/README.md b/README.md index a9533c1..61f0580 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ Once started you can find use the following URLs: ## ⛓️‍💥 Troubleshooting Please see our [troubleshoting guide](docs/troubleshooting.md) for help with the most common issues. +> If you run through the troubleshooting guide and bee-stack is still crashing, please collect +> the logs using `./bee-stack.sh logs` and submit them to a new issue at: +> https://github.com/i-am-bee/bee-agent-framework/issues/new?template=run_stack_issue.md + ## 👷 Advanced ### Custom models diff --git a/bee-stack.sh b/bee-stack.sh index 61daf98..58f93ab 100755 --- a/bee-stack.sh +++ b/bee-stack.sh @@ -15,7 +15,8 @@ print_error() { printf "${ORANGE}❗ERROR: %s${NC}\n" "$1" shift [ -n "$1" ] && printf "${ORANGE}❗ %s${NC}\n" "$@" - true + printf "❗\n${ORANGE}❗Visit the troubleshooting guide:\n" + printf "❗${BLUE}https://github.com/i-am-bee/bee-stack/blob/main/docs/troubleshooting.md${NC}\n" } print_header() { @@ -205,10 +206,12 @@ start_stack() { fi ${RUNTIME} compose --profile all up -d + printf "Done. You can visit the UI at ${BLUE}http://localhost:3000${NC}\n" } stop_stack() { ${RUNTIME} compose --profile all down + ${RUNTIME} compose --profile infra down } clean_stack() { @@ -223,6 +226,26 @@ start_infra() { ${RUNTIME} compose --profile infra up -d } +dump_logs() { + timestamp=$(date +"%Y-%m-%d_%H%MS") + folder="./logs/${timestamp}" + mkdir -p "${folder}" + + for component in $(${RUNTIME} compose --profile all config --services); do + ${RUNTIME} compose logs "${component}" > "${folder}/${component}.log" + done + + ${RUNTIME} version > "${folder}/${RUNTIME}.log" + ${RUNTIME} compose version > "${folder}/${RUNTIME}.log" + + zip -r "${folder}.zip" "${folder}/"|| echo "Zip is not installed, please upload individual logs" + + printf "${ORANGE}Logs were created in ${folder}${NC}.\n" + printf "If you have issues running bee-stack, please create an issue " + printf "and attach the file ${ORANGE}${folder}.zip${NC} at:\n" + printf "${BLUE}https://github.com/i-am-bee/bee-stack/issues/new?template=run_stack_issue.md${NC}\n" +} + # Main check_docker command=$(trim "$1" | tr '[:upper:]' '[:lower:]') @@ -233,5 +256,6 @@ elif [ "$command" = 'start:infra' ]; then start_infra elif [ "$command" = 'stop' ]; then stop_stack elif [ "$command" = 'clean' ]; then clean_stack elif [ "$command" = 'check' ]; then check_docker +elif [ "$command" = 'logs' ]; then dump_logs else print_error "Unknown command $1" fi diff --git a/docker-compose.yml b/docker-compose.yml index f3796bd..825ea9d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -258,7 +258,7 @@ services: MILVUS_URL: milvus:19530 ports: - 19531:3000 - profiles: [ all, infra ] + profiles: [ infra ] volumes: etcd: minio: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d34380e..c396eeb 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -1,5 +1,9 @@ # Common issues +> If you run through the troubleshooting guide and bee-stack is still crashing, please collect +> the logs using `./bee-stack.sh logs` and submit them to a new issue at: +> https://github.com/i-am-bee/bee-agent-framework/issues/new?template=run_stack_issue.md + ### ERROR: None of compose command versions meets the required version If you get this error message, you have a compose provider installed, but it's not the correct version.