PostgreSQL: Get Started

PostgreSQL is a very popular open-source relational database management system (RDBMS), known for its extensibility and feature-rich capabilities, making it suitable for mission-critical applications. Not to mention its active PostgreSQL community. In the upcoming posts, I will start a series of PostgreSQL studies to: Explore PostgreSQL main features, installation, and basic administration tasks. Deploy a PostgreSQL cluster onto K8S with PostgreSQL Operator, validate backup and rolling upgrades. Create a simple Flash microservice application to connect to the PostgreSQL cluster and validate failover. Integrate the whole deployment into a CICD pipeline for automation. Create AWS RDS PostgreSQL, with S3 Block storage as a replica. By the end of the series, we should be able to have a comprehensive understanding of PostgreSQL from a DevOps perspective. ...

6 January 2024 · 6 min · Zack Zhou

Ubuntu 18.04 to 22.04 in-place upgrade

My manage said we have many ubuntu 16.04, can you believe? Every single Ubuntu LTS comes with 5 years of standard support. During those five years, bug fixes and security patches will be provided. Ubuntu 18.04 ‘Bionic Beaver’ is reaching End of Standard Support this May. So today we are going to run in-place upgrade for Ubuntu 18.04 LTS to 22.04 LTS. Pre-upgrade checklist Validate current OS version and running service (nginx) # current OS version root@ubuntu-test:~# cat /etc/os-release NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.6 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic # nginx service status root@ubuntu-test:~# echo "ubuntu-inplace-upgrade zack-testing-nginx-service!!" >> /var/www/html/index.html root@ubuntu-test:~# systemctl restart nginx root@ubuntu-test:~# curl localhost ubuntu-inplace-upgrade zack-testing-nginx-service!! Fully update the system # update system root@ubuntu-test:~# sudo apt update Hit:1 http://au.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://au.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:3 http://au.archive.ubuntu.com/ubuntu bionic-backports InRelease Hit:4 http://au.archive.ubuntu.com/ubuntu bionic-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. root@ubuntu-test:~# sudo apt upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. # reboot system before upgrade root@ubuntu-test:~# sudo do-release-upgrade Checking for a new Ubuntu release You have not rebooted after updating a package which requires a reboot. Please reboot before upgrading. root@ubuntu-test:~# reboot Connection closing...Socket close. Take full system backup Here I took a VM snapshot before upgrade ...

28 August 2023 · 3 min · Zack Zhou

Ansible for AWS Dynamic Inventory

When using Ansible with AWS, maintaining the inventory file will be a hectic task as AWS has frequently changed IPs, autoscaling instances, and much more. Here we will install and apply ansible plugin for AWS dynamic inventory which makes an API call to AWS to get the instance information in the run time. It gives the EC2 instance details dynamically to manage the AWS infrastructure. It supports most of the public and private cloud platforms not limited to just AWS. ...

22 January 2023 · 2 min · Zack Zhou

GitOps with Argo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes applications. This is a post to show how to enable Argo CD on local k8s and AWS EKS, deploy applications and sync with GitHub manifests. Argo CD install ingress controller ingress-nginx kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml Download and install Argo CD CLI curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd rm argocd-linux-amd64 Configure Argo CD API Server and deploy zackweb Change the argocd-server service type to NodePort, initialize admin password, and deploy “zackweb” via Argo CD application manifests (argo-zackweb-application.yaml). ...

7 November 2022 · 1 min · Zack Zhou