feat: extend hub installation instructions#95
Conversation
…tions + small restructure of deployment sidebar
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR removes legacy central deployment docs, adds Hub-focused guides (Helm install, storage replication, Docker Compose), restructures the deployment sidebar into "Hub Deployment" and "Node Deployment", and enhances the deployment index and microk8s quickstart with expanded storage and install flows. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Operator as Operator
participant Helm as "Helm CLI"
participant K8s as "Kubernetes API"
participant Storage as "Mayastor / OpenEBS"
participant Hub as "FLAME Hub Pods"
Operator->>Helm: prepare values.yaml & run helm install
Helm->>K8s: create/upgrade resources (Deployments, PVCs, StorageClass)
K8s->>Storage: request provisioning of replicated storage
Storage-->>K8s: provision and bind PVs
K8s->>Hub: schedule & start Hub pods using PVCs
Hub-->>Operator: expose ingress/service and report status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/guide/deployment/microk8s-quickstart.md (1)
119-126:⚠️ Potential issue | 🟠 MajorAdd
sudoto the file write operation.The shell redirection
>executes at the shell level as the current user and will fail without elevated permissions. The/var/snap/microk8s/directory requires root access, which the guide already demonstrates elsewhere usingsudo tee. Update the command to usesudo tee:Suggested fix
-cat <<EOF > /var/snap/microk8s/current/args/containerd +sudo tee /var/snap/microk8s/current/args/containerd > /dev/null <<'EOF' --config ${SNAP_DATA}/args/containerd.toml --root <new mount>/var/lib/containerd --state <new mount>/run/containerd --address ${SNAP_COMMON}/run/containerd.sock EOF
🤖 Fix all issues with AI agents
In `@src/guide/deployment/hub-storage.md`:
- Around line 19-26: The markdown shows a link to the GitHub directory but the
example wget pulls from docs.privateaim.de, causing an inconsistent source;
update the link and the wget command in the code block so they point to the
same, correct location for prepare_for_mayastor.sh (either the GitHub raw URL
for prepare_for_mayastor.sh or the docs.privateaim.de hosted script), and remove
or reword the ambiguous note—ensure the markdown link text, the wget URL, and
the chmod/sudo commands in the prepare_for_mayastor.sh code block all reference
the identical, authoritative URL.
In `@src/guide/deployment/microk8s-quickstart.md`:
- Around line 6-15: Update the "Automatic Installation script 🤖" section to add
an explicit download step and point to the raw script file: instruct users to
fetch the script with a curl command that downloads
https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh
into microk8s_setup.sh before running chmod +x and ./microk8s_setup.sh;
reference the microk8s_setup.sh filename in the instructions so first-time users
won't hit a "file not found" error.
src/guide/deployment/hub-storage.md
Outdated
| Download the script: [prepare_for_mayastor.sh](https://github.com/PrivateAIM/hub-deployment/tree/master/scripts) | ||
|
|
||
| ```bash | ||
| wget https://docs.privateaim.de/scripts/prepare_for_mayastor.sh | ||
| chmod +x prepare_for_mayastor.sh | ||
| sudo ./prepare_for_mayastor.sh | ||
| ``` | ||
| *Note: Adjust the URL to match your documentation hosting or use the relative path if accessing directly.* |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, check if the file exists and read the relevant section
if [ -f "src/guide/deployment/hub-storage.md" ]; then
echo "=== File found. Reading lines 15-30 ==="
sed -n '15,30p' src/guide/deployment/hub-storage.md
else
echo "File not found. Searching for similar files..."
find . -name "*hub-storage*" -o -name "*storage*.md" 2>/dev/null | head -20
fiRepository: PrivateAIM/documentation
Length of output: 639
🏁 Script executed:
# Check the repository structure for scripts directory
echo "=== Checking for scripts directory ==="
if [ -d "scripts" ]; then
echo "Found scripts directory at root:"
ls -la scripts/ | head -20
fi
# Also check nested scripts directories
echo ""
echo "=== Searching for prepare_for_mayastor.sh ==="
find . -name "prepare_for_mayastor.sh" -o -path "*/scripts/*" -type d 2>/dev/nullRepository: PrivateAIM/documentation
Length of output: 153
🏁 Script executed:
# Check the GitHub URL by looking at the .git config and repository information
echo "=== Repository information ==="
git remote -v 2>/dev/null || echo "No git remote found"
git config --get remote.origin.url 2>/dev/null || echo "No origin URL"
# Check if there's any reference to docs.privateaim.de or script hosting
echo ""
echo "=== Searching for docs.privateaim.de references ==="
rg "docs.privateaim.de" --type md 2>/dev/null | head -20Repository: PrivateAIM/documentation
Length of output: 598
Align the download link with the actual script URL.
The link points to a GitHub directory in the hub-deployment repository, but the command pulls from docs.privateaim.de; these are inconsistent sources. The note acknowledging this ambiguity reinforces that the documentation needs clarification.
🛠️ Suggested fix
-Download the script: [prepare_for_mayastor.sh](https://github.com/PrivateAIM/hub-deployment/tree/master/scripts)
+Download the script: [prepare_for_mayastor.sh](https://docs.privateaim.de/scripts/prepare_for_mayastor.sh)
@@
-*Note: Adjust the URL to match your documentation hosting or use the relative path if accessing directly.*📝 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.
| Download the script: [prepare_for_mayastor.sh](https://github.com/PrivateAIM/hub-deployment/tree/master/scripts) | |
| ```bash | |
| wget https://docs.privateaim.de/scripts/prepare_for_mayastor.sh | |
| chmod +x prepare_for_mayastor.sh | |
| sudo ./prepare_for_mayastor.sh | |
| ``` | |
| *Note: Adjust the URL to match your documentation hosting or use the relative path if accessing directly.* |
🤖 Prompt for AI Agents
In `@src/guide/deployment/hub-storage.md` around lines 19 - 26, The markdown shows
a link to the GitHub directory but the example wget pulls from
docs.privateaim.de, causing an inconsistent source; update the link and the wget
command in the code block so they point to the same, correct location for
prepare_for_mayastor.sh (either the GitHub raw URL for prepare_for_mayastor.sh
or the docs.privateaim.de hosted script), and remove or reword the ambiguous
note—ensure the markdown link text, the wget URL, and the chmod/sudo commands in
the prepare_for_mayastor.sh code block all reference the identical,
authoritative URL.
| ### Automatic Installation script 🤖 | ||
| Instead of following the below installation guide, you can also run the bash script: | ||
| > The script has been tested in Debian. | ||
|
|
||
| Download: [microk8s_setup.sh](https://github.com/PrivateAIM/hub-deployment/tree/master/scripts) | ||
|
|
||
| ```bash | ||
| chmod +x microk8s_setup.sh | ||
| ./microk8s_setup.sh | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's locate the file
fd "microk8s-quickstart.md" -type fRepository: PrivateAIM/documentation
Length of output: 238
🏁 Script executed:
# If found, let's read the relevant lines
if [ -f "src/guide/deployment/microk8s-quickstart.md" ]; then
cat -n "src/guide/deployment/microk8s-quickstart.md" | head -30
fiRepository: PrivateAIM/documentation
Length of output: 1250
🏁 Script executed:
# Check if there's a hub-deployment directory or reference in the repo
git ls-files | grep -E "(hub-deployment|microk8s)" | head -20Repository: PrivateAIM/documentation
Length of output: 111
🌐 Web query:
site:github.com/PrivateAIM/hub-deployment microk8s_setup.sh raw.githubusercontent.com
💡 Result:
I was able to find the repo PrivateAIM/hub-deployment (default branch: master). Its top-level tree contains docker-compose/, kubernetes/, and scripts/, plus a README.md, etc. (github.com)
However, within the repository homepage content, there is no reference to a file named microk8s_setup.sh (a page-text search for microk8s_setup returned no matches), so I could not locate a corresponding raw.githubusercontent.com/.../microk8s_setup.sh URL. (github.com)
Citations:
🌐 Web query:
PrivateAIM hub-deployment scripts directory files list
💡 Result:
I couldn’t find any public GitHub repository (or page) for PrivateAIM/hub-deployment, so I can’t reliably enumerate a scripts/ directory file list from web sources. The PrivateAim docs describe the Hub as living in the PrivateAim/hub monorepo, and they don’t link to a separate public “hub-deployment” repo. [1]
If you have the repo locally (or can share the exact GitHub URL/branch/commit), you can list the scripts directory with:
git clone <REPO_URL>
cd <REPO_DIR>
ls -la scripts/
# or (recursive)
find scripts -maxdepth 2 -type f -printSources:
[1] PrivateAim docs – Components (Hub repo listed as PrivateAim/hub) https://docs.privateaim.net/getting-started/components.html
🌐 Web query:
PrivateAIM hub-deployment microk8s setup bash
💡 Result:
#!/usr/bin/env bash
set -euo pipefail
# --- Config (edit these) ---
MICROK8S_CHANNEL="1.32" # per PrivateAIM microk8s quickstart [1]
RELEASE_NAME="flame-node"
VALUES_FILE="${1:-my-values.yaml}" # pass your values file as arg1
# ---------------------------
sudo apt update -y && sudo apt upgrade -y # [1]
sudo apt install -y snapd curl # [1]
echo 'export PATH=$PATH:/snap/bin' >> ~/.bashrc
# shellcheck disable=SC1090
source ~/.bashrc
sudo snap install core # [1]
sudo snap install microk8s --classic --channel="${MICROK8S_CHANNEL}" # [1]
# Fix permissions (you may need to log out/in, or run `newgrp microk8s`) [1]
sudo usermod -a -G microk8s "$USER" # [1]
sudo chown -f -R "$USER" ~/.kube 2>/dev/null || true
newgrp microk8s <<'EOF'
set -euo pipefail
microk8s status --wait-ready
# kubeconfig for helm/kubectl (as shown in the PrivateAIM guide) [1]
mkdir -p ~/.kube && chmod 0700 ~/.kube
microk8s kubectl config view --raw > ~/.kube/config
# Required addons (dashboard/ingress/dns/storage/metrics) [1]
microk8s enable dashboard
microk8s enable ingress
microk8s enable dns
microk8s enable hostpath-storage
microk8s enable metrics-server
# Install Helm using upstream install script [1]
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
# Deploy FLAME Node from the FLAME Helm repo [2]
helm repo add flame https://PrivateAIM.github.io/helm # [2]
helm repo update
helm install "${RELEASE_NAME}" -f "${VALUES_FILE}" flame/flame-node # [2]
# Quick checks
microk8s kubectl get nodes
microk8s kubectl get pods -A
EOFSources: PrivateAIM “Getting Started with microk8s and Helm” [1], and “FLAME Node Deployment” (Helm repo + install command) [2].
🏁 Script executed:
# Check what files might be available in hub-deployment repo
# Let's search for any bash scripts that might contain microk8s or setup
curl -s "https://api.github.com/repos/PrivateAIM/hub-deployment/contents/scripts" 2>/dev/null | jq '.[] | {name: .name, type: .type}' 2>/dev/null || echo "API query failed or file not found"Repository: PrivateAIM/documentation
Length of output: 228
🏁 Script executed:
# Verify the correct raw.githubusercontent.com URL format for the script
# The repo is: PrivateAIM/hub-deployment
# Branch: master
# File: scripts/microk8s_setup.sh
# Expected URL pattern: https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh
echo "Expected raw URL:"
echo "https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh"
# Verify curl is a reasonable download tool for Debian (which the guide mentions)
apt-cache search curl 2>/dev/null | head -3 || echo "curl is a standard Debian package"Repository: PrivateAIM/documentation
Length of output: 178
🌐 Web query:
curl command Debian install available default
💡 Result:
On Debian, curl is provided by the official curl package in the default Debian repositories. [1]
Check if it’s already installed
curl --versionInstall (typical/default method)
sudo apt update
sudo apt install -y curlThis is the standard approach for Debian/Ubuntu via apt. [2]
Is it installed by default?
Not always—many minimal/base Debian installs don’t include curl, but it’s readily available to install from the default repos. [2]
Sources: [1] Debian package info, [2] everything.curl.dev (Debian/Ubuntu install guidance.
Add an explicit download step for the script.
The current link points to a directory, and the commands assume the script already exists locally. First-time users will encounter a "file not found" error when trying to run chmod +x. The fix below provides both a corrected file link and an explicit download command using curl.
🛠️ Suggested fix
-Download: [microk8s_setup.sh](https://github.com/PrivateAIM/hub-deployment/tree/master/scripts)
+Download: [microk8s_setup.sh](https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh)
```bash
+curl -fsSL -o microk8s_setup.sh https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh
chmod +x microk8s_setup.sh
./microk8s_setup.sh
</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **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.
```suggestion
### Automatic Installation script 🤖
Instead of following the below installation guide, you can also run the bash script:
> The script has been tested in Debian.
Download: [microk8s_setup.sh](https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh)
🤖 Prompt for AI Agents
In `@src/guide/deployment/microk8s-quickstart.md` around lines 6 - 15, Update the
"Automatic Installation script 🤖" section to add an explicit download step and
point to the raw script file: instruct users to fetch the script with a curl
command that downloads
https://raw.githubusercontent.com/PrivateAIM/hub-deployment/master/scripts/microk8s_setup.sh
into microk8s_setup.sh before running chmod +x and ./microk8s_setup.sh;
reference the microk8s_setup.sh filename in the instructions so first-time users
won't hit a "file not found" error.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/guide/deployment/hub-storage.md`:
- Line 8: Update the sentence that currently reads "Configure the your
Application (FLAME Hub) to use the new storage class" by removing the extra
article so it reads "Configure your Application (FLAME Hub) to use the new
storage class"; locate and edit this exact phrase in
src/guide/deployment/hub-storage.md (look for "the your Application" or "FLAME
Hub") to apply the change.
- Around line 87-92: Step 7's fenced code block is missing the closing triple
backticks and step 8's numbering/spacing is inconsistent; fix by making a single
fenced block that starts before "kubectl get diskpools -n openebs" and ends
after "kubectl get storageclasses" (so add the closing ``` after that command),
then ensure step 8 is on its own numbered line "8. Edit your FLAME-Hub
values-file..." with a blank line separating it from the code block and correct
spacing around the number; reference the commands "kubectl get diskpools -n
openebs" and "kubectl get storageclasses" and the step text about the FLAME-Hub
values-file when applying the edits.
🧹 Nitpick comments (1)
src/guide/deployment/hub-storage.md (1)
25-25: Consider removing the trailing colon for better flow.The sentence works better as a standalone statement without the colon, as the manual steps begin with a new heading rather than continuing inline.
✨ Suggested refinement
-Alternatively, you can manually do the following: +Alternatively, you can manually perform the following steps.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/guide/deployment/hub-docker-compose.md`:
- Line 13: The sentence "An example (`.env.example`) located in the root of the
repository." is missing the verb; update that line in
src/guide/deployment/hub-docker-compose.md to read "An example (`.env.example`)
is located in the root of the repository." so the sentence is grammatical and
complete.
In `@src/guide/deployment/hub-storage.md`:
- Line 96: Fix the spacing in the sentence that currently reads "In your
`values.yaml`(or better `values_override.yaml`) you can specify..." by adding a
single space after the closing parenthesis so it becomes "In your `values.yaml`
(or better `values_override.yaml`) you can specify..."; update the text in
src/guide/deployment/hub-storage.md where that sentence appears to include the
space after the parenthesis.
🧹 Nitpick comments (1)
src/guide/deployment/hub-docker-compose.md (1)
22-22: Use consistent capitalization for HTTPS/HTTP.For consistency and clarity in technical documentation, use uppercase "HTTPS" and "HTTP" when referring to the protocols.
✨ Proposed refinement
-> ⚠️ Important: Harbor must be accessible via https (plain http will fail). This is a limitation of Harbor. +> ⚠️ Important: Harbor must be accessible via HTTPS (plain HTTP will fail). This is a limitation of Harbor.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
LGTM |
#94
Summary by CodeRabbit