In order to login to the VM, you have to be connected to the NTNU VPN. How to do this can be found here.
Once you are connected with the VPN, you can login to the virtual machine.
- Open your terminal
- By entering
ssh <your_username>@tdt4225-14.idi.ntnu.no
where <your_username> is your username from NTNU. 2.1. When asked is you want to continue, typeyes
. 2.2. When your password is asked, enter your Feide-password. 2.3. You should be logged in now. - To open mysql, type
sudo mysql
. - The credentials of the mysql user are sent in the Whatsapp group.
To be able to run the files inside the folder "exercise2-files", you should download the data to your own pc and place it in the main foler of the project.
- install virtualenv.
- Create and activate a virtual env:
python -m venv .\venv\Scripts\activate
. - Install the required packages:
python -m pip install -r requirements.txt
. - You also have to create a
.env
file before you can run theexample.py
. The content of this file is sent in the Whatssapp group.
Every time we want to work at the assignment, sudo mongod --bind_ip_all
has to be entered in the VM.
To make it easier to work for us, I created a tmux and ran the command in there.
- If you had to run the command above, open a new terminal and ssh into the vm.
- run
sudo mongosh