Underkube

Tips, tricks and all things Kubernetes containers, cloud native, AI, etc

Set file as executable in svn


chmod doesn’t do the trick, so you need to set the proper flag in svn with: svn propset svn:executable ON <filename> …
Read more ⟶

Package dependency graph of any installed RPM package


Vía http://xmodulo.com/check-rpm-package-dependencies-fedora-centos-rhel.html: Just install rpmorphan and graphviz: yum install -y rpmorphan graphviz For example, for gzip package: rpmdep.pl -dot gzip.dot gzip dot -Tpng -o output.png gzip.dot Browse the output.png file and it should looks like: …
Read more ⟶

RPM Architecture-specific Dependencies


If you need to specify some packages in the “Require” section of a SPEC file, you should use the ISA (Instruction Set Architecture) dependencies The following is not longer valid: Requires: gtk.i686 This is valid: Requires: gtk(x86-32) …
Read more ⟶

Simple command to create a timelapse from a few images


cat *jpg* | ffmpeg -f image2pipe -r 30 -vcodec mjpeg -i - -vcodec libx264 out.mp4 …
Read more ⟶

Raspistill + convert + sshfs


If you have a raspberry with a camera module, you can use them as a webcam. The simpliest idea is to capture a picture every x seconds and serve it with a simple web server. But if you don’t want to use the raspberry as a web server (low bandwitdh, other tasks, privacy,…), you can use sshfs to copy the image to a remote filesystem and serve it from there. The main idea:…
Read more ⟶

Run a process in background, nohupped and without nohup.out


nohup yourprocess >/dev/null 2>&1& …
Read more ⟶

Define a new service in firewalld


If you want to create a new service definition (i.e. to group a few ports in the same service), the procedure will be: Create a file called “myservice.xml” in /etc/firewalld/services/ folder with the following content: <?xml version="1.0" encoding="utf-8"?> <service> <short>myservice</short> <description>Group httpd ports</description> <port protocol="tcp" port="80"/> <port protocol="tcp" port="443"/> <port protocol="tcp" port="8080"/> <port protocol="tcp" port="8000"/> </service> Set permissions restorecon /etc/firewalld/services/myservice.xml chmod 640 /etc/firewalld/services/myservice.xml Reload firewalld to force it to read the XML firewall-cmd --reload Add the RH-Satellite-6 service to the default zone firewall-cmd --permanent --add-service=myservice Reload firewalld just in case firewall-cmd --reload …
Read more ⟶

My first upstream contribution


A very simple contribution to RHEL initscripts, but it makes me proud :) ifup-wireless: add support for wowlan ifup-wireless: add support for wowlan (second part) From this bugzilla.…
Read more ⟶

Using docker to read saXX files from other system


From my F20 laptop, I’m not able to read RHEL6 sar data. Attempting to doing result in the following error: File created by sar/sadc from sysstat version 9.0.4 Current sysstat version can no longer read the format of this file (0x1170) According to this KCS you should be able to read older files using the –legacy option. But it doesn’t work for me either: Usage: sar [ options ] [ <interval> [ <count> ] ] Options are: .…
Read more ⟶

Docker & proxy


To configure docker (in RHEL) to get images through proxy, edit /etc/sysconfig/docker and add the following parameters according to your environment: HTTP_PROXY="http://<proxy_host>:<proxy_port>" HTTPS_PROXY="https://<proxy_host>:<proxy_port>" http_proxy="${HTTP_PROXY}" https_proxy="${HTTPS_PROXY}" And restart docker service: systemctl restart docker …
Read more ⟶