Posts

Notes on Learning Open VSwitch in Openshift OKD

Background Open VSwitch or ovs is the software that openshift used to ensure pods in the openshift cluster could talk to each other using cluster-internal IP addresses. In default settings, hosts outside the cluster are not be able to connect directly to pods; and haproxy (running in  'openshift router' pods) sofware listening on host port is doing the work of distributing http request into each and every application's pods.  In order to follow this blog post you will need root-level OS access on the hosts / openshift nodes, so it is geared towards system administrator of the openshift platform, not the casual application developer. Examining OVS bridge [root@node3 ~]# ovs-vsctl list-br br0 So we know the OVS bridge is named br0. [root@node1 ~]# ovs-ofctl -O OpenFlow13 dump-ports-desc br0 OFPST_PORT_DESC reply (OF1.3) (xid=0x2):  1(vxlan0): addr:62:b2:af:23:90:ea      config:     0      state:      0   ...

How to show clusterwide utilization in Openshift/Kubernetes

Background When deploying openshift/kubernetes cluster in production, usually we used more than 3 machine/hosts, and in my company's deployment we used more than 10 VMs. Monitoring resource usage in multiple VM is nothing new but using kubernetes we have an option to use kubectl / oc adm top nodes to do this. Using kubectl/ oc adm top nodes will show overall CPU and memory usage for each node The old ways (pre-kubernetes) Before using kubernetes/openshift, we used RHEL/CentOS VMs and to get resource usage we use the sar utility. Of course we need to install sar first (sudo  yum install sysstat) , and then sar is quite unique that it store historical data based on the date of the month.   To get cpu usage for current date : sar To get memory usage for current date : sar -r To get memory usage for the date 30 : sar -r -f /var/log/sa/sa30 To get cpu usage for the date 30 : sar -f /var/log/sa/sa30 There are other interesting resource usage such as per core cpu usage (sar -P A...

Debugging Web Services in Netweaver ABAP Server

Image
When running an application in the server, sometimes things doesn't goes the way it supposed to be, and we need to debug the application. For desktop application based on Java or .NET technology, it is just a matter of setting the breakpoint in IDE and then running the application with debug enabled. For web application based on ASP.NET, similar thing could be done by using Visual Studio and running the web application in debug mode using IIS Express. But what about web services that being served by SAP Netweaver AS ? This post shows how. Option 1. Execute - Debugging in SE37 This is the most standard way to debug ABAP remote function module. Just open up transaction SE37, type function module name, and click on the caliper icon  (For those who are not so into STEM stuffs, you could see this wiki page to know about calipers). Then fill in the input parameters before clicking on the Execute - Debugging icon. Now you are inside the ABAP debugger, and ...

Repair Your Windows Store and Metro Apps After Windows Update

Background Sometimes after updating  Windows 10, the Windows Modern UI / Metro Apps no longer works.  You could try starting any of them, such as Calculator, Photo, or Microsoft Store - and after opening a  blank window it will just close. This has happened several times, twice in my wife's laptop, and once in our home Desktop PC. This post will try to give few options to solve this problem. But I still don't know what caused it. Step 1. Assess condition of installed VCLib Packages Open up Powershell by pressing Windows Key and typing Powershell. Click Run as administrator if it is shown (if not, right click on the Powershell icon first). Type : Get-AppxPackage Microsoft*VC* | Select InstallLocation The result will be the location where VCLibs packages were installed. We concern only the VCLibs 140 version without UWPDesktop in the package names.  Try to check the files of the installed VCLibs packages (we need to do this twice, once for the x86 a...

Backing Up MySQL Database using Openshift/Kubernetes Cron Job

Periodic Backups When running an application in production, the data and app should be backed up periodically. One way to do that is by using git repository for the source code and periodically dumping the database. This article shows how to do such periodic jobs using CronJob functionality of Openshift/Kubernetes. Technique When running a cronjob, the filesystem that being used to run the  pod will be ephemeral, that is, non-persistent. To work around this limit we should mount from external volume, which can be in the form of persistent volume claim or directly provided volume specification.  The Job specs apiVersion: batch/v1 kind: Job metadata:   name: job04-test  spec:   template:     spec:       containers:       - name: job04c-test         image: centos/mysql-57-centos7         command: ["/bin/sh","-c",  "/opt/rh/rh-mysql57/root/usr/bin/mysqldump ...

Find out Lock Path in ZFS

Scenario A linux server that using ZFS storage, exports the directory in the storage using NFS. There is a need to confirm that some files are still locked or not.  1. Determine Inode The ls command has -i option to show inode id for each directory/files. [root@pv1 mysql]# ls -il total 200867 41506 -rw-rw-r--+ 1 1000070000 nfsnobody         0 Aug 15   2017 debian-5.5.flag 41509 -rw-rw----+ 1 1000070000 nfsnobody 195035136 Apr   5 12:02 ibdata1 41507 -rw-rw----+ 1 1000070000 nfsnobody   5242880 Apr   5 12:02 ib_logfile0 41508 -rw-rw----+ 1 1000070000 nfsnobody   5242880 Mar 26 19:33 ib_logfile1 41376 drwx------+ 2 1000070000 nfsnobody       119 Jul 30   2018 jwdb 41511 drwxr-x---+ 2 1000070000 nfsnobody         74 Aug 15   2017 mysql 41510 -rw-------+ 1 1000070000 nfsnobody         6 Aug 15   2017 mysql_upgrade_info 41487 drwx---...

How to Build Your Own Openshift Builder Image (PHP 5.6 with oci, pdo_oci, rfc) - part II

In the previous post, I described the final process of building an Openshift builder docker image. This post is like a flashback - where I describe the processes before   the final docker image can be built. The processes are necessary to build two files; the pdo-oci rpm ( rh-php56-php-pdo_oci-5.6.25-1.el7.centos.x86_64.rpm ) and the oci8.so extension file. Checkout Let us checkout the pdo_oci8 branch first from (my) github : (skip if you already followed part I) aws@broker ~ $  git clone https://github.com/yudhiwidyatama/s2i-php-container.git aws@broker  ~ $  cd s2i-php-container/ aws@broker  s2i-php-container $  git checkout pdo_oci8 Branch pdo_oci8 set up to track remote branch pdo_oci8 from origin. Switched to a new branch 'pdo_oci8' Go to the 5.6 php version directory : aws@broker s2i-php-container $ ls 5.5   5.6   7.0   7.1   common   LICENSE   Makefile   README.md aws@broker ...