Linux
SSH
ssh-keygen -t ed25519 ssh-copy-id -i ~/.ssh/id_rsa.pub username@server_ip
Ansible
setup
sudo apt install -y python3-pip pip3 install --user ansible echo 'export PATH=$PATH:~/.local/bi...
ad-hoc commands
1. Apt update Chạy như này sẽ lỗi vì cần sudo để update change trong server ansible all -m apt ...
playbook
1. Playbook install apache ansible-playbook install_apache.yaml --ask-become-pass install_apach...
when
Mục đích Sử dụng when khi cần condition. Ví dụ như khi cần chạy lệnh riêng theo OS Của Host (Ubu...
Rút gọn playbook
Tạo biến trong file inventory 192.168.100.51 package_php="libapache2-mod-php" package_apache="ap...
Targeting Specific Nodes
1. Mục đích Chia host làm 3 nhóm web_servers: 192.168.100.51 và 192.168.100.54 (CentOS) db...
Kết nối windows
1. Sử dụng winrm Cài venv Cài winrm Cài credssp: https://docs.ansible.com/projects/ansible/2...
Install github runner
OS Rocky linux 10 Sau khi install github runner, bị lỗi permission denied runsvc.sh => Có khả nă...
Monitor docker container log
Link github: https://github.com/amir20/dozzle Link hướng dẫn cài login vs user: https://dozzle.d...
Combo Grafana + Prometheus
Cài prometheus, loke => grafana Xem metric server Xem log docker
Cài đặt Prometheus + Grafana
1. Điều kiện Server linux: Đã cài docker 2. Cài Prometheus + Grafana 2.1 Các thành phần ...
Cấu hình Target
1. Node exporter Đây là 1 exporter cơ bản của một target (Server cần giám sát), chạy trên port 9...
Alert Grafana
1. Cấu hình email Cấu hình mẫu cho email nằm trong /etc/grafana/grafana.ini [smtp] enabled = t...
Cài Keycloak Server
1. Cài đặt Keycloak File docker-compose.yaml version: "3.9" services: postgres: imag...