Django and Celery using Redis as backend in Docker

Introduction This post is to help with the following two tutorials (for setting up Celery with Django): https://levelup.gitconnected.com/django-celery-going-deeper-with-background-tasks-in-python-fa44958cf7cd https://testdriven.io/courses/django-celery/docker/ If you’re using or want to use Windows with Celery, it is better to run it in a container (or another way that you’re actually using Linux). Since Celery on Windows is not supported and they will not help you if you are going to still do this. Assumption You have Docker and docker compose up and running locally....

January 16, 2023 · 2 min · 291 words · Me

Rebooting Linux When the Reboot Command Does Not Work

So on a system with systemd (e.g. Debian), when you get the following message: $ sudo reboot System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Failed to talk to init daemon. Check if you have Systemd You can verify if it has systemd with: $ ls -l /sbin/init lrwxrwxrwx 1 root root 20 Jul 8 2021 /sbin/init -> /lib/systemd/systemd Or with...

December 28, 2022 · 1 min · 193 words · Me

Linux MDADM RAID using GPT named partitions

This is done on Debian 11 and I will assume no GPT partition table was used, and thus creates one. If GPT is already installed, you can skip the GPT creation step which would destroy all data on your disk. Create GPT partition table When we know our disk (figuring out our disk), we can start fdisk. In this case, I’m editing /dev/sdf. $ sudo fdisk /dev/sdf Welcome to fdisk (util-linux 2....

December 27, 2022 · 4 min · 770 words · Me

Linux RAID Cheat Sheet

Normal RAID situation Check RAID status: # mdadm --detail /dev/md0 Where /dev/md0 is the path to the volume. Example results: /dev/md0: Version : 1.2 Creation Time : Sun Dec 27 00:33:54 2020 Raid Level : raid5 Array Size : 9766912000 (9314.45 GiB 10001.32 GB) Used Dev Size : 1953382400 (1862.89 GiB 2000.26 GB) Raid Devices : 6 Total Devices : 6 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Sun Dec 11 17:19:25 2022 State : active Active Devices : 6 Working Devices : 6 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Consistency Policy : bitmap Name : kn0:0 (local to host kn0) UUID : 00000000:00000000:00000000:00000000 Events : 22001356 Number Major Minor RaidDevice State 0 8 48 0 active sync /dev/sdd 7 8 80 1 active sync /dev/sdf 8 8 16 2 active sync /dev/sdb 3 8 0 3 active sync /dev/sda 4 8 32 4 active sync /dev/sdc 6 8 64 5 active sync /dev/sde Check for RAID status:...

December 11, 2022 · 7 min · 1384 words · Me

Ansible on Debian (10)

To install Ansible on Debian (10). Open a shell, and as root user run: apt-get update apt-get install -y gnupg2 sh -c 'echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list' apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 apt update apt install ansible -y

November 11, 2022 · 1 min · 41 words · Me