Current Rank: #5
Hello 🖐️
My name is Charles Vosloo — this repository is part of my journey learning DevOps while completing KodeKloud Engineer challenges.
Note:
“KodeKloud Engineer tasks” refer to the hands-on challenges offered by Mumshad Mannambeth’s KodeKloud educational platform — one of the best environments for real-world DevOps practice.
- Easy One Command to SSH to Nautilus Servers
- Scripts
- Using Ansible to do Linux tasks
- How to Deploy Applications to Kubernetes — Blog Post
| Server | User | SSH Command |
|---|---|---|
| Jump Host | thor@jump_host | sshpass -p mjolnir123 ssh -o StrictHostKeyChecking=no thor@jump_host |
| Stratos App 1 | tony@stapp01 | sshpass -p Ir0nM@n ssh -o StrictHostKeyChecking=no [email protected] |
| Stratos App 2 | steve@stapp02 | sshpass -p Am3ric@ ssh -o StrictHostKeyChecking=no [email protected] |
| Stratos App 3 | banner@stapp03 | sshpass -p BigGr33n ssh -o StrictHostKeyChecking=no [email protected] |
| Load Balancer | loki@stlb01 | sshpass -p Mischi3f ssh -o StrictHostKeyChecking=no [email protected] |
| Database Server | peter@stdb01 | sshpass -p 'Sp!dy' ssh -o StrictHostKeyChecking=no [email protected] |
| Storage Server | natasha@ststor01 | sshpass -p Bl@kW ssh -o StrictHostKeyChecking=no [email protected] |
| Backup Server | clint@stbkp01 | sshpass -p H@wk3y3 ssh -o StrictHostKeyChecking=no [email protected] |
| Mail Server | groot@stmail01 | sshpass -p Gr00T123 ssh -o StrictHostKeyChecking=no [email protected] |
| Jenkins Server | jenkins@jenkins | sshpass -p 'j@rv!s' ssh -o StrictHostKeyChecking=no [email protected] |
After SSHing into the server, I typically run one of these helper scripts from the /scripts folder depending on the task:
| Script | Description | Used For |
|---|---|---|
install_ansible.sh |
Installs Ansible on jump host, copies inventory file | Linux tasks (e.g. configure Stratos App servers) |
install_lazygit.sh |
Installs Lazygit | Git-related tasks |
webi_k9s.sh |
Installs Vim and k9s via webi | Kubernetes tasks |
webi_k9s_krew.sh |
Installs k9s with ctx and ns plugins via krew | Kubernetes (Ubuntu) tasks |
webi_vim_ansible.sh |
Installs and configures Vim for Ansible YAML editing | Ansible on CentOS |
Example command:
curl https://webi.sh/webi | sh
> 💡 *Tip:*
> Webi can also install utilities like `lf`, `bat`, `jq`, `ripgrep`, and `zoxide`.
> Just expect longer setup time, especially if you really want to install brew.The best way to learn Ansible is to use it daily for configuration management.
Many Linux KodeKloud Engineer tasks can be automated via playbooks.
I first learned this approach from Anh Nguyen’s repository,
where he provides elegant Ansible-based solutions to KodeKloud challenges.
git clone https://github.com/journeyman33/kodekloud.gitcd /home/thor/kodekloud
sudo -s
./scripts/install_ansible.sh
This script also copies:
- ansible.cfg → /etc/ansible/ansible.cfg
- inventory/hosts → /etc/ansible/hostsNow Ansible can be executed from anywhere and can target hosts using the aliases defined in the inventory file.
| Nautilus Server(s) | Ansible ad hoc command | Hostname |
|---|---|---|
| stapp01, stapp02, stapp03 | ansible webservers -m ping |
webservers |
| Stratos App 1 | ansible stapp01 -m ping |
stapp01 |
| Stratos App 2 | ansible stapp02 -m ping |
stapp02 |
| Stratos App 3 | ansible stapp03 -m ping |
stapp03 |
| Stratos Load Balancer | ansible loadbalancer -m ping |
loadbalancer |
| Stratos Database Server | ansible database -m ping |
storage |
| Stratos Backup Server | ansible backup -m ping |
backup |
| Stratos Mail Server | ansible mail -m ping |
Let's say the Linux task is to:
“Install httpd and git on the hostname webservers (all 3 Stratos App servers) and ensure Apache listens on port 81.”
ssh tony@stapp01 steve@stapp02 banner@stapp03
sudo -s; yum install git -y; yum install httpd -y
sudo sed -i 's/^Listen 80/Listen 81/' /etc/httpd/conf/httpd.conf
systemctl start httpd
Declarative (Ansible) Way:
cat > httpd.yaml <<EOF
---
- name: Install httpd and git on webservers
hosts: webservers
become: true # Run tasks with elevated privileges (sudo)
tasks:
- name: Install httpd and git
yum:
name:
- httpd
- git
state: present
tags:
- install_packages
- name: Update HTTPD port to 81
lineinfile:
path: /etc/httpd/conf/httpd.conf
regexp: '^Listen 80'
line: 'Listen 81'
notify: Restart HTTPD
tags:
- update_httpd_port
handlers:
- name: Restart HTTPD
systemd:
name: httpd
state: restarted
EOF
Run the Playbook: ansible-playbook httpd.yaml
“Yes, ChatGPT wrote that YAML… before i tested it 😅 🧙♂️ 📜”