From f7b26786dc9d3e1ecf5d13ad805b7820416dd30c Mon Sep 17 00:00:00 2001 From: "Lili (Tlapka)" Date: Tue, 30 Jan 2024 15:05:42 +0100 Subject: [PATCH] Add Installation --- Installation.md | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 Installation.md diff --git a/Installation.md b/Installation.md new file mode 100644 index 0000000..e13cc0d --- /dev/null +++ b/Installation.md @@ -0,0 +1,97 @@ +# Installation +This is the installation guide for testing the adaptive game. It shows how to install the components needed for the testing itself, and how to check if they are present and correctly installed. +​ +## Requirements +### Hardware: +- CPU that supports virtualization +- 4 GB of RAM (More is preferred) +- 40 GB of free space +### Programs: +- Python (>= 3.7) +`python --version` +- pip for python +`pip -V` +- VirtualBox (>= 6.0) +`vboxmanage --version` +- Vagrant (>= 2.2.5) +`vagrant --version` +​ +## Enabling virtualization in BIOS +The first step you need to do, no matter your operating system, is to have virtualization enabled in BIOS. The exact steps differ depending on your computer hardware. Here are a few guides that cover how to do it in detail: +- [How to Enable Intel VT-X & AMD Virtualization on PC](https://www.tactig.com/enable-intel-vt-x-amd-virtualization-pc-vmware-virtualbox/) - Steps taken in **Enable Intel VT-X Virtualization on PC**. +- [Enabling Intel VT and AMD-V virtualization hardware extensions in BIOS](https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Troubleshooting-Enabling_Intel_VT_and_AMD_V_virtualization_hardware_extensions_in_BIOS.html) - Steps 1-5. +- [How to enable Virtualization Technology on Lenovo PC computers](https://support.lenovo.com/lu/en/solutions/ht500006) - Steps 1-4. +​ + +Generally speaking, the steps are to enter your computer's BIOS by pressing a key like F10. (The boot screen should say which key that is.) + +​ +Then, in BIOS, you look for virtualization options, which should be somewhere in "Security" or "Advanced configuration" or "Advanced processor settings". + +​ +Changing this setting should not affect performance or anything too much -- it just allows your computer to simulate virtual machines like the ones used in the adaptive game. When you are done with playing the game, you can turn the setting off if you wish. +​## Installation +### Debian based Linux +Debian distributions should come with the latest version of Python by default. + +You might still need to download the `python-pip` package. +1. Enable virtualization in BIOS (see above). +2. Install [VirtualBox](https://www.virtualbox.org/wiki/Linux_Downloads). +3. Install [Vagrant](https://www.vagrantup.com/downloads). +​ +### Arch Linux +1. Enable virtualization in BIOS (see above). +2. If you don't have python installed, `sudo pacman -S python`. If you have a custom python installation, or if you have multiple versions of python installed, make sure that `python` calls Python version 3.5 or higher. (You can check with `python --version`) +3. Install pip for python. `sudo pacman -S python-pip` +4. Install VirtualBox. +`sudo pacman -S virtualbox`. For `linux` kernel, choose provider `virtualbox-host-modules-arch`, for any other kernel (like `linux-lts`), choose `virtualbox-host-dkms` +5. Install Vagrant. +`sudo pacman -S vagrant` +### Windows 10 +1. Enable virtualization in BIOS (see above). +2. If you don't have Python, install it from [here](https://www.python.org/downloads/windows/). By default, the installer should install pip as well. You should also check `Add Python to PATH`, so you can run pip and python from anywhere (including the project's folder). +If you have a custom Python installation, double check that you have the right version, and that pip is installed. +3. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads). (VirtualBox 6.1.X platform packages -> Windows hosts) +4. Install [Vagrant](https://www.vagrantup.com/downloads.html). +5. Ensure Hyper-V is disabled. (Programs and Features > Turn Windows features on or off > Hyper-V.) + +If you're on Windows Home edition, you don't need to disable Hyper-V, because Windows Home doesn't have Hyper-V. +​ +## Downloading the project +Once you have all the prerequisites installed, you download the project. (You clone the assistant repository, and download the game.) + +## Finalization +If everything works as should, you should run those commands in the project directory.: +- `pip install -r python-requirements.txt` (This installs python packages required to run the assistant.) + +Sometimes, you might also be asked to download the biggest virtual machine in advance for example: +- `vagrant box add munikypo/kali-2019.4` +​ + +Furthemore, running `python assistant.py` (or `./assisstant.py`) in the `assistant` directory should open up an interactive command line tool for running the game. If you type `c` or `check` into it, it should check if all tools are installed, and if they are on the correct version. +​ + +If you are on Windows, you should run the assistant as administrator. + +​ +NOTE: On Windows, the assistant will not find VirtualBox even if you have it. That's fine. +​ +``` +[lili@lili-pc assistant]$ python assistant.py +Welcome to the adaptive game assistant. +Basic commands are: +(S)tart, (N)ext, (H)elp, (C)heck, (E)xit +Waiting for your input: +check +checking Python version: +OK, Python version higher than 3.7. +checking Vagrant version: +OK, Vagrant version higher than 2.2. +checking Virtualbox version: +OK, VirtualBox version higher than 5 detected. + +``` +You can type `exit` to exit the assistant afterwards. + +If you installed all of the tools, and the assistant is working fine, then you are done with the installation. +​ \ No newline at end of file