-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·65 lines (52 loc) · 1.87 KB
/
install.sh
File metadata and controls
executable file
·65 lines (52 loc) · 1.87 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
#!/bin/bash
# SUSE Observability Integrations Finder Installation Script
echo "Installing SUSE Observability Integrations Finder..."
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is required but not installed."
exit 1
fi
# Check Python version
python_version=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
required_version="3.8"
if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" != "$required_version" ]; then
echo "Error: Python 3.8 or higher is required. Found: $python_version"
exit 1
fi
echo "Python version: $python_version ✓"
# Install dependencies
echo "Installing dependencies..."
pip3 install -r requirements.txt
if [ $? -ne 0 ]; then
echo "Error: Failed to install dependencies."
exit 1
fi
echo "Dependencies installed successfully ✓"
# Ask if user wants GUI functionality
echo ""
read -p "Do you want to install GUI functionality? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Installing GUI dependencies..."
pip3 install -r requirements-gui.txt
if [ $? -ne 0 ]; then
echo "Warning: Failed to install GUI dependencies. CLI functionality will still work."
else
echo "GUI dependencies installed successfully ✓"
fi
else
echo "GUI functionality skipped. CLI functionality is available."
fi
# Make the main script executable
chmod +x integrations_finder.py
echo ""
echo "Installation completed successfully!"
echo ""
echo "Usage:"
echo " CLI mode: python3 integrations_finder.py find <agent_sha_or_container_path>"
echo " GUI mode: python3 integrations_finder.py gui"
echo ""
echo "Examples:"
echo " python3 integrations_finder.py find a1b2c3d4"
echo " python3 integrations_finder.py find quay.io/stackstate/stackstate-k8s-agent:a1b2c3d4"
echo " python3 integrations_finder.py gui"