Learning Target
- Understand Virtual Box / any other Hypervisor software
- Learn how to start a VM and play around with VMs
- Understand how Computers communicates within a network
- How to host web applications and servers
- How to test the connections
- Implement the whole thing with Docker to make life much easier
Pratically understanding Virtualization:
We will understand virtualization at a high level by creating VM’s on my computer.
- Create 3 VM’s using Virtual Box and Ubuntu (You can use Ubuntu Server or Ubuntu Desktop)
- Web Server - Hosts the Web application
- DB Server - Hosts the Database
- Client - To test network
- Create/Take a pre existing Full stack project. I have used Express in the BE, React in the FE and MongoDB as database. The tech stack is immaterial
- Set up the DB Server
- Initialize the Server Network as a bridged adapter
- Check the IP using
ifconfig
- Ping and Check if DB server is accessible from host using
ping <ip-address>
- Host the Database in the DB server
- Run the Database in the DB Server
- Download Studio 3T (Mongo DB client)
- Test connection to the DB from host
- Set up Web Server
- Install
Ubuntu Desktop
in Virtual Box
- Run the web application in the VM
- Try to pint the DB server from the web server to test connection
- Point the Web Server to the IP of the DB server.
Achieving the same with DOCKER
- Install Docker on your host machine
- Write a Dockerfile for FE Server
- Write a Dockerfile for BE Server
- Write a Docker Compose file that packs the FE, BE and DB in one image
- Run the Docker Compose file
- Test the running application.