How to use specific Vagrantfile
Define the environment variable to use specific Vagrantfile. Display Vagrantfiles in the current directory. $ ls -l total 16 -rw-r--r-- 1 milosz milosz 358 Aug 22 17:27 Vagrantfile-single-centos-box...
View ArticleHow to install OpenJDK 8 on Debian
Use AdoptOpenJDK/Eclipse Adoptium to install OpenJDK 8 (LTS)/OpenJDK 11 (LTS) or OpenJDK 15 (Latest) using Eclipse OpenJ9 or HotSpot Java virtual machine. Prerequisites Install required packages. $...
View ArticleHow to enforce dynamically generated passwords for basic authentication
Use HAProxy with Lua to enforce dynamically generated passwords for basic authentication. The idea The idea is to incorporate daily tokens into a hashing algorithm to ensure that different password...
View ArticleHow to trace packets as they pass through the firewall
Trace packets as they pass through the iptables firewall. Initial configuration Configure rsyslog to use /var/log/firewall_trace.log log file for firewall trace. $ cat << EOF | sudo tee...
View ArticleHow to access rdiff-backup repository using fuse
Use FUSE (filesystem in userspace) to access rdiff-backup repository. Install rdiff-backup-fs package. $ sudo apt install rdiff-backup-fs Mount ~milosz/backup/ansible rdiff-backup repository to...
View ArticleHow to replace router certificate in OpenShift 3.11
Replacing the router certificate in OpenShift 3.11 is easier than you think. Inspect current certificate and key Login to the cluster, use default project. $ oc login -u system:admin -n default Logged...
View ArticleHow to redeploy master certificate in OpenShift 3.11
Inspect and redeploy the master certificate in OpenShift 3.11. Preliminary notes I am using custom master certificates. openshift_master_overwrite_named_certificates: true...
View ArticleHow to create a MongoDB container with a designated user
Create a MongoDB container with a designated user. Create a single MongoDB Docker container with application_user username, application_pass password to application_database (administrative...
View ArticleHow to create MongoDB cluster using Docker
Create a MongoDB cluster using Docker. Create a three-node MongoDB cluster using Docker with application_user username, application_pass password to application_database (administrative privileges)....
View ArticleHow to install XWiki
Install the Advanced Open Source Enterprise Wiki. I am using it daily since the beginning of last November. The main XWiki advantages are a very straightforward experience, customizability, and REST...
View ArticleHow to log SSL cipher and protocol information in nginx
Define custom nginx log format to store SSL cipher and protocol information. Install nginx http proxy server. $ sudo apt-get install nginx Create directory to store ssl certificate. $ sudo mkdir...
View ArticleHow to deal with many small log files using Filebeat
Use Filebeat to deal with many small log files. For example, I have a directory that contains several thousand small log files. These are created by short-running cron jobs on daily basics. Filebeat...
View ArticleHow to execute terraform in an offline mode
Execute the old and new Terraform using the selected provider in an offline mode. The old one – Terraform 0.12 Inspect Terraform version. $ ./terraform version Terraform v0.12.3 Create a module that...
View ArticleHow to determine which services need to be restarted
Use needrestart utility to determine which services need to be restarted after the upgrade. Install needrestart utility. $ sudo apt install needrestart Display a summary of the command-line usage. $...
View ArticleHow to alter task history retention inside Docker Swarm cluster
Alter task history retention inside the Docker Swarm cluster to ensure that there are no stopped containers. By default, task history retention is set to 5. $ docker node ps --filter...
View ArticleHow to restart systemd service in case of failure
Configure systemd service to be restarted in case of failure. By default, the service will be marked as failed after five consecutive starts in ten seconds. $ cat /etc/systemd/system.conf | grep...
View ArticleHow to use virtual memory filesystem to store Varnish Shared memory Log
Varnish Shared memory Log can put a major strain on the disk (I/O write operations). The solution is to store it on the virtual memory filesystem. Define tmpfs virtual memory filesystem on...
View ArticleHow to configure the Vagrant virtual machine to use a specific proxy
Configure the Vagrant virtual machine to use a specific proxy using the vagrant-proxyconf plugin. Install vagrant-proxyconf plugin. $ vagrant plugin install vagrant-proxyconf Installing the...
View ArticleHow to log specific Varnish requests
Use varnishlog to log specific Varnish requests. I will log 5xx (Server Error) class of status code to the /var/log/varnish/5xx_errors.log log file. Create logrotate configuration. $ cat <<EOF |...
View ArticleHow to create LXD instance from snapshot
Create LXD instance from a specific snapshot. Stop vm-example-source instance. $ sudo lxc stop vm-example-source Create snaphot starting-point for vm-example-source instance. $ sudo lxc snapshot...
View Article