Quantcast
Channel: sleeplessbeastie's notes
Browsing all 770 articles
Browse latest View live

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 Article


How 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 Article


How 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 Article

How 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 Article

How 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 Article


How 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 Article

How 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 Article

How 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 Article


How 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 Article


Image may be NSFW.
Clik here to view.

How 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 Article

How 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 Article

How 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 Article

How 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 Article


How 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 Article

How 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 Article


How 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 Article

How 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 Article


How 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 Article

How 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 Article

How 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
Browsing all 770 articles
Browse latest View live