Articles about software development operations

In this page, you will find articles that are related to computer infrastructure operations that are performed in the course of software development.

Examples include how to setup the server infrastructure to run Python applications, WordPress applications and etc.

Building a reverse proxy server with Nginx, Certbot, Raspbian Stretch Lite and Raspberry Pi 3

The Nginx reverse proxy server runs well on Raspberry Pi 3 and you can use it behind a router to route HTTP traffic to upstream web applications.

A Raspberry Pi 3 reverse proxy server is a very useful appliance to help us host multiple websites from home.

Some examples of web applications that you may want to host at home includes:

This post discusses how you can build a reverse proxy server with nginx, Certbot, Raspbian Stretch Lite and Raspberry Pi 3 to proxy HTTP traffic directed at applications on your home network.

Understanding the difference between the root and alias directives in Nginx

Nginx is a web server that is good for serving as a reverse proxy server, load balancer or HTTP cache.

One of the most important task in configuring Nginx to proxy HTTP / HTTPS traffic is telling Nginx where to look for files that it needs for serving HTTP / HTTPS requests.

This posts discusses the root and alias directives that we can use in Nginx configuration files for mapping a url from a HTTP request to a file on the server file system.

Installing Certbot on Raspbian Stretch Lite for obtaining Let’s Encrypt’s browser-trusted certificates

By offering free browser-trusted certificates, Let’s Encrypt makes it easy for ordinary folks like you and me to deploy secure web applications that serve HTTPS traffic 24-7.

The issuance of Let’s Encrypt certificates is automated by software participating in the ACME protocol. We will need to run such a software on devices which host web servers serving HTTPS traffic.

The Raspbian Stretch Lite operating system is a way to create performant web-based appliances with Raspberry Pis. If you need to secure your web-based applications on Raspbian Stretch Lite, you may choose to install Certbot on Raspbian Stretch Lite as a first step.

This post extends Certbot’s installation instruction on Debian Stretch to provide the steps for installing Certbot on Raspbian Stretch Lite.

How to setup Raspbian Stretch Lite on Raspberry Pi 3 to run Python 3 applications

Raspbian Stretch Lite operating system is the Raspberry Pi Foundation’s official supported operating system for running headless software. It is a good operating system for different Raspberry Pi 3 use cases. Some examples include:

If you are planning to use Raspberry Pi 3 GPIO to interface with the real world, it is recommended that you setup Raspbian Stretch Lite to run Python 3 applications.

This post provides the steps to setup Raspbian Stretch Lite on Raspberry Pi 3 for running Python 3 applications.

Setting up a fast git server on Raspberry Pi Zero W with Go Git Service (Gogs) and Raspbian Stretch Lite

The Go Programming Language is a compiled programming language created by Robert Griesemer, Rob Pike, and Ken Thompson from Google in 2009. With Google Go, it is possible to build programs that run efficiently on minimum hardware resources. The compiled code runs close to the speed of C. Use cases of Go Programming language includes Docker, Kubernetes and Go Git Service.

If you happen to need a self-hosted git server to track software projects that you build on the side, you can consider using Go Git Service. With the Raspberry Pi Zero W bundle set, you can set up a fast git server that does not take up too much space on your desk.

This post details how you can setup a fast git server on Raspberry Pi Zero W with Go Git Service and Raspbian Stretch Lite.

How to enable authenticated MongoDB access for Flask-MongoEngine applications

After having a first look at MongoDB more than 5 years back, I told myself that I will use MongoDB to realise the next functionality of Techcoil.

With exposure to Python 3, Flask and MongoEngine in 2017, I had acquired the skills to build a microsite to recommend gift ideas. This microsite uses MongoDB to store the gift recommendation data.

With Flask and MongoEngine, development of this microsite did not take too much leisure time. With MongoDB not enforcing authentication, there were not much hindrance in setting up the development environment for this microsite.

However, this free-for-all mode of accessing MongoDB is not recommended for production environments. Without authentication, it is easier for ill-intentioned people to mess up the backend database.

To ensure that I have a go-to post for implementing authenticated access to MongoDB backed projects in the future, I document the steps needed for Flask-MongoEngine applications to access MongoDB instances with access control turned on.

How I setup Jenkins on my Raspberry Pi 3 with Raspbian Stretch Lite

Jenkins is a renowned open source automation server that can help offload programmers from performing repetitive tasks like:

  • running unit tests to make sure new code does not break existing codes.
  • compiling and packaging the binaries from codes and dependencies.
  • deploying new binaries to testing servers.
  • checking whether production server is up and running.
  • and etc.

If you have a Raspberry Pi 3 and you want to automate some of the tasks for your side projects, you may want to consider setting up Jenkins on your Raspberry Pi 3 with Raspbian Stretch Lite as the operating system.

This post documents how I setup Jenkins on my Raspberry Pi 3 with Raspbian Stretch Lite.

Setting up WordPress on Raspberry Pi Zero W with Raspbian Stretch Lite, Nginx, MariaDB and PHP as the LEMP stack

A Raspberry Pi Zero W is a small and capable computer that included a Wi-Fi chip for projects that requires an Internet connection.

Apart from running client programs on the Raspberry Pi Zero W, it is equally capable of being a web server. Since I had a spare Raspberry Pi Zero W lying around the house and there are good reasons to blog as a programmer, I decided to use it as a WordPress server to collect content for a new blog project.

This post documents how I setup WordPress on a Raspberry Pi Zero W with Raspbian Stretch Lite, nginx, MariaDB and PHP as the LEMP stack.

How to host multiple websites from home

A website is a collection of related web pages, including multimedia content, that people can access anytime from anywhere of the Internet.

A website facilities the exchange of information between multiple parties. For instance, when you read the content of this page, I would have, hopefully, share the information of how to host multiple websites from home.

With the proliferation of single-board computers, it is now inexpensive to deploy computing devices to serve web applications from home. If you do not switch off your Internet modem at home, you may want the option of accessing some of these devices when you are away from home.

For example, here are some web applications / websites that you may host from home:

This post documents some procedures that we can follow in order to host multiple websites from home.