Skip to content

Conversation

@typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Nov 27, 2025

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive Smart Doc installation guide with end-to-end setup: package upload and optional external registry, cluster/plugin installation, LLM service options (cloud or on‑prem), database dump naming and restore, PostgreSQL configuration (built‑in or external), UI install flow, importing custom knowledge bases with URL mapping, steps to delete/reimport content, detailed examples, commands, and troubleshooting guidance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

Adds a new, detailed installation guide at docs/en/installation/smart-doc.mdx covering package upload (Violet), operator and cluster-plugin deployment, LLM and DB preparation, database import/restore, custom knowledge-base import tooling, configuration examples, and troubleshooting steps.

Changes

Cohort / File(s) Summary
Installation documentation
docs/en/installation/smart-doc.mdx
New comprehensive installation guide: Violet package upload and bootstrap script, optional external registry configuration, operator and cluster plugin installation, LLM service preparation (Azure/on‑prem), DB dump naming and restore, PostgreSQL built‑in/external examples, UI install/import steps, custom KB import script and parameters, doc URL templating, deletion of prior imports, troubleshooting, with extensive YAML and shell examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify Markdown rendering and code block fencing
  • Validate YAML and shell command syntax and placeholders
  • Check consistency of variable names (e.g., doc dump filename, secrets, env vars)
  • Confirm command examples match intended platforms (kubectl/Violet/azure)

Poem

🐰 I hopped into docs with a quill so bright,
Uploaded packages through the moonlit night,
Restored the dumps and lined the URLs neat,
Models, keys, and secrets all tucked in their seat,
Now the warren’s ready — knowledge springtime delight! 🌿🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new installation documentation file for the smart doc component of Alauda Hyperflux.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add_smart_doc_install

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
docs/en/installation/smart-doc.mdx (3)

12-12: Hyphenate "command-line" for correct grammar.

Line 12: "command line tool" should be "command-line tool".

-Download the `violet` command line tool if it is not present on the machine:
+Download the `violet` command-line tool if it is not present on the machine:

20-20: Fix spelling error: "acording" → "according".

Line 20 contains a spelling error.

-then edit the file to fill in the correct configuration values acording to the comments.
+then edit the file to fill in the correct configuration values according to the comments.

118-118: Simplify "Admin User Names" to "Admin Usernames".

Line 118: "User Names" is more commonly written as one word in modern usage.

-- Admin User Names: the comma-separated admin user list. Admin users can manage Audit logs in Smart Doc.
+- Admin Usernames: the comma-separated admin user list. Admin users can manage Audit logs in Smart Doc.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa611a8 and 0d55168.

📒 Files selected for processing (1)
  • docs/en/installation/smart-doc.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/installation/smart-doc.mdx

[grammar] ~12-~12: Use a hyphen to join words.
Context: ....tar.gz. Download the violet` command line tool if it is not present on the ma...

(QB_NEW_EN_HYPHEN)


[grammar] ~20-~20: Ensure spelling is correct
Context: ...ill in the correct configuration values acording to the comments. ```bash #!/usr/bin/en...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~118-~118: It’s more common nowadays to write this noun as one word.
Context: ...e you want MCP tools to access. - Admin User Names: the comma-separated admin user list. A...

(RECOMMENDED_COMPOUNDS)

Comment on lines +50 to +56
violet push \
${AI_CLUSTER_OPERATOR_NAME} \
--platform-address=${PLATFORM_ADDRESS} \
--platform-username=${PLATFORM_ADMIN_USER} \
--platform-password=${PLATFORM_ADMIN_PASSWORD} \
--clusters=${CLUSTER} \
${VIOLET_EXTRA_ARGS[@]}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

The violet push command is missing required variable definitions.

The script references ${AI_CLUSTER_OPERATOR_NAME} and ${CLUSTER} on lines 51 and 55, but these variables are never defined in the script. The command will fail to execute.

Add variable definitions before the violet push command:

 if [[ "${IS_EXTERNAL_REGISTRY}" == "true" ]]; then
     REGISTRY_ADDRESS=<external-registry-url>  # [!code callout]
     REGISTRY_USERNAME=<registry-username>  # [!code callout]
     REGISTRY_PASSWORD=<registry-password>  # [!code callout]
 
     VIOLET_EXTRA_ARGS+=(
         --dst-repo "${REGISTRY_ADDRESS}"
         --username "${REGISTRY_USERNAME}"
         --password "${REGISTRY_PASSWORD}"
     )
 fi
 
