Build Wildfly deb package

# http://wildfly.org/downloads/
# https://github.com/mattthias/wildfly-packaging

VERSION=13.0.0.Final
REVISION=1

sudo apt-get install -y devscripts

# Download the "source" (the binary "Java EE7 Full & Web Distribution")
# wget http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.tar.gz
# https://github.com/ilanddev/wildfly-debian/tree/master/debian

# download archive
mkdir /tmp/wildfly
wget http://download.jboss.org/wildfly/${VERSION}/wildfly-${VERSION}.tar.gz -q -O /tmp/wildfly/wildfly-${VERSION}.tar.gz

# create a link to archive
cd /tmp/wildfly

Install and configure autofs under Ubuntu

# install autofs package
apt-get install -y autofs

# create required directories
mkdir /etc/auto.master.d

# Configure NFS mount nas.example.com:/volume1/backup to /media/backup
echo "/media /etc/auto.media" >> /etc/auto.master.d/media.autofs
echo "backup -fstype=nfs,rw,async,vers=3 nas.example.com:/volume1/backup" >> /etc/auto.media

# check (directory will by created on access)
ll /media/backup

# debug
service autofs stop
sudo automount -f -v

Ansible playbook
https://github.com/panticz/ansible/blob/master/autofs-test.yml

Netplan

# cat /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
    eth1:
      dhcp4: no
      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]
 
########################################
 
# enable dhcp on all interfaces
# /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    all:
      match:
        name: e*
      dhcp4: yes
 
 
########################################
network:
  ver

Create VLAN bridge 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

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.vmware-player.sh -O - | bash -

#!/bin/bash

URL=https://download3.vmware.com/software/player/file/VMware-Player-14.0.0-6661328.x86_64.bundle

# download
wget -q ${URL} -O /tmp/${URL##*/}

# install
sudo /tmp/${URL##*/} --console --required --eulas-agreed

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

Install ProjectLibre under Ubuntu

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.projectlibre.sh -O - | bash -

#!/bin/bash

URL=https://downloads.sourceforge.net/project/projectlibre/ProjectLibre/1.7/projectlibre_1.7.0-1.deb

# install Java JRE
wget -q https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh -O - | bash -

# download
wget -q ${URL} -O /tmp/${URL##*/}

# install
sudo dpkg -i /tmp/${URL##*/}

Links
https://sourceforge.net/projects/projectlibre/files/ProjectLibre/

Syndicate content