Setup NFS Server on Ubuntu

NFS - Network File System is a distributed file system protocol developed by Sun Systems. It facilitates a client computer to have access to file/folder over network like a local folder. This is a easy/simple way to provide persistant storage for your docker-swarm or kubernetes cluster. In both these cases, the container (or pod) run on one of the available nodes (servers), and when we have replicas it will be running on more than one node. So local storage on the server is out of the question.

With NFS we can directly mount the folder in the container. We can control everything from the configuration file. And thanks to the NFS storage we can increase and reduce node without worries as well.

Wildcard Domain in Pi Hole

PiHole is a DNS server that will block ads and website on a DNS level. This is an integral part of my homelab as it blocks a lot of ads on my phones and system, and also easily allows us to manage domains for local application.

For homelab I have a docker-swarm which is managed using portainer. I have a nginx proxy manager to map the ports to a proper domain, even provide https using lets encrypt.But PiHole doesn’t have a wildcard domain setting, hence after i set or before i set a domain my nginx proxy I need to add it to PiHole.

Validating YAML Files in Ruby

YAML stands for “YAML Ain’t Markup Language”. YAML is a data serialization language that is often used for writing configuration files.

In simple terms YAML is like XML or JSON, but for human beings rather than computers. I feel this is getting overlooked a lot, programmers need to understand that. Another human like configuration language I like is TOML (Tom’s Obvious Minimal Language).

In a static language (like crystal) you need to define the structure of a YAML or JSON file. Defining the structure also act as validation of its schema. Validating the schema is a good idea because it ensure’s that all the required data is present. Its better to know data is missing when your program starts rather than while it is running.

For dynamic language like ruby you can load a yaml file, and ruby will dynamically initialize it. It does make your life easier as a programmer. You don’t need to define the schema, and remember to update the schema when you add a new variable to your file.

But defining the schema has its benefits -

  1. For the User: It reminds then to have the configuration filled before running their program
  2. For the Developer: It helps us to eliminate the configuration file as a possible reason for the program not running.

Which Language Should I Build This Software In

Which Language Should I Build This Software In? or Which language should I have this software developed In?

This is a question that software devs gets asked a lot. By there friends/colleague , usually by who are not part of the software industry. This is my answer to them:

If you had an idea for a novel? or a poem? which language will you write it in. Italian, Tamil, Bengali? Would you try to learn a new language because there are a lot of similar novels (anime) in Chinese or Japanese.

The best language to write your novel is the language you know the most.

Getting Started With ESP 32 Development

ESP 32 is a series of low-cost, low-power system on chip micro controllers with integrated Wi-FI and Bluetooth. SoC or system on chip is an integrated circuit that integrates all or most of the component of a computer. Example the CPU, RAM, IO interface, GPU, etc. This form is becoming more and more popular thanks to growing smartphone and computing industry. Apple M1 chip is a good example on the direction in which SoC’s are going.

The ESP 32 is really low cost it cost like 350 in India, and less than 10$ in the US. Now when you buy this you don’t buy the chip alone, but a chip on a development board. There are several articles (https://makeradvisor.com/esp32-development-boards-review-comparison/) on that. The board that I bought from amazon was this https://www.amazon.com/dp/B0718T232Z?psc=1&ref=ppx_yo2ov_dt_b_product_details, i also bought one with OLED display as well https://www.amazon.com/dp/B07DKD79Y9?psc=1&ref=ppx_yo2ov_dt_b_product_details.

In this article I will be talking about how to get started. We will basically will be setting up Aurdino IDE in linux, followed by flashing few sample programs like: