klemzi / 3-tierWithNFS

3-tier Web Application Architecture with single database and an NFS Server as a shared files storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3-tier Web Application Architecture with a single database and an NFS server as a shared files storage

 Architecture

Prepare NFS server

  1. Spinned up an EC2 instance RHEL Linux 8 Operating System.
  2. Attached 3 EBS volumes (10GB) and created 3 logical volumes off them.

Logical volumes

  1. flashed a filesystem and mounted the logical volumes.

 Mounted

  1. Installed NFS server using sudo yum install nfs-utils -y, and ensured the nfs-server.service runs at boot.

 nfs server running

  1. An NFS server maintains a table of local physical file systems that are accessible to NFS clients. The master export table is kept in a file named /var/lib/nfs/etab and is initialized with the contents of /etc/exports and files under /etc/exports.d/. Below is the contents added to the /etc/exports file and by invoking exportfs -ar, the master export table is initialized.

 exports file  master table

  1. Get the NFS server port with rpcinfo -p | grep nfs, have the port as well as TCP 111, UDP 111, UDP 2049 accessible on the security group attached to the server.

 ports  updated SG

Prepare Database server

  1. Spinned up another server, installed MySQL server.
  2. Created a database with command create database tooling; and switched to this database use tooling;.
  3. Creates a database user webaccess.

About

3-tier Web Application Architecture with single database and an NFS Server as a shared files storage