Docker Compose with Podman Redhat Enterprise Linux 8

Docker Compose with Podman Redhat Enterprise Linux 8

Docker Compose with Podman Redhat Enterprise Linux 8

Nathan Obert
Introduction Below is the steps to get docker-compose working with podman. Note, that podman runs in essentially two modes. System mode (owned by root) or User mode where it runs when the user logs in. For development you will want it in user mode if you intend to do development with docker-compose. Installation sudo curl -SL https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose Switch Podman from System Mode to User Mode # may not be necessary sudo systemctl disable --now podman podman.
Kubernetes on Redhat Enterprise Linux 8

Kubernetes on Redhat Enterprise Linux 8

Installation of Kubernetes Server

Nathan Obert
Introduction We will install a Kubernetes on RHEL 8 with CRI-O, and Podman. We are using an r5.large on Amazon EC2 using Amazon’s provided Red Hat Enterprise Linux 8. Installation Install the updates on your fresh server from Amazon. sudo dnf update -y sudo dnf install net-tools -y Setup DNS or atleast Hostname entries in your /etc/hosts file sudo hostnamectl set-hostname k8.obert.dev sudo init 6 echo `/sbin/ifconfig eth0 | grep 'inet ' | awk {'print $2'}` ${HOSTNAME} | sudo tee -a /etc/hosts Set selinux to permissive
How to get recursive folder path from Alfresco

How to get recursive folder path from Alfresco

How to get recursive folder path from Alfresco

Nathan Obert
Introduction Alfresco is a Content Management System, recently purchased by Hyland. I needed to write a query for Oracle and Microsoft SQL that would loop through its database and build a folder structure recursivily from its tables. These snippets of SQL are what I came up with. Microsoft SQL Server This Article here is probably the best article I’ve found that explains MS SQL Recursion with a working example. https://www.andrewvillazon.com/recursive-cte-sql-server/
How to update Alfresco password(s) from database

How to update Alfresco password(s) from database

How to update Alfresco password(s) from database

Nathan Obert
Introduction Alfresco is a Content Management System, recently purchased by Hyland. I needed the steps to reset the admin password through the database. I decided to document the steps here. Inspect passwords The passwords are stored in essentially NTLM format (utf16le encoded in md4 hash). You can’t really turn a hash back into a password, however you could obviously turn a string into a hash. This could possibly be brute forced.
Kubernetes how create folders for Physical Volumes (PVs) automatically

Kubernetes how create folders for Physical Volumes (PVs) automatically

Adding commands before an entrypoint.

