Terraform AWS CloudFront Static site and S3 bucket

Creating a CloudFront + S3 static site in Terraform Creating a simple static site using serverless computing. This was a project which would lend itself to Hugo, S3 and/or CloudFront. The site used https://gohugo.io/ to generate the content, the github repo for the project is https://github.com/tommybobbins/chapel_ramblers_static_site. Alex covers this step by step in his blog here: https://www.alexhyett.com/terraform-s3-static-website-hosting/ To upload content additions that can be used is the local-exec to copy the site content in place from var.
Read more →

Growing the Underlying Disks for DRBD - move from smaller disks to bigger

Moving from small disks to big disks in DRBD using logical volume manager. How to move DRBD from smaller disks to bigger disks without needing a full resync. Disclaimer - Check with a DRBD expert before performing any kind of disk migration using DRBD. Take Backups. The idea behind this HOWTO is to perform the disk growth without a full DRBD resync. Environment Assuming we have a DRBD cluster as follows:
Read more →

Cold backup of QEMU/KVM images

Taking a cold backup of a QEMU or KVM VMs If you need to take backups of qcow2 images, the following script is useful. QEMU uses two pieces of information, the xml file which makes up the metadata about the VM (CPU, memory, Network configuration) and the disk image itself which is a qcow2 image by defalt. Backup #!/bin/bash BACKUP_DIR="/tng_nfs/KVM_GOLD" if ! [ -d ${BACKUP_DIR} ] then echo "Backup directory $BACKUP_DIR does not exist" fi for SERVER in $(virsh list –all | awk '{print $2}' | egrep -v "Name" | egrep -v "^$") do echo $SERVER virsh dumpxml ${SERVER} > ${BACKUP_DIR}/${SERVER}.
Read more →

Raspberry Pi video switcher

Switching a looped video to another video when a GPIO pin is pushed Assuming we have two videos, vid1 and vid2. We want to loop file1 and then when the GPIO button is pushed, we play vid2 to completion, then switch back to vid1. Here is some code to do that. #!/usr/bin/python3 from gpiozero import LED, Button from time import sleep from datetime import datetime from subprocess import Popen from signal import pause from os import system import os button1 = Button(10) vid1="home.
Read more →

Elasticsearch 6 backups via snapshots for CentOS 7.0

Elasticsearch 6.2 backups on CentOS 7/RHEL 7 I need to run Elasticsearch 6.2 and upgrade to Elasticsearch 7.11, making snapshots at each stage (prior to 6.8 upgrade and 7.11). In order to install ES 6.2.2, this was downloaded and built from a zipfile as the RPM format is incompatible with newer rpm releases. This method might not be a complete as installing a package from the repo, The problem I had was with the path.
Read more →