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.

Ensuring that your Supervisor subprocesses can run your Python applications properly behind your http proxy on Ubuntu Server 14.0.4

I had been using Supervisor to run my Python application for quite a while on a Ubuntu Server 14.0.4 box.

There was this OAuth feature that I had implemented on my Python Flask application to allow my users to sign in with their social account.

After completing the OAuth feature and ensuring that it worked fine on my development environment, I deployed the feature on my Ubuntu Server 14.0.4 instance.

However, my Python application encountered a HTTP request timeout error when it attempted to contact the OAuth server to authenticate my user login.

It turned out that there was no HTTP and HTTPS proxy settings available for my Python application to use when it tried to contact the OAuth server which is sitting somewhere in the Internet.

This post documents three ways which I had considered for propagating HTTP and HTTPS proxy settings to my Python application via the http_proxy and https_proxy environment variables.

Setting up a free CA signed SSL certificate from Let’s Encrypt for my LEMP server on my Raspberry Pi 3 with an Ubuntu Server 15.10.3 image to secure my WordPress site

After setting up a LEMP web server on Raspberry Pi 3 with an Ubuntu Server 15.10.3 image to host my new WordPress website, a good colleague of mine recommended me to try implementing a free certified SSL certificate. The intelligent and generous folks from Let’s Encrypt had created a free and open Certificate Authority and an automated workflow for websites to generate certified SSL certificates for serving trusted and encrypted communication.

Since, there is no cost involved in implementing the SSL certificate, I went on to try and implement one on the Nginx server on my Raspberry Pi 3.

This post documents my process on setting up a Let’s Encrypt certified SSL certificate for my Nginx server on my Raspberry Pi 3.

Adding swap space for my Ubuntu Server 15.10.3 image running on my Raspberry Pi 3

A swap space. also known as virtual memory, is a dedicated area on a writable medium that acts like the RAM for Linux processes to remember things while they are running. For laptop and desktop computers, that writable medium is usually a hard disk. For my Raspberry Pi 3, it is the microSD card which I had written my Ubuntu 15.10.3 image on.

While running the Let’s Encrypt application to set up a free CA signed SSL certificate for my LEMP server on my Raspberry Pi 3 to secure connections to my WordPress site, the Let’s Encrypt application hanged while it was trying to install the Python dependencies that it needed. This prompted me to turn to swap space for increasing the total memory that processes on my Ubuntu 15.10.3 image can utilize.

This post documents the steps that I took to add some swap space on my Ubuntu 15.10.3 image running on my Raspberry Pi 3 so that processes can use more than 1GB of memory.

How I resized the file system of my Ubuntu Server 15.10.3 image to utilize the entire microSD card space on my Raspberry Pi 3

After setting up a LEMP web server on Raspberry Pi 3 with an Ubuntu Server 15.10.3 image to host my new WordPress website, I decided to create some swap space to complement the 1GB ram on my Raspberry Pi 3 in running more services.

When I tried to create a 4GB swap file, the fallocate command complained that there was no space left on my Raspberry Pi 3:

Home directory of the LocalSystem account in Windows Server 2012

Quite a few applications that I had encountered throughout my career provide the option to look for custom configurations inside the home directory of user accounts that had started them. One such example is the Git command, which looks for the private key to communicate with a GitHub repository inside a .ssh directory located inside the home directory of the user that runs it.

This post documents the home directory of the LocalSystem account in my Windows Server 2012.

Setting up a LEMP web server on Raspberry Pi 3 with an Ubuntu Server 15.10.3 image to host a WordPress website

I was trying to start a new WordPress site. Before hosting it on a Digital Ocean droplet, I decided to incubate the WordPress site on a Raspberry Pi 3 to clock some content. This post documents the steps that I took to set up a LEMP web server on Raspberry Pi 3 with an Ubuntu server 15.10.3 image to host a new WordPress site.

How I make my Jenkins Slave Windows Service recognize the global modules installed by npm

I was trying to setup a Jenkins Slave on a Windows machine which will get protractor to run a series of functional tests that the team had written to test our AngularJS application.

Idea was that whenever that there was a code change being committed to the master branch on our GitHub repository, the Jenkins Slave will be called upon to checkout the latest codes and get protractor to run the functional tests base from a configuration.js file in the codebase.

One of the hurdles that I encountered was that my Jenkins Slave Windows Service was not able to recognize the executables from Node.js modules that were installed by npm globally, which in this case was the protractor executable.

This post describes the steps that I took in order to make Jenkins Slave Windows Service recognize the global modules installed by npm.

How to look for unittest.TestCase subclasses defined in random Python scripts and run them in one shot

To ensure robustness of our Python application, members of the team had written unit test cases to assert that the various code units of the application are working as intended. Unit test cases that are meant to test the same program component are placed together as functions of the same class and contained in a Python script.

As the Python application grows, the number of test scripts grew as well. In an attempt to perform automated unit testing with Jenkins, the first thing that I did was to write a Python script that will look for all the test cases in the application directory and run them at one go.

This post describes the Python script in detail.

How I solved the database connection error from my WordPress installation which is hosted on the default PHP FPM server in Mac OS X EL Capitan

I was trying to setup a WordPress instance with the built-in PHP-FPM server on my Mac OS X el Capitan. After applying the relevant Nginx configurations for WordPress installations, I had been able to run the php codes from my WordPress instance.

However, when I tried to run the WordPress install script, my WordPress setup complained that it was unable to connect to the database server.