Head over to https://github.com/waja/debian-update-cheatsheets/blob/jessie2stretch/jessie2stretch.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOCKER_BASE=/srv/docker | |
mkdir -p ${DOCKER_BASE}/watchtower/container.conf | |
cat > ${DOCKER_BASE}/watchtower/container.conf/docker-compose.yml <<EOF | |
version: '3.7' | |
services: | |
watchtower: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat <<EOF > /etc/apt/preferences.d/docker_pinning | |
Package: docker-ce* | |
Pin: version 5:27.5.* | |
Pin-Priority: 1000 | |
Package: containerd.io | |
Pin: version 1.7* | |
Pin-Priority: 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull base image | |
FROM debian:latest | |
# Dockerfile Maintainer | |
MAINTAINER Jan Wagner "waja@cyconet.org" | |
# Install nginx and adjust nginx config to stay in foreground | |
RUN apt-get update && apt-get install --no-install-recommends -y nginx; \ | |
echo "daemon off;" >> /etc/nginx/nginx.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MYSQLADMIN_CFG="/etc/mysql/mariadb.conf.d/90-mysqladmin.cnf" | |
# generate password | |
PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'); | |
# adjust /etc/mysql/debian.cnf (used as defaults file by system scripts) | |
sed -i "s/^password =.*$/password = ${PASS}/" /etc/mysql/debian.cnf | |
sed -i "s/^user =.*$/user = debian-sys-maint/" /etc/mysql/debian.cnf | |
# create config file for mysqladmin itself (maybe not needed) | |
umask 066 | |
cat > ${MYSQLADMIN_CFG} <<EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOCKER_BASE="${DOCKER_BASE:-/srv/docker}" | |
TRAEFIK_DIR="${TRAEFIK_DIR:-traefik}" | |
mkdir -p ${DOCKER_BASE}/${TRAEFIK_DIR}/container.conf | |
touch ${DOCKER_BASE}/${TRAEFIK_DIR}/container.conf/.env | |
ln -s container.conf/.env ${DOCKER_BASE}/${TRAEFIK_DIR}/ | |
cat > ${DOCKER_BASE}/${TRAEFIK_DIR}/container.conf/docker-compose.yml <<EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
_DEBUG="on" | |
DEBUGFILE=/tmp/sentinel_failover.log | |
VIP='10.125.125.30' | |
MASTERIP=${6} | |
MASK='24' | |
IFACE='eth0' | |
MYIP=$(ip -4 -o addr show dev ${IFACE}| grep -v secondary| awk '{split($4,a,"/");print a[1]}') | |
DEBUG () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wget https://gist.githubusercontent.com/waja/d0995072b54b4ab5cb2b5e9ab9962543/raw/deploy_icinga2_agent_hw.sh -O /tmp/b && bash /tmp/b | |
. /etc/os-release | |
if [ "$(systemd-detect-virt)" == "none" ]; then | |
modprobe ipmi_si && modprobe ipmi_devintf && \ | |
apt-get install -y --no-install-recommends -t ${VERSION_CODENAME}-backports freeipmi-tools libipc-run-perl pciutils && \ | |
echo "nagios ALL=(root) NOPASSWD: /usr/sbin/ipmi-sensors, /usr/sbin/ipmi-sel, /usr/sbin/ipmi-fru, /usr/sbin/ipmi-dcmi" > /etc/sudoers.d/check_ipmi_sensor && \ | |
echo "nagios ALL=(root) NOPASSWD: /usr/sbin/smartctl" > /etc/sudoers.d/check_smart && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SAN="${1}" | |
ACME_FILE="${2}" | |
TMP_DIR="$(mktemp -d /tmp/XXXXXXX)" | |
trap 'rm -rf -- "${TMP_DIR}"' EXIT | |
if [ ! -f "${ACME_FILE}" ] || [ -z "${ACME_FILE}" ] ; then | |
echo "error: acme file (${ACME_FILE}) missing" | |
exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://gitlab.com/richardskumat/ansible-role-client-debian-role/-/blob/master/.gitlab-ci.yml | |
image: qwe1/dind-ansible-molecule:latest | |
variables: | |
# DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
# https://gitlab.com/gitlab-org/gitlab-ce/issues/64959 | |
# 19.03 had some breaking changes compared to 18.09 | |
DOCKER_TLS_CERTDIR: "" | |
services: |
NewerOlder