Nathan Obert
Introduction This will be a quick short blog entry. Today I needed to have a container that could self-initialize it’s own Physical Volumes. This is quite easy to do with an init container. I’m going to provide a simple example to show how this works with busybox. Deployment YAML initContainers: - name: init-pv image: {{ .Values.initpv.image }} volumeMounts: - name: init mountPath: {{ .Values.persistentVolume.path }} {{- with .Values.initpv.command }} command: {{- toYaml .
Kubernetes how inject commands before entrypoint

Kubernetes how inject commands before entrypoint

Adding commands before an entrypoint.

Nathan Obert
Introduction This will be a quick short blog entry. Today I had an image running on Kubernetes from a vender invoked through HELM, and I needed to run some arbtirary commands however I did not want to extend the image and have to deal with maintaining yet another image. Below is the solution I came up with. YAML to inject commands before entry point. image: repository: docker.io/user/image pullPolicy: IfNotPresent tag: "latest" command: - bash - "-c" - | sed -i 's/^param=.
Changing the colors in Terminal ZSH on Mac OS

Changing the colors in Terminal ZSH on Mac OS

Quick way to change Terminal forground colors in zsh

Nathan Obert
Changing colors in Terminal I utilize Command Line Interfaces (CLI) frequently, Linux, Unix, Mac etc. Small adjustments to the CLI can make huge impacts on my workflow. Readability of the screen is very important, and I personally prefer a slightly higher contrast display. What I mean by that is on a bright background I prefer dark foreground colors, and on a dark background I prefer bright foreground colors. Unfortuantly the out of the box configuration does not always allow that.
Kubernetes how to patch external address into service

Kubernetes how to patch external address into service

How to make an service bind to host

Nathan Obert
Introduction This will be a quick short blog entry. Today I had an container running Oracle at Amazon EC2 on Kubernetes. I was trying to work thorugh some Pl/SQL code in sqlplus, and decided I wanted to instead use SQL Developer. After a little research this is what I came up with, and wanted to share it. Bash Script kubectl patch svc oracle -p '{"spec":{"externalIPs":["1.2.3.4"]}}' Basically you pass the kubernetes service name, as well as your ip address of the host (in this example 1.
Configure SSH to keep from timing out

Configure SSH to keep from timing out

Quick way to keep ssh alive.

Nathan Obert
SSH Keep Alive Secure Shell is a means to connect terminals to servers. When it detects you are idle it disconnects you. This is for security. This however is very annoying and can cause issues if you are installing something and need to keep the terminal active. Some people try to leave ’top’ running or ‘screen’ to keep the terminal busy. There is a simple configuration that can just as easily do this.
Changing the colors in BASH

Changing the colors in BASH

Quick way to change colors in bash

Nathan Obert
Changing colors in BASH So I find some color combations very hard to read. If you have a black background, the dark blue directory color is hard to read. If you have a white background the bright green executable color is hard to read. For whatever reason it was not thought very well through to have well contrasting colors for everything. I found this Ask Ubunutu on how to change the directory colors and decided to write a blog post to make sure I never lost the steps again.
Kubernetes on Ubuntu 22.04 with CRI-Docker

Kubernetes on Ubuntu 22.04 with CRI-Docker

Installation of Kubernetes Server

Nathan Obert
Introduction We will install a Kubernetes on Ubuntu 22.04 with Docker and CRI-Docker. We are using an r5.2xlarge on Amazon EC2 using Amazon’s provided Ubuntu 22.04. You can get by with a much smaller instance depending on what you plan to run. Installation Update Ubuntu Install the updates on your fresh server from Amazon. ## Update Ubunutu sudo bash sudo apt update -y sudo apt upgrade -y sudo apt autoremove -y # if you see kenerl updates you should reboot # init 6 Hostname Your hostname should be in /etc/hosts.
Map Windows share to Linux

Map Windows share to Linux

Quick way to copy files from Windows to Linux

Nathan Obert
Mounting Windows on Linux Setup on Ubuntu sudo apt-get install keyutils sudo apt-get install cifs-utils Setup on Redhat sudo yum install keyutils cifs-utils Syntax UNC=server.domain.com/share USERNAME=yourwindowslogin DOMAIN=NAMEOFDOMAIN PASSWORD=yourpassword sudo mkdir -p /mnt/${UNC} sudo mount -t cifs -o username=${USERNAME},domain=${DOMAIN},password=${PASSWORD} //${UNC} /mnt/${UNC}
Amazon Workspace with Ubuntu 22.04

Amazon Workspace with Ubuntu 22.04

Installation of Amazon Workspace

Nathan Obert
Introduction Amazon Workspace is a hosted Virtual Desktop Infrastructure (VDI). Amazon hosts your workstations in the cloud. Users can connect to their provisioned workstations through a client software provided by Amazon for many different platforms, including mobile. The key difference comparing this to EC2 instances, is the client software. With EC2 typically you use Remote Desktop Protocal (RDP) or Secure Shell (SSH). With Amazon Workspace utilize PCoIP or WSP. Both protocals work far superior for end user experience for responsivness, espically on lower speed networks.
XRP to remote Gnome on Ubuntu 22.04

XRP to remote Gnome on Ubuntu 22.04

Installation of XRP and Gnome

Nathan Obert
Introduction We will be turning a Command Line Interface (CLI) Redhat 9 server hosted at Amazon on EC2 into a full Xwindows based workstation that you can use Remote Desktop Protocal (RDP) to using xRDP. Installation Install the updates sudo apt update -y sudo apt upgrade -y # Kernel Updates wanted a reboot sudo init 6 Install ubuntu-desktop (Gnome, Xwindows, etc) sudo apt-get install ubuntu-desktop -y Install XRDP sudo apt install xrdp net-tools -y # insure xrpd on on ipv4 sudo sed -i 's/^port=3389/port=tcp:\/\/:3389/g' /etc/xrdp/xrdp.
GitHub Actions to automatically build Docker and push to registry

GitHub Actions to automatically build Docker and push to registry

Configuration to have GitHub automatically build and push Docker containers

Introduction GitHub provies “Actions” which are automatic actions that are ran on gitHub for you. This can be used to compile your code, compile your docker image, or do any arbitrary set of commands. This typically is done in software development to automatically push software between development and test. This is typically done to insure all the necessary code, configurations, etc necessary are checked into the source repository. Additionally this insures all the neccessary steps are done uniformly no matter which developer checks in the code.
Kubernetes init container to verify dependent service(s) are online.

Kubernetes init container to verify dependent service(s) are online.

Init container to check if kubernetes service available

Nathan Obert
Introduction With HELM Scripts containers all try to start at the same time. It depends on how the containers scripts were designed on if there is any sort of delay or dependency cchecking built into them. I wrote a very simple busybox script that can be used to prevent a container from starting until the kubernetes services is needs are available. In this example there are 3 checks going on.
GitHub Actions copy one git repository to another git repository

GitHub Actions copy one git repository to another git repository

Configuration to have GitHub automatically copy files from one repository to another

Introduction GitHub provies “Actions” which are automatic actions that are ran on gitHub for you. This can be used to compile your code, compile your docker image, or do any arbitrary set of commands. This typically is done in software development to automatically push software between development and test. This is typically done to insure all the necessary code, configurations, etc necessary are checked into the source repository. Additionally this insures all the neccessary steps are done uniformly no matter which developer checks in the code.
Hugo install on Redhat Enterprise Linux 9

Hugo install on Redhat Enterprise Linux 9

Installation of Hugo on RHEL 9

Nathan Obert
Introduction HUGO is a static website rendering engine. Essentially you write a collection of Mark Down to files with headers, and HUGO can very rapidily theme an entire website. This website for instance is on the HUGO platform. Other very large sites like most likely the Kubernetes Documentation is also on HUGO. You end up with a “wordpress” like feel for the end user, however its actually static HTML that can be served up on git pages or any http server.
Amazon Web Services (AWS) Command Line Interface (CLI) on Windows 11

Amazon Web Services (AWS) Command Line Interface (CLI) on Windows 11

Installation of AWS CLI on Windows 11

Nathan Obert
Introduction I will be installing and doing basic configuration of Amazon Web Services (AWS)’s Command Line Interface (CLI) on Windows 11. AWS CLI is a shell based means to work with AWS. The CLI provides the ability to list out resources at Amazon like which EC2 instances are running, poke around S3 buckets, inspect pretty much anything at Amazon. It also provides advanced features like copying information to and from S3.
AWS CLI Cheatsheet

AWS CLI Cheatsheet

Cheatsheet for Git

Nathan Obert
Introduction This cheat sheet from Applo Clark’s Cheatsheet. Amazon’s Official CLI Documentation. Amazon Web Services (AWS)’s Command Line Interface (CLI) is a shell based means to work with AWS. The CLI provides the ability to list out resources at Amazon like which EC2 instances are running, poke around S3 buckets, inspect pretty much anything at Amazon. It also provides advanced features like copying information to and from S3. Below is a cheat sheet I will be updating over time with frequently used commands.