1447 words | 7 minutes

This website is hosted on a VPS from Vultr, it is cheap - $6 a month, has 1GB of RAM, 1 vCPU, a 25GB disk and 2000GB bandwidth. Adequate for serving a statically generated site. In this post I will detail how I set the VPS up, and share how I created a deployment pipeline which uses two gitlab runners, one on my home network and one on the VPS to deploy the website. The site is served using NGINX, which is a common server, used a lot for load balancing and used for Ingress in Kubernetes. Cloudflare also provides my DNS and protection from DDoS, etc, and it’s free. I use Let’s Encrypt for a free SSL certificate and the certificate is automatically renewed every 60 days by certbot (Let’s Encrypt certs expire after 90 days, do the renew process is done 30 days prior to account for delays). Cloudflare does have it’s own certificates in front of it though, which are provided by Google.

699 words | 4 minutes

I use cloudflare to proxy requests to the server hosting this site, as it adds protection such as DDoS and such. But if someone knows the IP address of the server, they can connect directly, bypassing the protections provided by Cloudflare. Cloudflare publishes the IP address range CIDR’s that they use on their website, but it is also accessible via an API call. Because I didn’t want to spend time typing the commands individually, I wrote a bash script, well I started with a bash script, then thought I should write it in Go, but after spending a couple hours messing around with Go, I decided to actually use bash, which was a lot easier.

210 words | 1 minutes

I spent the past weekend messing around with Python and a couple of libraries to automate the deployment of droplets to Digital Ocean. The two libraries that I used are python digitalocean and fabric. Python digitalocean opens up the Digital Ocean API to python developers with easy to use functions. Fabric provides a way of connecting to a remote server and issuing various commands, so the combination of the two make for a great automation framework. The script I wrote, uses the python_digitalocean library to first provision the droplet and returns the IP. Then fabric is used to carry out several first time administration tasks that I do when first creating a server.

686 words | 4 minutes

I have a gitlab instance set up to host my own git repositories. It is a pretty handy app, you get the features of github, but without having someone else holding your code.

I keep the theme for this website as a git repository and wanted to automatically deploy new changes once they are pushed to the master branch. Luckily, gitlab has a webhooks feature, it will call any URL you specify and send a JSON request after every receive.

Serving Ghost with Apache

377 words | 2 minutes

Ghost is a great blogging platform built with node.js. It is what I use to run this blog. Most of the instructions online deal with using NGINX to proxy requests to and from the running node instance. I needed to use Apache, since the server I installed on already has Apache. This guide will show you how to set up proxy pass on Apache.

Getting Started

You should already have these prerequisites installed: