Skip to content

Instantly share code, notes, and snippets.

@candoom
candoom / resticheat.md
Created March 6, 2023 08:12 — forked from perfecto25/resticheat.md
Restic cheatsheet

Restic backup application - commands cheatsheet

Installation & config

  1. add Retic repo
  2. yum install restic

add a Restic credential file to root

vim /root/.restic
ISPConfig Migration
====================
Danke: http://i-dyllen.dk/wordpress/?p=244
Vorbereitungen:
- Aktualisieren den alten Server auf die neueste Version von ISPConfig 3
- Installiere den neuen Server mit der neuesten Version von ISPConfig 3
(gleiche Pakete wie die Ursprungsserver und dieselben speziellen Konfigurationen von Apache Modulen etc.)
- apt-get install rsync (auf beiden Systemen)
@candoom
candoom / create_user_and_kubeconfig_rancher2.sh
Created May 25, 2022 07:29 — forked from superseb/create_user_and_kubeconfig_rancher2.sh
Create local user and generate kubeconfig in Rancher 2 via API
#!/bin/bash
RANCHERENDPOINT=https://your_rancher_endpoint/v3
# The name of the cluster where the user needs to be added
CLUSTERNAME=your_cluster_name
# Username, password and realname of the user
USERNAME=username
PASSWORD=password
REALNAME=myrealname
# Role of the user
GLOBALROLE=user
ansible -i [inventory] -m shell -a 'fdisk -l' --become -K -l [host|group] all
### APT
## Update all packages
$ ansible -m apt -a 'upgrade=yes update_cache=yes cache_valid_time=86400 force_apt_get=yes' --become -K -l [host|group] all
@candoom
candoom / promtail_on_proxmox.txt
Created November 21, 2021 18:32
Howto install Promtail on Proxmox
$ wget https://github.com/grafana/loki/releases/download/v2.4.1/promtail-linux-amd64.zip
$ unzip promtail-linux-amd64.zip
$ mv promtail-linux-amd64 /usr/local/bin/
$ ln -s /usr/local/bin/promtail-linux-amd64 /usr/local/bin/promtail
$ useradd --system promtail
$ gpasswd -a promtail adm
$ nano /etc/systemd/system/promtail.service
$ systemctl daemon-reload
$ systemctl start promtail.service
@candoom
candoom / gist:0fb8413b8890df932978fcfebc2784d8
Created September 7, 2021 13:01
Install Podman in WSL - Debian 10
sudo apt-get install debian-archive-keyring
sudo sh -c "echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get -y -t buster-backports install libseccomp2
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update -qq
sudo apt-get -qq -y install podman
sudo mkdir -p /etc/containers
@candoom
candoom / Excel Password Generator
Created July 22, 2021 09:12 — forked from coccoinomane/Excel Password Generator.md
Copy this formula into an Excel cell to generate a random 9-character password
Copy this formula into an Excel cell to generate a random 9-character password. Then
Copy & Paste Special (as value) in place in order to avoid the cell being continuosly
re-evaluated. Formula taken from:
http://ficility.net/2013/04/26/easy-excel-based-password-generator/.
=CHAR(RANDBETWEEN(65;90))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(65;90))&RANDBETWEEN(1000;9999)&CHAR(RANDBETWEEN(42;43))
>>> If it does not work, try like this (commas instead of semicolons):
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(1000,9999)&CHAR(RANDBETWEEN(42,43))
@candoom
candoom / docker-nfs-volumes.md
Created March 23, 2021 19:34 — forked from ruanbekker/docker-nfs-volumes.md
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
#!/bin/bash
# Proof of concept of running playbooks in AWX and recording them in ARA
# From a vanilla CentOS8 image: https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2
# Add local bin directory to PATH so we can use things installed with "pip install --user"
export PATH=$PATH:~/.local/bin
dnf -y update
# Install Ansible and Python3
@candoom
candoom / install-kubernetes-flannel-centos7.md
Created December 11, 2020 13:01 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine