-
Notifications
You must be signed in to change notification settings - Fork 225
Support to install lisa automatically #4259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,286 @@ | ||||||||||||||
| # LISA Installation Guide | ||||||||||||||
|
|
||||||||||||||
| This guide provides installation instructions for Microsoft LISA on both Windows and Linux platforms. | ||||||||||||||
|
|
||||||||||||||
| ## Table of Contents | ||||||||||||||
| - [Prerequisites](#prerequisites) | ||||||||||||||
| - [Windows Installation](#windows-installation) | ||||||||||||||
| - [Linux Installation](#linux-installation) | ||||||||||||||
| - [Verification](#verification) | ||||||||||||||
| - [Troubleshooting](#troubleshooting) | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| ## Prerequisites | ||||||||||||||
|
|
||||||||||||||
| ### Common Requirements | ||||||||||||||
| - **Python**: 3.11 or higher (3.8+ minimum) | ||||||||||||||
| - **Git**: Latest stable version | ||||||||||||||
| - **Internet connection**: For downloading dependencies | ||||||||||||||
|
|
||||||||||||||
| ### Windows-Specific Requirements | ||||||||||||||
| - **Visual C++ Redistributable**: [Download here](https://aka.ms/vs/17/release/vc_redist.x64.exe) | ||||||||||||||
| - **PowerShell**: 5.1 or higher (included in Windows 10/11) | ||||||||||||||
|
|
||||||||||||||
| ### Linux-Specific Requirements | ||||||||||||||
| - **gcc/build-essential**: For compiling Python extensions | ||||||||||||||
| - **libssl-dev**: For SSL support | ||||||||||||||
| - **python3-dev**: Python development headers | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| ## Windows Installation | ||||||||||||||
|
|
||||||||||||||
| ### Option 1: Quick Install (PowerShell Script) | ||||||||||||||
|
|
||||||||||||||
| 1. **Open PowerShell as Administrator** | ||||||||||||||
|
|
||||||||||||||
| 2. **Download and run the installation script:** | ||||||||||||||
| ```powershell | ||||||||||||||
| # Navigate to the lisa directory | ||||||||||||||
| cd path\to\lisa | ||||||||||||||
|
|
||||||||||||||
| # Run the installation script | ||||||||||||||
| .\quick-install.ps1 | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 3. **Optional parameters:** | ||||||||||||||
| ```powershell | ||||||||||||||
| # Skip Python version check | ||||||||||||||
| .\quick-install.ps1 -SkipPython | ||||||||||||||
|
|
||||||||||||||
| # Specify custom installation path | ||||||||||||||
| .\quick-install.ps1 -InstallPath "C:\MyTools\lisa" | ||||||||||||||
|
|
||||||||||||||
| # Install from a different branch | ||||||||||||||
| .\quick-install.ps1 -Branch "develop" | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### Option 2: Manual Installation | ||||||||||||||
|
|
||||||||||||||
| 1. **Install Python** | ||||||||||||||
| - Download Python 3.11+ from [python.org](https://www.python.org/downloads/) | ||||||||||||||
| - During installation, check "Add Python to PATH" | ||||||||||||||
| - Verify: `python --version` | ||||||||||||||
|
|
||||||||||||||
| 2. **Install Git** | ||||||||||||||
| - Download from [git-scm.com](https://git-scm.com/download/win) | ||||||||||||||
| - Use default settings during installation | ||||||||||||||
| - Verify: `git --version` | ||||||||||||||
|
|
||||||||||||||
| 3. **Install Visual C++ Redistributable** | ||||||||||||||
| - Download and install from [Microsoft](https://aka.ms/vs/17/release/vc_redist.x64.exe) | ||||||||||||||
|
|
||||||||||||||
| 4. **Install Python dependencies** | ||||||||||||||
| ```powershell | ||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||
| pip install --user --upgrade nox toml wheel | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 5. **Clone LISA repository** | ||||||||||||||
| ```powershell | ||||||||||||||
| git clone https://github.com/microsoft/lisa.git | ||||||||||||||
| cd lisa | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 6. **Install LISA with Azure extensions** | ||||||||||||||
| ```powershell | ||||||||||||||
| pip install -e .[azure] | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 7. **Add Python Scripts to PATH** (if not already) | ||||||||||||||
| ```powershell | ||||||||||||||
| $scriptsPath = python -c "import site; import os; print(os.path.join(site.USER_BASE, 'Scripts'))" | ||||||||||||||
| [Environment]::SetEnvironmentVariable('PATH', $env:PATH + ";$scriptsPath", 'User') | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| ## Linux Installation | ||||||||||||||
|
|
||||||||||||||
| ### Ubuntu/Debian | ||||||||||||||
|
|
||||||||||||||
| 1. **Update package list and install prerequisites** | ||||||||||||||
| ```bash | ||||||||||||||
| sudo apt-get update | ||||||||||||||
| sudo apt-get install -y python3 python3-pip python3-dev git build-essential libssl-dev | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 2. **Verify Python version** (should be 3.8+) | ||||||||||||||
| ```bash | ||||||||||||||
| python3 --version | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| If Python is too old, install Python 3.11: | ||||||||||||||
| ```bash | ||||||||||||||
| sudo apt-get install -y software-properties-common | ||||||||||||||
| sudo add-apt-repository ppa:deadsnakes/ppa | ||||||||||||||
| sudo apt-get update | ||||||||||||||
| sudo apt-get install -y python3.11 python3.11-dev python3.11-venv | ||||||||||||||
| sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 3. **Install Python dependencies** | ||||||||||||||
| ```bash | ||||||||||||||
| python3 -m pip install --upgrade pip | ||||||||||||||
| pip3 install --user --upgrade nox toml wheel | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 4. **Clone LISA repository** | ||||||||||||||
| ```bash | ||||||||||||||
| git clone https://github.com/microsoft/lisa.git | ||||||||||||||
| cd lisa | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| 5. **Install LISA with Azure extensions** | ||||||||||||||
| ```bash | ||||||||||||||
| pip3 install -e .[azure] | ||||||||||||||
|
Comment on lines
+135
to
+137
|
||||||||||||||
| 5. **Install LISA with Azure extensions** | |
| ```bash | |
| pip3 install -e .[azure] | |
| 5. **Install LISA with Azure and libvirt extensions** | |
| ```bash | |
| pip3 install --editable .[azure,libvirt] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation instructs users to first navigate to the LISA directory, then run the installation script. However, the script is designed to clone the LISA repository itself. This creates confusion - users would need to have already downloaded the script separately, or cloned the repository, which defeats the purpose of the automated installation. Consider clarifying whether users should download just the script file or if they already have the repository.