Skip to content

Instantly share code, notes, and snippets.

Avatar
🎓
Still Learning

Gilang Virga Perdana gilangvperdana

🎓
Still Learning
View GitHub Profile
@gilangvperdana
gilangvperdana / README.md
Last active Nov 14, 2022
Setup RKE Cluster on Ubuntu 20.04LTS
View README.md

Brief

RKE a.k.a Rancher Kubernetes Engine are Kubernetes Deployer by Rancher. Now we will create RKE cluster on Ubuntu 20.04 LTS

Environment

  • 2x Ubuntu 20.04LTS
  • 16GB RAM
  • 50GB Storage
  • 4VCPU
@gilangvperdana
gilangvperdana / README.md
Created Nov 12, 2022
Nova Timeout Cause Cinder Very Slow
View README.md

Brief

If you meet a problem when create instance with Volume then Instance created failed, you can use this workaround. The point is just increase timeout of Nova compute service when creating instance to 1h30m or 90minutes.

Env :

  • Kolla Ansible Xena Deplyoment

Execute on all of Compute Node :

nano /etc/kolla/nova-compute/nova.conf
@gilangvperdana
gilangvperdana / README.md
Last active Nov 12, 2022
SMTP Client on our Ubuntu Server
View README.md

Goals

  • Can use SMTP platform on our ubuntu server

Install SSMTP

sudo apt-get install ssmtp

Configure Account

@gilangvperdana
gilangvperdana / README.md
Created Oct 29, 2022
Alert when Network Floating on Openstack is Unreachable
View README.md

Brief

This script just a simple logic, when vRouter on Openstack not reachable script will execute Network Agent Report to Telegram

Use

  • 172.20.1.230 is your vRouter
  • TELEGRAM_BOT_TOKEN is your
  • CHAT_ID is your Telegram CHAT ID

Create Network Agent Watchers

@gilangvperdana
gilangvperdana / README.md
Created Oct 24, 2022
Convert ISO to QCOW2
View README.md

ISO to QCOW2 Convert

When you run OS with format .iso on baremetal, you must convert it to qcow2 to run on Cloud

Goals

  • Convert from .iso to .qcow2

Convert with Qemu-utils

  • Prepare utils
apt update -y
@gilangvperdana
gilangvperdana / ubuntu-hardening.md
Created Oct 10, 2022 — forked from dfedorov-ciena/ubuntu-hardening.md
List of things for hardening Ubuntu
View ubuntu-hardening.md

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
@gilangvperdana
gilangvperdana / README.md
Created Oct 6, 2022
Mikrotik Monitoring Alert to Telegram
View README.md

Goals

  • Make anything alerting model on Mikrotik to Telegram

Monitoring User Connect

This script will be monitor every user connect / disconnect to your telegram.

IP > DHCP SERVER > INTERFACE > SCRIPT

:if ($leaseBound = "1") do={/tool netwatch add down-script=":local BotID \"5416297136:AAHAx3p-yFsDr4nG8h5YNBI6nRyPe6XXXXX\
    \";\r\
@gilangvperdana
gilangvperdana / README.md
Created Oct 6, 2022
Alert IP Client when Connect to SSH
View README.md

Goals

  • We can monitor IP of SSH Client.
  • Alert will be goes to Telegram.

Execute

Make Alert Script

mkdir -p /opt/alert-ssh-remote/
nano alert.sh
@gilangvperdana
gilangvperdana / README.md
Created Oct 4, 2022
Setting IPMI with IPMITOOL
View README.md

Brief

We can set our IPMI just with IPMITOOL.

Installation IPMITOOL

apt update -y
apt install -y ipmitool

Create User

@gilangvperdana
gilangvperdana / README.md
Last active Sep 30, 2022
Monitor our Server with Blackbox Exporter
View README.md

Briefing

If you want to monitor your server with existing monitoring mainstream stack (Prometheus, Grafana) you can use Blackbox Exporter to monitor it.

Installation

wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.19.0/blackbox_exporter-0.19.0.linux-amd64.tar.gz
tar -xvf blackbox_exporter-0.19.0.linux-amd64.tar.gz
mv blackbox_exporter-0.19.0.linux-amd64/blackbox_exporter /usr/local/bin/
cd blackbox_exporter-0.19.0.linux-amd64/
sudo useradd -rs /bin/false blackbox_exporter