Skip to content

Instantly share code, notes, and snippets.

View agung448's full-sized avatar

Andreas Agung Prabowo agung448

View GitHub Profile
@agung448
agung448 / gist:2d3b38d9b9ec359e58b022abd8808e18
Created August 23, 2024 03:36
resize root partition xfs file system with utm(qemu-img)
1. increase partition in UTM edit->drives->Resize(increase) input size ->save
with command-line( install qemu-img)
2. qemu-img resize [/path/file location] +[size_to_increase]G
turn on vm and login
#fdisk -l [check disk root partition]
#sudo parted /dev/sda
(parted) print (make sure the disk size increase)
(parted) resizepart 1 100% (use all unallocated disk)
(parted) quit
3.resize disk root partition with xfs_growfs
@agung448
agung448 / install QPDF
Created October 14, 2022 06:36
install QPDF from PPA package in ubuntu
##install basic package##
sudo apt update
sudo apt install software-properties-common
## add repo PPA to server ##
sudo add-apt-repository ppa:qpdf/qpdf
sudo apt update
sudo apt install qpdf
@agung448
agung448 / configuration nginx and mariadb with debian 11
Created September 27, 2022 13:07
wordpress with nginx mariadb php
##install nginx##
sudo apt-get update
sudo apt-get install nginx -y
sudo apt-get install -y curl gnupg2 ca-certificates lsb-release
sudo curl -fsSL http://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-keyring.gpg
sudo echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
sudo apt-get update
sudo apt-get install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx && sudo systemctl status nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml
#create user admin dashboard service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
##install prometheus grafana node exporter in debian/ubuntu
apt update
sudo useradd --system --no-create-home --shell /bin/false prometheus
wget https://github.com/prometheus/prometheus/releases/download/v2.38.0/prometheus-2.38.0.linux-amd64.tar.gz
tar -xvf prometheus-2.38.0.linux-amd64.tar.gz
sudo mkdir -p /data /etc/prometheus
cd prometheus-2.38.0.linux-amd64
sudo mv prometheus promtool /usr/local/bin/
sudo mv consoles/ console_libraries/ /etc/prometheus/
sudo chown -R prometheus:prometheus /etc/prometheus/ /data/
nginx -v
apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
touch /etc/apt/sources.list.d/nginx.list
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" |tee /etc/apt/sources.list.d/nginx.list
nginx -t
apt update
##----check version available for upgrade-----
apt list nginx -a
Listing... Done
first install apache with command below
#yum install http -y
#systemctl enable httpd
then configure http.conf
#vi /etc/httpd/conf/httpd.conf
add this configuration in the lastline
<VirtualHost ip_address_server:80>
DocumentRoot "/var/www/html/webserver"
ServerName www.local.com
</VirtualHost>
@agung448
agung448 / minikube.txt
Last active April 7, 2021 09:28
error Exiting due to DRV_NOT_DETECTED: No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/ after install minikube
this show how to solve problem error after install minikube on mac
install minikube in mac Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
$brew install minikube
$minikube start
after install finish then we start minikube service show error below
Exiting due to DRV_NOT_DETECTED: No possible driver was detected. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/
then follow this step to solve the problem
@agung448
agung448 / gist:cfaac58487ce0452ae486474dcfe6c52
Last active March 16, 2021 11:01
pod permission denied NFS server
how to check pod permission denied NFS directory
example we user nginx pod
-check NFS server permission directory make sure NFS permission directory using
nobody:nobody permission also can read write
- /etc/exports configuration (/mnt/data *(rw,sync,root_squash)
- mounting storage on pod and testing create file
@agung448
agung448 / gist:92edfe1a7e2b35d303d6b845f613d578
Last active February 22, 2021 07:09
ansible playbook integration with satellite
since satellite no longer use katello-agent now we can use this step to integrate with satellite
---
- name: download CA certificate
yum:
validate_certs: no
disable_gpg_check: yes
name: https://<ip satellite>/pub/katello-ca-consumer-latest.noarch.rpm
state: present