user: dell
pass: calvin
<strong>Key mapping for console redirection</strong>
Use the <ESC><1> key sequence for <F1>
Use the <ESC><2> key sequence for <F2> (System Setup)
Use the <ESC><3> key sequence for <F3>
Use the <ESC><0> key sequence for <F10> (Lifecycle Controller)
Use the <ESC><!> key sequence for <F11> (Boot Manager)
Use the <ESC><@> key sequence for <F12> (PXE Boot)
# install ipmitool package on client (OPTIONAL)
sudo apt-get install -y ipmitool
# connect over SOL (Serial over LAN)
ipmitool -I lanplus -H <IP> -U <USER> -P <PASS> sol acti

Install OpenRA (Command & Conquer Red Alert) under Ubuntu

wget -O - | bash -s


sudo apt-get install libmono-i18n4.0-all
wget -q -O /tmp/openra_release_all.deb
sudo dpkg -i /tmp/openra_release_all.deb
sudo apt-get install -f

Check for latest version

letsencrypt / certbot

sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:certbot/certbot
sudo apt-get update
sudo apt-get install -y certbot

# Install certbot package with Ansible:

# install
# Ubuntu Xenial package
apt-get install lets-encrypt

apt-get install -y git
git clone /opt/letsencrypt
/opt/letsencrypt-auto --help all

# create letsencrypt certificate

Create XEN LXC DomU

xen-create-image \
    --hostname=${DOMAIN_NAME} \
    --dist=xenial  \
    --lvm=vg1 \
    --fs=ext4 \
    --dhcp \
    --pygrub \
    --mac=${DOMAIN_MAC} \
    --mirror= \
    --size=${DOMAIN_HDD} \
    --memory=${DOMAIN_RAM} \
    --swap=${DOMAIN_RAM} \
    --genpass=0 \
    --password=t00r \
    --vcpus $(cat /proc/cpuinfo | grep processor | wc -l)
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto/12_lxc

Json / jq

# processing Icinga warning Json list

wget -q --user=${USER} --password=${PASSWORD} "${URL}" -O - | jq --raw-output ' .status.service_status

 | select(.host_name | contains("integration")) | select(.status_information | contains("Apache", "Java")) | .host_name'
jq 'select(.geo != null)' all.json
jq '[ .devices | select(.key | startswith("dimmer")) | .value = .value.state ] | from_entries' filename.json

LTSP update kernel module

# on client: download driver
# Intel ixgbe (10G NIC)
wget -qP /tmp
# Intel e1000e (1G NIC)
wget -qP /tmp
tar xzf /tmp/e1000e-3.3.4.tar.gz -C /tmp/
# install required packages
apt-get install build-essential linux-headers-$(uname -r)
# on client: compile
cd /tmp/e1000e-3.3.4/src/
# copy /tmp/e1000e-3.3.4/src/e1000e.ko to LTSP server
# debug on server
# make install
# rmmod e1000e
# modprobe e1000e
# update-initramfs -u
# backup original

Install SonarQube

wget -O - | bash -


# install Java
wget -q --no-check-certificate -O - | bash -

# install SonarQube
echo "deb binary/" > /etc/apt/sources.list.d/sonar.list
sudo apt-get update
sudo apt-get install -y --force-yes sonar

# autostart SonarQube
sudo update-rc.d sonar defaults


tail -f /opt/sonar/logs/sonar.log


Install SSH VPN server

export CONTAINER=vpn

# create container
# TODO: configure MAC on create container
wget -q --no-check-certificate -O - | bash -s -- -f

# configure container MAC address
sed -i 's| = .*| = 00:11:22:33:44:5e|' /var/lib/lxc/${CONTAINER}/config

# enable autostart
echo " = 1" | tee -a /var/lib/lxc/${CONTAINER}/config

# configure container
##echo "lxc.hook.autodev=/var/lib/lxc/vpn/autodev" >> /var/lib/lxc/${CONTAINER}/config

Jenkins CLI

# command overview

# add public key for user

# authentificate by user / pass
java -jar jenkins-cli.jar -s list-jobs --username --password

# install plugin by name
java -jar jenkins-cli.jar -s install-plugin findbugs

# install plugin from URL?
java -jar jenkins-cli.jar -s install-plugin

LXC: create Ubuntu Trusty container

wget -q --no-check-certificate -O - | bash -s


[ -z ${CONTAINER} ] && CONTAINER=trusty

# force, remove previous container
if [ "$1" == "-f" ]; then
  [ $(sudo lxc-ls ${CONTAINER} | wc -l) -gt 0 ] && sudo lxc-destroy -f -n ${CONTAINER}

# create container
sudo lxc-create -t ubuntu -n ${CONTAINER} -- template-options -r trusty $@

# workaround for "Failed to mount cgroup at /sys/fs/cgroup/systemd: Permission denied"
echo "lxc.aa_profile = unconfined" | sudo tee -a /var/lib/lxc/${CONTAINER}/config

# start container in background
sudo lxc-start -d -n ${CONTAINER}

# wait 3 seconds until network is up
sleep 3

# copy APT proxy configuration from host
APT_PROXY=$(grep -h "Acquire::http::Proxy" /etc/apt/* -r | head -1)
[ -n "${APT_PROXY}" ] && echo ${APT_PROXY} | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/apt/apt.conf.d/01proxy

# update packages in container
sudo lxc-attach -n ${CONTAINER} -- apt-get update
sudo lxc-attach -n ${CONTAINER} -- apt-get dist-upgrade -y

# show containers status
sudo lxc-ls ${CONTAINER} -f

Allow root SSH login with password
sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sed -i 's|PasswordAuthentication no|PasswordAuthentication yes|' /etc/ssh/sshd_config
service ssh restart

Syndicate content