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.
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
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/
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.
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 .
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 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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.