+# Set the cluster and operator name
+export AI_CLUSTER_OPERATOR_NAME=<operator-package-name>  # [!code callout]
+export CLUSTER=<destination-cluster-name>  # [!code callout]
+
 # Push **Alauda AI Cluster** operator package to destination cluster
 violet push \
     ${AI_CLUSTER_OPERATOR_NAME} \

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docs/en/installation/smart-doc.mdx around lines 50 to 56, the violet push
snippet references ${AI_CLUSTER_OPERATOR_NAME} and ${CLUSTER} but those
variables are never defined; add explicit variable definitions or environment
variable usage immediately before the violet push command (e.g., set
AI_CLUSTER_OPERATOR_NAME to the operator name and CLUSTER to the target cluster,
or document that they must be provided via environment) so the script can run;
ensure the added lines clearly show placeholder values and note they should be
replaced with real values or exported from the environment.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying alauda-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: b24446f
Status: ✅  Deploy successful!
Preview URL: https://2c6931b2.alauda-ai.pages.dev
Branch Preview URL: https://add-smart-doc-install.alauda-ai.pages.dev

View logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
docs/en/installation/smart-doc.mdx (2)

50-56: The violet push command references undefined variables (duplicate issue).

Line 51 references ${AI_CLUSTER_OPERATOR_NAME} and line 55 references ${CLUSTER}, but these variables are never defined in the script. The command will fail when executed.

Add variable definitions before the violet push command:

     )
 fi
 
+# Set the cluster and operator name
+export AI_CLUSTER_OPERATOR_NAME=<operator-package-name>  # [!code callout]
+export CLUSTER=<destination-cluster-name>  # [!code callout]
+
 # Push **Alauda AI Cluster** operator package to destination cluster
 violet push \

129-137: Database import commands must execute inside the PostgreSQL pod (duplicate issue).

Lines 134–135 show psql and pg_restore running locally, but they must execute inside the PostgreSQL pod. After copying the dump to the pod, use kubectl exec to run the commands.

 # Get the PostgreSQL pod name
 kubectl -n cpaas-system get pod | grep postgre-vec
 # Copy the dump file to the PostgreSQL pod
 kubectl -n cpaas-system cp docvec_acp_4_1.dump <postgre-vec-xxx>:/tmp/docvec_acp_4_1.dump
-psql -U postgres -W -c "DROP DATABASE docvec_acp_4_1; CREATE DATABASE docvec_acp_4_1;"
-pg_restore -U postgres -W -d docvec_acp_4_1 /tmp/docvec_acp_4_1.dump
+kubectl -n cpaas-system exec <postgre-vec-xxx> -- psql -U postgres -W -c "DROP DATABASE docvec_acp_4_1; CREATE DATABASE docvec_acp_4_1;"
+kubectl -n cpaas-system exec <postgre-vec-xxx> -- pg_restore -U postgres -W -d docvec_acp_4_1 /tmp/docvec_acp_4_1.dump
 # Enter the password when prompted
🧹 Nitpick comments (2)
docs/en/installation/smart-doc.mdx (2)

12-12: Use hyphen for compound adjective.

"command line tool" should be "command-line tool" when modifying a noun.

-Download the `violet` command line tool if it is not present on the machine:
+Download the `violet` command-line tool if it is not present on the machine:

118-118: Use modern compound word styling.

"Admin User Names" is more idiomatically written as "Admin Usernames" (single compound word).

-- Admin User Names: the comma-separated admin user list. Admin users can manage Audit logs in Alauda Hyperflux.
+- Admin Usernames: the comma-separated admin user list. Admin users can manage Audit logs in Alauda Hyperflux.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d55168 and 1f05d53.

📒 Files selected for processing (1)
  • docs/en/installation/smart-doc.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/installation/smart-doc.mdx

[grammar] ~12-~12: Use a hyphen to join words.
Context: ....tar.gz. Download the violet` command line tool if it is not present on the ma...

(QB_NEW_EN_HYPHEN)


[grammar] ~20-~20: Ensure spelling is correct
Context: ...ill in the correct configuration values acording to the comments. ```bash #!/usr/bin/en...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~118-~118: It’s more common nowadays to write this noun as one word.
Context: ...e you want MCP tools to access. - Admin User Names: the comma-separated admin user list. A...

(RECOMMENDED_COMPOUNDS)

🔇 Additional comments (1)
docs/en/installation/smart-doc.mdx (1)

87-100: PostgreSQL Secret YAML is now valid.

The Helm template syntax issue has been resolved. The Secret now uses plain string values with placeholders that users can fill in directly.

3. Run `chmod +x ${PATH_TO_THE_VIOLET_TOOL}` to make the tool executable.

Save the following script in `upload.sh`,
then edit the file to fill in the correct configuration values acording to the comments.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spelling error.

"acording" should be "according".

-then edit the file to fill in the correct configuration values acording to the comments.
+then edit the file to fill in the correct configuration values according to the comments.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
then edit the file to fill in the correct configuration values acording to the comments.
then edit the file to fill in the correct configuration values according to the comments.
🧰 Tools
🪛 LanguageTool

[grammar] ~20-~20: Ensure spelling is correct
Context: ...ill in the correct configuration values acording to the comments. ```bash #!/usr/bin/en...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In docs/en/installation/smart-doc.mdx around line 20, fix the spelling mistake
"acording" to "according" in the sentence so it reads "...fill in the correct
configuration values according to the comments." Ensure only the single word is
corrected and keep punctuation and surrounding text unchanged.

Comment on lines +233 to +240
Copy the vector ids from `vector_ids.json` to the temporary table:

```bash
psql -c "
COPY ids_temp(id) FROM stdin;
$(cat ids_to_delete.json | jq -r '.[]')
"
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inconsistent file name and missing database connection parameters in psql command.

Line 238 references ids_to_delete.json, but line 223 indicates the file is named vector_ids.json. Additionally, this psql command is missing the database (-d) and username (-U) parameters that were included in similar commands above (lines 230, 245, 254).

 Copy the vector ids from `vector_ids.json` to the temporary table:
 
 ```bash
-psql -c "
+psql -U <your-pg-username> -W -d <your-pg-database> -c "
     COPY ids_temp(id) FROM stdin;
-    $(cat ids_to_delete.json | jq -r '.[]')
+    $(cat vector_ids.json | jq -r '.[]')
 "

<details>
<summary>🤖 Prompt for AI Agents</summary>

In docs/en/installation/smart-doc.mdx around lines 233 to 240, the psql COPY
snippet uses the wrong filename and omits connection parameters; update the
command to reference vector_ids.json (not ids_to_delete.json) and add the
database connection flags (e.g. -U -W -d )
to the psql invocation so it matches the other examples above.


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
docs/en/installation/smart-doc.mdx (3)

20-20: Fix spelling error: "acording" → "according".

This issue was flagged in a previous review but remains unresolved.

-then edit the file to fill in the correct configuration values acording to the comments.
+then edit the file to fill in the correct configuration values according to the comments.

50-56: Define AI_CLUSTER_OPERATOR_NAME and CLUSTER variables before violet push command.

This critical issue was flagged in a previous review and remains unresolved. The script references ${AI_CLUSTER_OPERATOR_NAME} and ${CLUSTER} but these variables are never defined, causing the command to fail.

 fi
 
+# Set the cluster and operator name
+export AI_CLUSTER_OPERATOR_NAME=<operator-package-name>  # [!code callout]
+export CLUSTER=<destination-cluster-name>  # [!code callout]
+
 # Push **Alauda AI Cluster** operator package to destination cluster
 violet push \
     ${AI_CLUSTER_OPERATOR_NAME} \

247-254: Fix inconsistent filename and add missing psql connection parameters.

This major issue was flagged in a previous review and remains unresolved. Line 247 states the file is vector_ids.json, but line 252 references ids_to_delete.json. Additionally, the psql command is missing the database (-d) and username (-U) parameters that appear in similar commands above.

 Copy the vector ids from `vector_ids.json` to the temporary table:
 
 ```bash
-psql -c "
+psql -U <your-pg-username> -W -d <your-pg-database> -c "
     COPY ids_temp(id) FROM stdin;
-    $(cat ids_to_delete.json | jq -r '.[]')
+    $(cat vector_ids.json | jq -r '.[]')
 "

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>docs/en/installation/smart-doc.mdx (2)</summary><blockquote>

`12-12`: **Hyphenate compound modifier "command-line".**

```diff
-Download the `violet` command line tool if it is not present on the machine:
+Download the `violet` command-line tool if it is not present on the machine:

118-118: Use single-word compound "Usernames" instead of "User Names".

-- Admin User Names: the comma-separated admin user list. Admin users can manage Audit logs in Alauda Hyperflux.
+- Admin Usernames: the comma-separated admin user list. Admin users can manage Audit logs in Alauda Hyperflux.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f05d53 and b24446f.

📒 Files selected for processing (1)
  • docs/en/installation/smart-doc.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/installation/smart-doc.mdx

[grammar] ~12-~12: Use a hyphen to join words.
Context: ....tar.gz. Download the violet` command line tool if it is not present on the ma...

(QB_NEW_EN_HYPHEN)


[grammar] ~20-~20: Ensure spelling is correct
Context: ...ill in the correct configuration values acording to the comments. ```bash #!/usr/bin/en...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~118-~118: It’s more common nowadays to write this noun as one word.
Context: ...e you want MCP tools to access. - Admin User Names: the comma-separated admin user list. A...

(RECOMMENDED_COMPOUNDS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants