-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify-install.sh
More file actions
executable file
·130 lines (116 loc) · 3.96 KB
/
verify-install.sh
File metadata and controls
executable file
·130 lines (116 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/env bash
# Verify render-dashboard installation
set -e
echo "🔍 Verifying Render Dashboard Installation..."
echo ""
# Check if venv exists
echo "1. Checking virtual environment..."
if [[ -d ".venv" ]]; then
echo " ✓ Virtual environment exists at .venv/"
if [[ "$VIRTUAL_ENV" == *".venv"* ]]; then
echo " ✓ Virtual environment is activated"
else
echo " ⚠ Virtual environment not activated"
echo " Run: source .venv/bin/activate"
fi
else
echo " ✗ Virtual environment not found"
echo " Run: python3 -m venv .venv && source .venv/bin/activate"
exit 1
fi
# Check Python version
echo "2. Checking Python version..."
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d. -f1)
PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d. -f2)
if [[ $PYTHON_MAJOR -ge 3 ]] && [[ $PYTHON_MINOR -ge 9 ]]; then
echo " ✓ Python $PYTHON_VERSION (>= 3.9 required)"
else
echo " ✗ Python $PYTHON_VERSION is too old (>= 3.9 required)"
exit 1
fi
# Check if package is installed
echo "3. Checking if package is installed..."
if python3 -c "import render_dashboard" 2>/dev/null; then
VERSION=$(python3 -c "import render_dashboard; print(render_dashboard.__version__)")
echo " ✓ render_dashboard v$VERSION is installed"
else
echo " ✗ render_dashboard is not installed"
echo " Run: pip install -e ."
exit 1
fi
# Check if rdash command exists
echo "4. Checking if 'rdash' command exists..."
if command -v rdash &> /dev/null; then
echo " ✓ 'rdash' command is available in PATH"
else
echo " ✗ 'rdash' command not found"
echo " Run: pip install -e ."
exit 1
fi
# Check dependencies
echo "5. Checking dependencies..."
DEPS=("textual" "httpx" "yaml" "dateutil")
ALL_DEPS_OK=true
for dep in "${DEPS[@]}"; do
if python3 -c "import $dep" 2>/dev/null; then
echo " ✓ $dep is installed"
else
echo " ✗ $dep is not installed"
ALL_DEPS_OK=false
fi
done
if [[ $ALL_DEPS_OK == false ]]; then
echo " Run: pip install -r requirements.txt"
exit 1
fi
# Check for config file
echo "6. Checking for config file..."
if [[ -f "config.yaml" ]]; then
echo " ✓ config.yaml found in current directory"
elif [[ -f "$HOME/.config/render-dashboard/config.yaml" ]]; then
echo " ✓ config.yaml found in ~/.config/render-dashboard/"
else
echo " ℹ No config.yaml found (this is OK for testing)"
echo " Create one: cp config.yaml.example config.yaml"
fi
# Check for API key
echo "7. Checking for API key..."
if [[ -n "$RENDER_API_KEY" ]]; then
echo " ✓ RENDER_API_KEY is set"
else
echo " ℹ RENDER_API_KEY is not set (required for actual usage)"
echo " Set it: export RENDER_API_KEY=rnd_xxxxx"
fi
# Check zsh plugin (optional)
echo "8. Checking zsh plugin (optional)..."
if [[ -f "$HOME/.oh-my-zsh/custom/plugins/render-dashboard/render-dashboard.plugin.zsh" ]]; then
echo " ✓ Zsh plugin is installed"
# Check if enabled
if grep -q "render-dashboard" "$HOME/.zshrc" 2>/dev/null; then
echo " ✓ Plugin is enabled in ~/.zshrc"
else
echo " ℹ Plugin is installed but not enabled in ~/.zshrc"
echo " Add 'render-dashboard' to your plugins array"
fi
else
echo " ℹ Zsh plugin is not installed (optional)"
echo " Install it: ./install-zsh-plugin.sh"
fi
echo ""
echo "✅ Installation verification complete!"
echo ""
echo "Next steps:"
echo " 1. Activate venv: source .venv/bin/activate"
echo " 2. Set RENDER_API_KEY: export RENDER_API_KEY=rnd_xxxxx"
echo " 3. Add services: rdash service add <name>"
echo " 4. Run dashboard: rdash"
echo " 5. Try CLI: rdash <service> logs"
echo ""
echo "Documentation:"
echo " • Quick start: cat QUICKSTART.md"
echo " • Full guide: cat README.md"
echo " • Testing: cat TESTING.md"
echo ""
echo "Note: The command is 'rdash' (not 'rd' which conflicts with rmdir)"
echo ""