Welcome
Hello!
My name is Dan and I write this Blog to share my journeys as I figure things out in technology. New posts should pop up here often. Thanks for visiting my website! Click on “Posts” to see all of the posts I’ve made so far.
Ubuntu Multipass
A new technology I found recently was Ubuntu Multipass. It allows you to spin up Ubuntu VMs on demand and is incredibly easy to use. This post will be about installing and basic usage of Ubuntu Multipass.
Installation Multipass can be installed using snap.
sudo snap install multipass Creating Instances Creating a multipass Ubuntu instance is a single command.
dan@ubuntu-test:~$ multipass launch –name firstinstance Launched: firstinstance Running Commands To run a command on an instance you can use the following command.
Creating Your Own CA
Creating your own CA for certificate management is a great way to have trusted certificates outside of officially signed certs. If certificates are created and signed using this CA and the CA is trusted, the new cert will also be trusted. This guide will show how to create a CA certificate.
Creating CA We generate the certificates for the CA First. It is the same process as generating a normal certificate.
Automate SSL Certs with Terraform
One way that I found to use terraform recently showed me how to create SSL certificates for my docker applications in the terraform itself. We are using two providers for this. The tls provider and the local_file provider.
Generate SSL Cert Data To generate a private key I use the tls_private_key resource.
resource "tls_private_key" "nextcloud" { algorithm = "RSA" } Then to generate the public key I usually use a self-signed cert from the tls_self_signed_cert resource.
Grafana Server Setup
Grafana is an amazing server application that can give insight, alerting, and many metrics on infrastructure. Grafana is incredibly easy to setup and this post will go over how to install this application. The commands are referenced from here.
Setup Commands To install Grafana Server run the following commands.
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list sudo apt-get update sudo apt-get install -y grafana sudo systemctl enable grafana-server sudo systemctl restart grafana-server First Login Navigate to the server at port 3000 to get to the login page.
Nextcloud Home Setup
I recently stumbled upon an application called Nextcloud. I was surprised at how easy it was to setup through docker. Something that I have needed for a while now was a place to store shared files at home. Nextcloud helps with this because it allows me to have a login attached to using the share that is easily accessible to my wife and family. In this tutorial I will walk through setting up a basic environment and then supply code for a more thorough setup using terraform.
Prometheus Setup on Raspbian
Prometheus is a time series database for monitoring and alerting. For my environment I am going to use it as a data source in Grafana. This post will go over installing Prometheus on a Raspberry Pi and scraping node_exporter.
Download For Raspbian to run Prometheus we need to download a precompiled version for the armv7 architecture and then unarchive the download.
wget https://github.com/prometheus/prometheus/releases/download/v2.22.0/prometheus-2.22.0.linux-armv7.tar.gz tar xfz prometheus-2.22.0.linux-armv7.tar.gz Installation Now the folder needs to be moved to a system location before we create the systemd service for prometheus.
Wireguard Split vs Full Tunnel
In my previous post about setting up a wireguard VPN using DigitalOcean we are using a full tunnel VPN for anonymity. This post discusses the main differences between full and split tunnels and how to implement in wireguard. Like in the previous post, you can find the code here.
Full Tunnel Full tunnel VPNs will send all network traffic through to the VPN. My VPN repository currently uses a full tunnel setup.
Node Exporter Setup
In order for me to monitor my home servers, the first step for me is to install node exporter to push time series data to Prometheus. This post walks through installing node exporter on a raspberry pi. My next post will be about getting the data into Prometheus and setting it up. If you not interested in installing on a raspberry pi, my ansible repository supports all architectures using this same approach.
DigitalOcean Personal VPN
Something useful for internet anonymity is having a VPN you can trust. I recently tried making a repository containing code to create a Wireguard VPN on the fly in DigitalOcean. You can control the logging and where in the world the VPN gets started. All of the code can be found here. Let’s walk through the code.
I am not responsible for any charges you incur by using this code. DigitalOcean will charge you for what resources you use.
ArchiveBox Linux Setup
Archive box is an opensource application that allows the downloading and archiving of websites to be used offline. It has a good user interface and is simple to use. This post will go through easy setup and basic usage.
Setup For applications like this, it’s usually best to just use docker. I use ArchiveBox at home and don’t require SSL so the basic docker-compose configuration will be sufficient. You can find the docker-compose.