Netplan

# /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: yes
eth1:
dhcp4: no
mtu: 9000
addresses: [10.0.1.123/24]
gateway4: 10.0.1.254
nameservers:
addresses: [10.0.1.1,8.8.8.8]
search: [example.com, dev]
routes:
- to: 10.5.0.0/16
via: 10.5.88.1
- to: 10.8.0.0/25
via: 10.5.88.1

########################################

# enable dhcp on all interfaces
# /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
e

Configure VLAN under Linux (trunk, IEEE 802.1Q)

# install required package
apt-get install -y vlan

# /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
address 10.0.6.12
netmask 255.255.255.0
gateway 10.0.6.1
dns-nameservers 10.0.0.100 10.0.1.101
dns-search example.com
dns-domain example.com
bridge_ports eth0

# VLAN 10
auto vlan10
iface vlan10 inet manual
vlan-raw-device br0

auto br10
iface br10 inet manual
bridge_ports vlan10

# VLAN 22
auto vlan22
iface vlan22 inet manual
vlan-raw-device br0

oVirt

# install
https://www.ovirt.org/download/
sed -i 's|localhost|ovirt|g' /etc/hosts
sed -i 's|localdomain|dev|g' /etc/hosts
reboot
sudo yum install -y http://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm
sudo yum install -y ovirt-engine
sudo engine-setup --generate-answer=/tmp/ovirt.out

# cat /tmp/ovirt.out
# action=setup
[environment:default]
OVESETUP_DIALOG/confirmSettings=bool:True
OVESETUP_CONFIG/applicationMode=none:None
OVESETUP_CONFIG/remoteEngineSetupStyle=none:None
OVESETUP_CONFIG/sanWipeAfterDelete=bool:False
OVESETUP_CONFIG/storageIsLocal=bool:False

Nginx access control / GeoIP

cat < /etc/nginx/conf.d/geoip.conf
geoip_country /usr/share/GeoIP/GeoIP.dat;

map $geoip_country_code $allowed_country {
default no;
DE yes;
CH yes;
}

log_format allow "allow $remote_addr;";
EOF
chmod 644 /etc/nginx/conf.d/geoip.conf

cat < /usr/local/bin/nginx-allow
#!/bin/bash

while inotifywait --quiet --event create,delete --exclude "[^c][^o][^n][^f]$" /tmp
do
/usr/sbin/nginx -t && /usr/sbin/service nginx reload
done
EOF
chmod 755 /usr/local/bin/nginx-allow

cat < /etc/systemd/system/nginx-allow.service
[Unit]

Wildfly

configuration
/opt/wildfly/docs/contrib/scripts/systemd/README - systemd example configuration
/opt/wildfly/standalone/configuration/standalone.xml

CLI
ssh -X wildfly.example.com /opt/wildfly/bin/jboss-cli.sh --gui

/opt/wildfly/bin/jboss-cli.sh --connect

/subsystem=datasources/data-source=ExampleDS/:remove

# sdd postgres driver
/subsystem=datasources/jdbc-driver=postgres:add(driver-name=postgres,driver-module-name=org.postgresql,driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)

# add datasource

VMware Player

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.vmware-player.sh";
echo "wget -q --no-check-certificate $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $URL);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

sudo apt-get install -y open-vm-tools

Links
https://docs.vmware.com/en/VMware-Workstation-Player/12.0/com.vmware.player.linux.using.doc/GUID-42F4754B-7547-4A4D-AC08-353D321A051B.html

Network bonding

apt install -y ifenslave

# /etc/network/interfaces
...
auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 192.168.1.225
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
bond-miimon 100
bond-downdelay 200
bond-updelay 200
bond-mode 1
bond-slaves none

# state
cat /proc/net/bonding/bond0

cat /sys/class/net/bond0/bonding/slaves
eth1 eth0

cat /sys/class