Skip to main content

Virtual Machines

Below are virtual machines we need to configure for use:

  • Redis (Caching)
  • Grafana (Visualization)
  • Kdb (Timeseries Database)
  • RabbitMQ (Message Queuing)
  • PostGres (General Database)
  • K3S Server (Kubernetes Server) (1)
  • K3S Agent (kubernetes Worker Nodes) (3)

Now you may decide to use different databases and all have their pros and cons. The one you should mostly be aware of is the timeseries databases because each act differently but options include:

For message queuing, you also have options which may either include using the Redis built in Pub/Sub system or something like Apache Kafka.

Configuration

tip

Requirements will change over time, as you grow, the specs on each virtual machine will change so don't get stuck on getting it right the first time.

Redis

  • Install on SSD
  • 4 virtual cores
  • 4 GB of RAM
  • 64 GB of disk space

Grafana

  • Install on SSD
  • 4 virtual cores
  • 4 GB of RAM
  • 64 GB of disk space

PostGres

  • Install on SSD
  • 4 virtual cores
  • 4 GB of RAM
  • 128 GB of disk space

QuestDb

  • Install on NVME1N1P1
  • 26 virtual cores
  • 16 GB of RAM
  • 256 GB of disk space

K3S Server

  • Install on NVME0N1P1
  • 4 virtual cores
  • 4 GB of RAM
  • 128 GB of disk space

K3S Agent (3)

  • Install on NVME0N1P1
  • 4 virtual cores
  • 8 GB of RAM
  • 128 GB of disk space

Ensuring drive space is expanded

Sometimes Ubuntu will not set the file system to use the full disk space so use the following commands:

vgdisplay
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

Check disk space using

df -h

Disk Space

Reserved IP Addresses

It is very important that for each virtual machine, you configure a reserved IP address for each machine. This will ensure no virtual machine IP address conflicts and it will make it easier to find each machine when necessary.