Configuring OpenShift with self-contained NTP

Introduction In a regular OpenShift environment, NTP server is more less like this: Diagram In a self-contained cluster with no connection to external networks NTP server is not reachable, but a reachable NTP server is required for proper cluster synchronization. Cluster does use SSL certificates that require validation and might fail if the dates between the systems are not in sync or at least pretty close in time. Diagram We’ve several components already available in our OpenShift cluster that are very useful: ...

December 7, 2020 · 5 min · Pablo Iranzo Gómez

Upstream/Downstream documentation workflow

During last year I’ve worked with the https://github.com/openshift-kni/baremetal-deploy/ repository after being working in the KNI Community team that was in charge of <KubeVirt.io> and <Metal3.io> where some of the below things were applied. One of the goals we had was to streamline the upstream <-> downstream process to keep changes done in the right way: get changes upstream and copy over downstream with minimal changes. We ended up using AsciiDoctor for building the documentation in the same way it’s done downstream so it’s just a matter of copying over the modules. ...

December 1, 2020 · 3 min · Pablo Iranzo Gómez

GitHub Actions for publishing

When I started with blog-o-matic I had to involve external ‘Travis-CI’, generating a token on GitHub, setting environment variables on Travis, etc GitHub started enabling actions which allows to automate workflows in a similar way than Travis or other external providers allowed, but with one extra feature: configuration is defined inside .github/ folder of your repository, which makes incredibly easy to copy the setup for one tool to another (except of optional required tokens that are configured per repo). ...

August 10, 2020 · 2 min · Pablo Iranzo Gómez

Go (golang) plugin in Citellus

I wanted to practice a bit Go programing, so I divided that task in two parts, one, adding a golang extension for Citellus and a sample, but working plugin using it. If interested in the code it’s available at the review at https://review.gerrithub.io/c/citellusorg/citellus/+/495622. The final sample code for it has been: // Author: Pablo Iranzo Gómez ([email protected]) // Header for citellus metadata // long_name: Report detected number of CPU's // description: List the processors detected in the system // priority: 200 package main import ( "bufio" "io" "os" "runtime" "strconv" "strings" ) func main() { var OKAY, _ = strconv.Atoi(os.Getenv("RC_OKAY")) var SKIP, _ = strconv.Atoi(os.Getenv("RC_SKIPPED")) var INFO, _ = strconv.Atoi(os.Getenv("RC_INFO")) var CITELLUS_ROOT = os.Getenv("CITELLUS_ROOT") var CITELLUS_LIVE, _ = strconv.Atoi(os.Getenv("CITELLUS_LIVE")) var FAILED, _ = strconv.Atoi(os.Getenv("RC_FAILED")) if CITELLUS_LIVE == 1 { // Report # of CPU's var CPUS = runtime.NumCPU() os.Stderr.WriteString(strconv.Itoa(CPUS)) os.Exit(INFO) } else if CITELLUS_LIVE == 0 { file, err := os.Open(CITELLUS_ROOT + "/proc/cpuinfo") if err != nil { os.Stderr.WriteString("Failure to open required file " + CITELLUS_ROOT + "/proc/cpuinfo") os.Exit(SKIP) } defer file.Close() counts := wordCount(file) os.Stderr.WriteString(strconv.Itoa(counts["processor"])) os.Exit(INFO) } else { os.Stderr.WriteString("Undefined CITELLUS_LIVE status") os.Exit(FAILED) } // Failback case, exiting as OK os.Exit(OKAY) } // https://forgetcode.com/go/2348-count-the-number-of-word-occurrence-in-given-a-file func wordCount(rdr io.Reader) map[string]int { counts := map[string]int{} scanner := bufio.NewScanner(rdr) scanner.Split(bufio.ScanWords) for scanner.Scan() { word := scanner.Text() word = strings.ToLower(word) counts[word]++ } return counts } Of course, lot of googling helped to start building the pieces. ...

June 14, 2020 · 2 min · Pablo Iranzo Gómez

Dell racadm remote ISO load

In order to test IPv6 deployment on Dell hardware I was in need to patch the servers to ensure that UEFI boot mode is in use. Normally I would had use the DSU that runs from within Linux, but as the servers are part of an OpenShift installation (using baremetal-deploy) and using CoreOS as the underlying system I wanted to load ISO from HTTP server on the deployhost (running RHEL). The command is not that hard, let’s first define some variables: ...

May 12, 2020 · 1 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.