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.
Proxmox VirtualBox Setup
Proxmox is a great hypervisor to learn on. I am unable to have a dedicated bare metal server for it, but found an amazing way to create it in a VM. Steps Download ISO You can find the ISO for proxmox on their website here: https://www.proxmox.com/en/downloads/category/iso-images-pve Define VM In VirtualBox click “New” Then name the machine however you like. I will be using “proxmoxvb”. I set it to Linux, Other Linux (64-bit) since Proxmox isn’t in the drop down.
Proxmox with Terraform
IaC (Infrastructure as Code) is a very useful way to define and maintain you infrastructure. It allows you to define the structure of everything in a file and let Terraform manage the creation and updates to those virtual machines. I will be using Proxmox for the VMs today. Requirements A working Proxmox environment terraform installed on another computer to manage the Proxmox VMs A VM template in Proxmox to create VMs from The provider we will be using allows for iso files to be used for the VM creation but I haven’t been able to get it working.
Throttle Network Traffic Linux
With Christmas time here, my family is around quite a lot. This leads to many playing games on internet. If you need to download a large file with bandwidth concerns there is a very simple tool that can help. The command wondershaper will throttle based on an interface. Installation sudo apt update && sudo apt install -y wondershaper Preparation We need to find the interface you need to throttle. Run the following to see which interface works for you.
One way to schedule jobs on a Linux system is to use a timer file for systemd. This provides additional logging that you wouldn’t normally get with crontab. This page will go through a general setup. We will be using a oneshot service to be scheduled. Script This script will be what gets executed on a timer. We will make a test script for this. Copy the following data to /usr/local/bin/techjourney:
Bonding Interfaces using Netplan
Something that came up for me recently was setting up bonding on Ubuntu Server 20.04. Bonding is useful to give more throughput and redundancy. There are multiple bonding modes available to a virtual interface in Netplan. Some (not all) Boding Types balance-rr Round Robin using the interfaces in sequential order. This provides higher throughput and redundancy. active-backup One interface is up while the other provides redundancy in the event of a failure.
GPG Key Usage
Recently I had to learn about gpg keys. To save time searching for answers in the future here is a quick tutorial on usage. Creating Key I use RSA with 4096 bits. Please note the passphrase that is requested at the end [email protected]:~$ gpg –full-generate-key gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Using GitHub Actions to Build Python Packages
For Python projects in GitHub it would be useful to build projects automatically upon pushing changes to the master branch. Here is the file I used for my repository. The job has the following steps: Checkout code Setup Python Lint the code Build the packages Get the version for the release from setup.py Create release and upload packages This action pulls in the version from setup.py. It sets the environment variable using echo:
GitHub Self Hosted Runner Setup
GitHub Actions are a newer feature in GitHub that I just found to help with my development of python packages. The setup is incredibly easy and allows you to have automated tests/builds with your code as you develop it (CI). Prerequisites The only requirement is to have a server that you want to use to build and test your code. I will be using Ubuntu but you can use almost anything including Windows and Mac OS.
Setting Up A Nomad Playground
One thing that I’ve been looking to do at my home is to use a more sophisticated container orchestrator. Nomad works well with Hashicorp Vault and that allows for a lot of automated security setup with containers. Setting up Nomad wasn’t difficult and working with a development server is fairly easy. I use Ubuntu so if you have another flavor of linux or another OS altogether, please use this link directly from the documentation.
Extending EXT4 LVM
I was able to upgrade the storage in my desktop recently. LVM is something that makes this addition incredibly easy. This post outlines the process I took to double my storage with my new HDD. Identify Drive Find the device file we need. In this case it’s /dev/sdc. [email protected]:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 219M 1 loop /snap/gnome-3-34-1804/66 loop1 7:1 0 64.8M 1 loop /snap/gtk-common-themes/1514 loop2 7:2 0 55.