M10 - JAMK VLE
Introduction
Virtual Learning Environment (VLE) is part of the LabraNet study network and is run locally in a private cloud infrastructure. VLE provides infrastructure for realistic IT laboratory conditions for advanced studies courses and environments can be deployed quickly using a one-click portal.
VLE environment is only available to students enrolled to courses which utilize VLE for exercises. To access VLE, you must first have a working LabraNet VPN connection. All VLE deployments are accessed under https://portal.vle.fi. More information about the environment and infrastructure can be found in https://index.vle.fi (also requires VPN).
VPN to labranet
Remember check VPN to labranet instructions from here https://student.labranet.jamk.fi/instructions/
How to start
Students of JAMK's IT Institute can use the VLE environment for their studies. Student can login from labranet computers (or use VPN connection to labranet) at https://portal.vle.fi/login.
You can use Template Catalog to create a new deployment using a template (if any is created for you by system admins). You should have one which includes Ubuntu. Create your own virtual machine. After that open Deployments (View deployments and access virtual machines).
Note
Note that you have different "view" in your deployments.
Configure Virtual Server
You can click one of your deployments to see more configuration.
With the OPEN WEBCONSOLE function, you can log in to your virtual server in a web browser window using a command line interface. Your initial username with sudo rights is user
and password is root66
. Change the password the very first time you log in with the passwd
command.
In the upper right corner, you can use the Actions function to delete your virtual server. You will then lose all your changes. You can then recreate your virtual server in the initial state in the Template Catalog menu.
In the lower left corner, with the Actions function, you can restart your server, etc.
In the middle of the window you can see the IP number used by your server. The IP address may change from time to time. You can check the IP in use from WEBCONSOLE with the ifconfig
command.
It is probably easiest to access your virtual server remotely using the ssh protocol. You can log in as a remote user (with sudo rights) e.g. with the Putty program in exactly the same way as on the student.labranet.jamk.fi server. Logging in with SSH is only possible from the labranet network or you must have VPN enabled.
Putty
First, find out the IP number of your server and make sure that you are using labranet VPN or you are in the labranet network. Then enter your IP number in Putty's contact information and click Open.
Log in with your user ID/password and you should see instructions.
Publish Node.js app
This chapter has a quick information how you can publish Node.js application to VLE with following configuration:
- Ubuntu Linux 20.04 LTS based virtual machine is used
- PM2 is used
- Apache web server is used
Install Apache
Give a following commands
1 2 |
|
Install Node.js and npm
Give a following commands
1 2 |
|
Create a sample Node.js app
Create a folder
1 |
|
Create a app file
1 |
|
Add a following content
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Add a following rights
1 |
|
Install PM2 and start your Node.js app
Give a following commands
1 2 3 |
|
Active Apache and configure Apache proxy module
Give a following commands
1 2 |
|
Create a following file
1 |
|
Add a following content
1 2 3 4 5 |
|
Also add 8080 as the listening TCP port by editing the file
1 |
|
Add following line below Listen 80
line
1 |
|
Use above virtual host with below commands
1 2 |
|
Write your virtual machine IP and port to browser: http://your-vle-ip-here:8080/ and you should see Hello World!
text in your browser.
Publish Node.js with Express and Mongo
By default you might get old version of Node.js with sudo apt install nodejs
command and it is not working with Mongoose (Node version need to be higher than 12). You can follow this link information how to install higher version of Node to your VLE - Ubuntu: How to Install Node.js and npm on Ubuntu 22.04.
Basicly you will need to give a following commands:
1 2 3 |
|
After that you can create your Node.js application with Express and Mongoose. Follow instructions found in course materials. Use PM2 to start your project index.js file.
frontend
You can create/publish your full stack application frontend also in VLE.