# Step-by-Step Installation and Set up Guide

### Prerequisite: Access to Repos and Documentation
Ensure you have read access to the following repositories:

- **CoTA Frontend**: [Frontend GitLab Repo](https://transfer.hft-stuttgart.de/gitlab/cota/moodle-assignsubmission_dta)
- **CoTA Backend**: [Backend GitLab Repo](https://transfer.hft-stuttgart.de/gitlab/cota/cota-backend)
- **CoTA Test Runner JDK17**: [Test Runner GitLab Repo (JDK17)](https://transfer.hft-stuttgart.de/gitlab/cota/examples/cota-runner-jdk17-junit5)
- **CoTA Test Runner JDK21**:  [Test Runner GitLab Repo (JDK21)](https://transfer.hft-stuttgart.de/gitlab/cota/examples/cota-runner-jdk17-junit5)

### Prerequisite: Infrastucture Downloads (VirtualBox & Ubuntu 22.04 LTS Desktop)
Download and install the following:

- [VirtualBox 7.0.14](https://download.virtualbox.org/virtualbox/7.0.14/VirtualBox-7.0.14-161095-Win.exe)
- [Ubuntu 22.04 LTS Desktop ISO](https://ubuntu.com/download/desktop/thank-you?version=22.04.3&architecture=amd64)

---

## Host Installation

1. Install **VirtualBox**.
2. [Optional] Install VirtualBox Guest Additions for better integration.

---

## Virtual Machine (VM) Installation

1. **Create a new VM** in VirtualBox with the following settings:
   1. Minimum settings:
   - **CPU**: 2 CPUs x 1 Core
   - **RAM**: 4 GB
   - **HDD**: 40 GB
   - **Network**: Default settings
   - **ISO Image**: Use the downloaded Ubuntu 22.04 LTS Desktop ISO

   2. Recommended developer settings (Personal preference for better performance in multitasking):
   - **CPU**: 4 CPUs x 1 Core
   - **RAM**: 8 GB
   - **HDD**: 60 GB
   - **Network**: Default settings
   - **ISO Image**: Use the downloaded Ubuntu 22.04 LTS Desktop ISO

2. **Start the VM** and proceed with the installation:
   - Choose `Install Ubuntu`.
   - Select `Minimal Installation`.
   - Accept default settings.
   - Create a user (use your initials or a username of choice).

---

## Inside Ubuntu 22.04 LTS Desktop (Minimal Installation Setup)

1. Update the package list:
   ```bash
   sudo apt update
   ```

2. Install required packages (jdk17 or 21):
   ```bash
   sudo apt install git openjdk-17-jdk maven docker.io docker-compose
   ```
   or:
   ```bash
   sudo apt install git openjdk-21-jdk maven docker.io docker-compose
   ```

3. Download and install **Eclipse IDE**:
   - Download: [Eclipse IDE for Java EE Developers](https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2023-12/R/eclipse-jee-2023-12-R-linux-gtk-x86_64.tar.gz)
   - Create an Eclipse directory:
     ```bash
     sudo mkdir /opt/eclipse
     sudo chown root:docker /opt/eclipse
     ```
   - Unpack the downloaded file:
     ```bash
     sudo tar xvzf ~/Downloads/eclipse-jee-2023-12-R-linux-gtk-x86_64.tar.gz -C /opt/eclipse
     ```
   - Create a symbolic link for Eclipse:
     ```bash
     sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse
     ```

---
## Personal IDE Choice (VSC):

- Install snap package manager with:
 ```bash
   sudo apt update
   sudo apt install snapd
```

```bash
sudo snap install code --classic
```