FAQ Overview
Software
Instalasi Apache MariaDB 10.4 PHP 8.2 pada Centos 7
- Install Apache
$ sudo yum update -y
$ sudo yum install httpd
$ sudo systemctl start httpd.service
$ sudo systemctl enable httpd.service
- Install MariaDB 10.4.32
Buat file /etc/yum.repos.d/mariadb.repo, isi dengan script
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
$ sudo yum install MariaDB-server MariaDB-client
$ sudo systemctl start mysql.service
$ sudo systemctl enable mysql.service
$ sudo mysql_secure_installation
Check instalasi MySQL
$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 593
Server version: 10.4.32-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
- Install PHP 8.2
$ sudo yum update -y
$ sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum-config-manager --enable remi-php82
$ sudo yum install php php-mysql php-gd php-json php-mbstring php-session php-xmlwriter php-filter php-spl php-zip
(Contoh install php dan extension yang diperlukan gd, mbstring dll)
Check Instalasi PHP
PHP 8.2.13 (cli) (built: Nov 21 2023 09:55:59) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.13, Copyright (c) Zend Technologies
Author: Sena Turana
Last update: 2023-12-15 14:38
Integrasi Openstack menggunakan Ceph
Access deniedAuthor: Sena Turana
Last update: 2023-12-16 06:42
Menambahkan Plugin Gitlab pada OpenProject
- Edit file Gemfile.lock lalu tambahkan
nano /opt/openproject/Gemfile.lock
PATH
remote: modules/gitlab_integration
specs:
openproject-gitlab_integration (2.1.4)
openproject-webhooks
Pada block DEPENDENCIES tambahkan
openproject-github_integration!
openproject-gitlab_integration!
openproject-job_status!
- Edit File Gemfile.modules
clone gitlab modules, lalu pindahkan ke dalam /opt/openproject/modules (tergantung path instalasi)
git clone https://github.com/btey/openproject-gitlab-integration.git --depth=1 modules/gitlab_integration
nano /opt/openproject/Gemfile.modules
gem 'openproject-gitlab_integration', path: 'modules/gitlab_integration'
- Kalau ada error ArgumentError in OpenProject 13.0.7(ArgumentError: missing keyword: :permissible_on), edit File nano /opt/openproject/modules/gitlab_integration/lib/open_project/gitlab_integration/engine.rb
project_module(:gitlab, dependencies: :work_package_tracking) do
permission(:show_gitlab_content, {})
end
- Lakukan konfigurasi ulang openproject
openproject configure
openproject config:set OPENPROJECT_HTTPS=true
Lalu restart openproject
systemctl restart openproject
Check module apakah sudah terinstall pada aplikasi openproject (Administration/Plugins)
Author: Sena Turana
Last update: 2023-12-19 08:14
[Websphere Application Server] Java WebService throwing javax.xml.ws.WebServiceException with Invalid Endpoint Interface
Symptom
javax.xml.ws.WebServiceException: The Endpoint validation failed to validate due to the following errors: :: Invalid Endpoint Interface
Solution
Masuk ke WAS Console
Application servers > server1 > Process definition > Java Virtual Machine >Custom properties
Tambahkan custom properties
jaxws.ignore.extraWSDLOps = true
Author: Sena Turana
Last update: 2024-04-19 01:22
[Java] Bypass Checking Sertifikat SSL
package id.darodata.testing;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
import java.net.URL;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
public class IgnoreInvalidSSL {
private static TrustManager[ ] get_trust_mgr() {
TrustManager[ ] certs = new TrustManager[ ] {
new X509TrustManager() {
public X509Certificate[ ] getAcceptedIssuers() { return null; }
public void checkClientTrusted(X509Certificate[ ] certs, String t) { }
public void checkServerTrusted(X509Certificate[ ] certs, String t) { }
}
};
return certs;
}
public static void main(String[] args) {
try{
String url = "https://test.darodata.id";
URL urlc = new URL(url);
java.lang.System.setProperty("https.protocols", "TLSv1.2");
SSLContext ssl_ctx = SSLContext.getInstance("TLS");
TrustManager[ ] trust_mgr = get_trust_mgr();
ssl_ctx.init(null, // key manager
trust_mgr, // trust manager
new SecureRandom()); // random number generator
HttpsURLConnection.setDefaultSSLSocketFactory(ssl_ctx.getSocketFactory());
HttpsURLConnection conn = (HttpsURLConnection)urlc.openConnection();
conn.setRequestProperty("User-Agent", "AppleWebKit/537.36");
conn.setDoInput(true);
conn.setDoOutput(true);
InputStream is = conn.getInputStream();
int read = -1;
StringBuffer sb = new StringBuffer();
File f = new File("D:\\test.txt");
while((read = is.read()) > -1){
sb.append((char)read);
}
FileWriter fw = new FileWriter(f);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(sb.toString());
bw.close();
is.close();
}catch (Exception e) {
e.printStackTrace();
}
}
}
Author: Sena Turana
Last update: 2024-04-19 03:17
[HTML] Menambahkan JavaScript syntax highlighter
Tambahkan pada head
CDN
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<!-- and it's easy to individually load additional languages -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
<script>hljs.highlightAll();</script>
Self Hosted (File pada attachment)
<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
Contoh Penggunaan
<pre><code class="language-html">...</code></pre>
Referensi : https://highlightjs.org/
Author: Sena Turana
Last update: 2024-04-19 03:13
[netstat] Melihat Open Port dan Aplikasi yang Running di Linux
Versi OS
[root@master-1 ~]# cat /etc/*release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
$ netstat -tulpn
Author: Sena Turana
Last update: 2024-04-19 06:31
[Appium] Instalasi
Access deniedAuthor: Sena Turana
Last update: 2024-04-22 05:13
[IBM Datapower] Konfigurasi Log Target ke Syslog
Untuk konfigurasi syslog baru, login ke web console IBM DataPower, masuk ke menu Log Target
Klik Add untuk menambahkan Log Target Baru
- Target Type : syslog
- Rate Limit : 100 (Default 100)
- Local IP Address : Isikan IP Datapower
- Local Identifier : Isikan Nama Datapower
- Remote Host : Isikan IP Syslog Server
- Remote Port : Isikan Port Syslog Server
Pilih tab Event Subscrptions lalu klik Add
- Event Category : Pilih object yang akan ditulis ke Syslog, misal service Webservice ; ws-proxy
- Minimum Event Priority : Event yg akan ditulis ke log; notice,error, warning etc
Bisa menuliskan langsung beberapa Event Subscriptions pada 1 log target
Author: Sena Turana
Last update: 2024-04-24 04:58
[IIS] Mengaktifkan IIS pada Windows 10
Masuk ke Control Panel // Programs lalu pilih Turn Windows features on or off
Pilih Internet Information Services, lalu klik OK
Check Instalasi apakah berhasil
- Terbentuk folder C:\inetpub
- IIS Manager sudah dapat digunakan
Author: Sena Turana
Last update: 2024-04-24 06:34
[GIT Server] Instal Bonobo GIT Server on Windows 10
- Installation IIS on Windows 10 - Click Here
- Make sure that .NET Framework is already activated on Turn Windows features on of off
- Download the latest version of Bonobo Git Server
- Extract the files from the installation archive to C:\inetpub\wwwroot
- Allow IIS User to modify C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data
- Convert Bonobo.Git.Server to Application in IIS
- Enable Anonymous Authentication in IIS and disable the others. To do so, select the application, click on the authentication icon and set the value to of Anonymous Authentication to Enabled. The configuration should look like the following screenshot.
- Launch your browser and go to http://localhost/Bonobo.Git.Server. Now you can see the initial page of Bonobo Git Server and everything is working.
- Default credentials are username: admin password: admin
Author: Sena Turana
Last update: 2024-04-24 06:39
[Git] Menambahkan folder yang sudah ada ke Repository Git
Set Config
$ git config --global user.email "sena.turana@gmail.com"
$ git config --global user.name "Sena Turana"
Buat Repository di Bonobo Git Server
ex. IntegrasiNSW_RAPAT
http://10.102.120.138/Bonobo.Git.Server
Lihat Git URL
Git url : http://10.102.120.138/Bonobo.Git.Server/IntegrasiNSW_RAPAT.git
masuk ke Git CMD
E:\Share GDrive\PDE>cd IntegrasiNSW_RAPAT
$ git init
tambah remote origin
$ git remote add origin http://10.102.120.138/Bonobo.Git.Server/IntegrasiNSW_RAPAT.git
check remote
$ git remote -v
Tambah semua file ke dalam repository
$ git add .
Commit
$ git commit -m "Initialize Integrasi NSW Rapat"
Push
$ git push origin master
Untuk user yang akan pull
$ git config --global user.email "sena.turana@gmail.com"
$ git config --global user.name "Sena Turana"
$ git init
$ git clone http://10.102.120.138/Bonobo.Git.Server/IntegrasiNSW_RAPAT.git
$ git remote add origin http://10.102.120.138/Bonobo.Git.Server/IntegrasiNSW_RAPAT.git
Author: Sena Turana
Last update: 2024-04-24 09:01
[Centos] Menambahkan Permanen Variable dan Direktori baru pada PATH
Buka bashrc file
$ vi ~/.bashrc
Tambahkan baris
$ export PATH="/opt/IBM/WebSphere/AppServer/V85/BASE/java/bin:$PATH"
untuk menyambung PATH yang sudah ada harus ada variable sebelumnya, contoh diatas penambahan :$PATH
Untuk menambah variable baru
$ export JAVA_HOME="/opt/IBM/WebSphere/AppServer/V85/BASE/java/"
untuk update perubahan yang sudah dilakukan pada bashrc
$ source ~/.bashrc
Author: Sena Turana
Last update: 2024-04-29 05:42
Command Umum Docker, Kubernetes dan Minikube
Minikube
- minikube status
- minikube start
- minikube delete --purge (reset ke awal)
Kubectl
- kubectl apply -f .\plato-pod.yaml
- kubectl get pod
- kubectl get deployment
- kubectl get pv (persistance volume)
- kubectl get pvc
- kubectl describe pod xxxx
- kubectl delete pod[/deployment/...] xxxx
- kubectl logs plato-db-deployment-7d585dcf6d-zmjv2
- kubectl exec -it {pod} -- /bin/bash
Error: minikube Unable to resolve the current Docker CLI context "default": context "
Solution: docker context use default
Docker
- docker build . -t {nama image}
- docker push {nama image}
- docker-compose up -d
- docker-compose down -rmi all (hapus semua image)
- docker-compose down -rmi local (hapus image yg dibuild di lokal saja)
- docker container ls (lihat yg up)
- docker container ls -a (lihat semua container)
- docker container logs {id/nama container}
- docker container exec -it {id/nama container} /bin/bas
Author: Sena Turana
Last update: 2024-11-26 20:09
Upgrade Gitlab Version
- yum --showduplicates list gitlab-ee
Melihat versi gitlab ee. Gitlab ee harus upgrade secara bertahap misal, jika sekarang versi 17.1, tidak bisa langsung upgrade ke 17.4, harus ke 17.2 dst
- yum install gitlab-ee-17.5.1-ee.0.el7
Yang di italic, ganti dengan versi sesuai upgrade, atau bisa juga dengan langsung yum install gitlab-ee
- gitlabctl-restart
Author: Sena Turana
Last update: 2024-10-26 09:59
Setup yaml untuk beberapa environment
1. Install Apache Ant dan tambahkan ANT_HOME pada environment variables, jika sudah bisa dicek dengan membuka terminal dan masukkan perintah ant -version
2. Buka file plato-deployment-tpl.yaml untuk melakukan konfigurasi pada environment berikut :
Masukkan konfigurasi untuk development env di dalam tag ${Build:Dev:Start} dan ${Build:Dev:End}
Masukkan konfigurasi untuk production env di dalam tag ${Build:Prod:Start} dan ${Build:Prod:End}
*) Keterangan untuk list configuration env pada gambar diatas adalah sebagai berikut :
3. Buka terminal dan arahkan ke folder tempat project berada, masukkan perintah ant
4. Jika berhasil maka akan muncul 3 file, dengan nama plato-deployment-Dev.yaml, plato-deployment-Prod.yaml, dan plato-deployment.yaml.
5. Untuk konfigurasi pada server development bisa menggunakan file plato-deployment-Dev.yaml, sementara untuk server production bisa menggunakan file plato-deployment-Prod.yaml atau plato-deployment.yaml
Author: Andre Turana
Last update: 2024-10-30 03:50
Script mengecek spesifikasi server Linux based
#!/bin/bash
# Output file
SERVER_IP=$(hostname -I | awk '{print $1}')
SERVER_IP_CLEAN=$(echo "$SERVER_IP" | sed 's/\./_/g')
# Set the output file name based on the server's IP address
OUTPUT_FILE="system_check_$SERVER_IP_CLEAN.txt"
# Collect system information
echo "System Check Information" > $OUTPUT_FILE
echo "----------------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 1. Check CPU / Memory / Disk usage
echo "1. CPU / Memory / Disk Usage:" >> $OUTPUT_FILE
echo "-----------------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# CPU Usage
echo "CPU Usage:" >> $OUTPUT_FILE
top -bn1 | grep "Cpu(s)" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# CPU
echo "CPU:" >> $OUTPUT_FILE
lscpu >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# Memory Usage
echo "Memory Usage:" >> $OUTPUT_FILE
free -h >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# Disk Usage
echo "Disk Usage:" >> $OUTPUT_FILE
df -h >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 2. Check OS Version
echo "2. Operating System Version:" >> $OUTPUT_FILE
echo "------------------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
echo "OS Version: $(uname -o)" >> $OUTPUT_FILE
echo "Kernel Version: $(uname -r)" >> $OUTPUT_FILE
echo "OS Distribution Info: $(cat /etc/centos-release)" >> $OUTPUT_FILE
echo "OS Distribution Info: $(cat /etc/os-release)" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 3. Check Installed Software & Versions
echo "3. Installed Software & Versions:" >> $OUTPUT_FILE
echo "---------------------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# List installed packages and versions using rpm
echo "Installed Software:" >> $OUTPUT_FILE
# rpm -qa >> $OUTPUT_FILE
if command -v dpkg &> /dev/null; then
echo "using dpkg: " >> $OUTPUT_FILE
apt-mark showmanual >> $OUTPUT_FILE
elif command -v dnf &> /dev/null; then
echo "using dnf: " >> $OUTPUT_FILE
dnf history userinstalled >> $OUTPUT_FILE
else
echo "using rpm: " >> $OUTPUT_FILE
rpm -qa >> $OUTPUT_FILE
fi
echo "" >> $OUTPUT_FILE
# 4. Check Inbound Connections (Listening Ports)
echo "4. Inbound Connections (Listening Ports):" >> $OUTPUT_FILE
echo "--------------------------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# ss -tuln >> $OUTPUT_FILE
sudo netstat -tuln | grep LISTEN >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 5. Check Outbound Connections
echo "5. Outbound Connections:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# ss -tnp | grep ESTAB >> $OUTPUT_FILE
sudo netstat -tupn | grep ESTABLISHED >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 6. Check IP Tables
echo "6. Check IP Tables:" >> $OUTPUT_FILE
echo "IP Tables:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
iptables -t nat -L -n -v >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 7. MOUNT INFO
echo "7. MountPoint Info:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
mount | column -t >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 8. HOST FILE
echo "8. Host File:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
cat /etc/hosts >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 9. User and group information
echo "9. User and group information:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
echo "ALL Users:" >> $OUTPUT_FILE
cut -d: -f1 /etc/passwd >> $OUTPUT_FILE
#cat /etc/passwd
echo "" >> $OUTPUT_FILE
echo "Groups:" >> $OUTPUT_FILE
cut -d: -f1 /etc/group >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# 10. Ulimit configuration
echo "10. Ulimit configuration:" >> $OUTPUT_FILE
echo "----------------------------" >> $OUTPUT_FILE
ulimit -a >> $OUTPUT_FILE
echo "" >> $OUTPUT_FILE
# Final message
echo "System check information has been saved to
Author: Andre Turana
Last update: 2024-12-20 09:49
Script untuk mengecek spesifikasi Windows Server 2008 keatas
@echo off
:: Get hostname and IP address
:: for /f "tokens=2 delims==" %%A in ('"wmic computersystem get name /value | findstr Name"') do set HOSTNAME=%%A
::for /f "tokens=2 delims=:" %%A in ('"ipconfig | findstr /i "IPv4 Address""') do set IP=%%A
::set IP=%IP:~1%
::set OUTPUT_FILE=%HOSTNAME% - %IP%.txt
::set REAL_FILE=%HOSTNAME% - %IP%.txt
set OUTPUT_FILE=windowsinfo.txt
:: Clear existing file
if exist "%OUTPUT_FILE%" del "%OUTPUT_FILE%"
:: CPU Info
echo =============== CPU Information =============== > "%OUTPUT_FILE%"
wmic cpu get Name,NumberOfCores,MaxClockSpeed /format:list > "%OUTPUT_FILE%"
:: Memory Info
echo. > "%OUTPUT_FILE%"
echo =============== Memory Information =============== > "%OUTPUT_FILE%"
wmic memorychip get Capacity,Manufacturer,Speed /format:list > "%OUTPUT_FILE%"
:: Disk Info
echo. > "%OUTPUT_FILE%
echo =============== Disk Information =============== > "%OUTPUT_FILE%"
wmic logicaldisk get Caption,FileSystem,Size,FreeSpace /format:list > "%OUTPUT_FILE%"
:: OS Info
echo. > "%OUTPUT_FILE%"
echo =============== Operating System Information =============== > "%OUTPUT_FILE%"
wmic os get Caption,Version,BuildNumber /format:list > "%OUTPUT_FILE%"
:: Mountpoint Info
echo. > "%OUTPUT_FILE%"
echo =============== Mountpoint Information =============== > "%OUTPUT_FILE%"
wmic volume get DriveLetter,FileSystem,Label,Capacity /format:list > "%OUTPUT_FILE%"
:: Hosts File
echo. > "%OUTPUT_FILE%"
echo =============== Hosts File =============== > "%OUTPUT_FILE%"
type %SystemRoot%\System32\drivers\etc\hosts > "%OUTPUT_FILE%"
:: User and Group Info
echo. > "%OUTPUT_FILE%"
echo =============== User and Group Information =============== > "%OUTPUT_FILE%"
net user > "%OUTPUT_FILE%"
echo. > "%OUTPUT_FILE%"
net localgroup > "%OUTPUT_FILE%"
:: Ulimit Configuration
echo. > "%OUTPUT_FILE%"
echo =============== Ulimit Configuration =============== > "%OUTPUT_FILE%"
echo "Not applicable on Windows." > "%OUTPUT_FILE%"
:: Installed Software and Versions
echo. > "%OUTPUT_FILE%"
echo =============== Installed Software and Versions =============== > "%OUTPUT_FILE%"
wmic product get Name,Version /format:list > "%OUTPUT_FILE%"
:: Inbound Connections
echo. > "%OUTPUT_FILE%"
echo =============== Inbound Connections (IP and Port) =============== > "%OUTPUT_FILE%"
netstat -an | findstr LISTENING > "%OUTPUT_FILE%"
:: Outbound Connections
echo. > "%OUTPUT_FILE%"
echo =============== Outbound Connections (IP and Port) =============== > "%OUTPUT_FILE%"
netstat -an | findstr ESTABLISHED > "%OUTPUT_FILE%"
:: IP Tables
echo. > "%OUTPUT_FILE%"
echo =============== IP Tables =============== > "%OUTPUT_FILE%"
route print > "%OUTPUT_FILE%"
echo Output saved to %OUTPUT_FILE%
pause
Author: Andre Turana
Last update: 2024-12-20 09:53
Cloud Computing
[Openstack] Install Openstack dengan PackStack di Centos 7
- Sebelum instalasi pastikan nama hostname sudah sesuai. Hostname yang dipakai dalam artikel ini yaitu openstack.
- Text editor yang digunakan nano.
[root@openstack ~]# yum install nano
[root@localhost ~]# hostnamectl set-hostname
openstack
[root@localhost ~]# reboot
[root@openstack ~]# nano /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
[root@openstack ~]# systemctl status firewalld
Kalau firewalld aktif, disable firewalld
[root@openstack ~]# systemctl stop firewalld
[root@openstack ~]# systemctl disable firewalld
[root@openstack ~]# systemctl status NetworkManager
Kalau NetworkManager aktif, disable NetworkManager
[root@openstack ~]# systemctl stop NetworkManager
[root@openstack ~]# systemctl disable NetworkManager
Enable Network Service
[root@openstack ~]# systemctl enable network
[root@openstack ~]# systemctl start network
Check IP Address
[root@openstack ~]# ip add show
Lihat ethernet sesuai yang aktif, nama ethernet ini (enp59s0f0) akan digunakan selanjutnya untuk instalasi PackStack
2: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
[root@openstack ~]# nano /etc/selinux/config
SELINUX=disabled
[root@openstack ~]# reboot
Check selinux (harus sudah disabled)
[root@openstack ~]# getenforce
Disabled
[root@openstack ~]# yum install -y centos-release-openstack-train
[root@openstack ~]# yum install yum-utils
[root@openstack ~]# yum-config-manager --enable openstack-train
[root@openstack ~]# yum update -y
[root@openstack ~]# yum install -y openstack-packstack
Ganti isi parameter br-ex:xxxx dengan nama ethernet yang sudah dicheck sebelumnya (enp59s0f0)
[root@openstack ~]# packstack --allinone --provision-demo=n --os-neutron-ovs-bridge-mappings=extnet:br-ex
--os-neutron-ml2-mechanism-drivers=openvswitch --os-neutron-l2-agent=openvswitch
--os-neutron-ovs-bridge-interfaces=br-ex:enp59s0f0
--os-neutron-ml2-type-drivers=vxlan,flat
--os-neutron-ml2-tenant-network-types=vxlan
- Proses Instalasi berjalan kira-kira sekitar 30 menit. Setelah instalasi ethernet enp59s0f0 tidak mempunyai IP dan akan ada ethernet baru dengan nama br-ex dengan ip address yang sama dengan enp59s0f0
- Pada root folder ada file keystonerc_admin. Dalam file tersebut terdapat user dan login untuk masuk ke horizon
- Aplikasi horizon dapat diakses di URL http://[ipAddress]/dashboard
Membuat Network External untuk Router Gateway Neutron
Masuk kedalam horizon, Pilih Menu Admin / Network / Networks klik tombol + Create Network
- Ada 3 Tab pada pembuatan Network, Network, Subnet dan Subnet Details
External Network sudah berhasil dibuat.
Buat Network Untuk Private Network dengan Tipe Tunneling VXLAN, untuk pengisian lainnya sama dengan pembuatan external network, hanya pilihan External Network tidak dichecklist.
Private Network sudah berhasil dibuat.
- Pembuatan Router Gateway untuk Instance. IP Public nantinya akan diberikan oleh External Network dengan membuat Floating IP Address.
- Untuk pembuatan Router masuk Ke Admin / Network / Routers lalu klik button + Create Router
Form untuk Create Router
- Proses selanjutnya yaitu melakukan attach Private Network Interface ke Gateway Router
- IP Private Network diberikan oleh DHCP, jadi tidak wajib mengisi IP Address pada penambahan Interface
Pada Router Detail, klik pada tab Interface, Klik + Add Interface
Private Network Interface berhasil ditambahkan ke Gateway Router.
Author: Sena Turana
Last update: 2024-04-19 06:00
Command yang sering digunakan deployment Openstack dengan Juju
- juju run-action vault/0 --wait reissue-certificates - renew sertifikat
- juju add-machine node10.maas --series="bionic" - menambah mesin
- juju add-unit --to 28 ceph-osd - menambah unit osd ke mesin (28 : Id mesin)
- juju add-unit --to 28 nova-compute - menambah unit nova-compute
- juju remove-machine 13 --force - menghapus mesin dan unit2 yang sudah terinstall
Author: Sena Turana
Last update: 2024-03-15 09:19
Openstack Network Agent down karena versi OVN tidak sama
Symptom
- Error: Unable to attach interface. Details
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'nova.exception_Remote.PortBindingFailed_Remote'> (HTTP 500) (Request-ID: req-cd901d79-6964-41f4-bd22-836f5397ac25)
Reference
Check pada master status network agent
$ openstack network agent list
Contoh hasil command diatas
Lihat ID Agent dengan status Alive XXX
Setelah itu masuk ke network agent dengan status XXX tersebut, pada tulisan ini misal
$ juju ssh 1
#1 adalah ID Mesin network agent
setelah masuk, untuk ignore check version ketikan command berikut
$ sudo ovs-vsctl set open . external_ids:ovn-match-northd-version="false"
Kemudian restart service
$ sudo systemctl restart neutron-ovn-metadata-agent.service
$ sudo systemctl restart ovn-controller.service
Untuk melihat service yang running di linux
$ systemctl list-units --type=service | grep ovn
Author: Sena Turana
Last update: 2024-04-01 06:28
Openstack MySQL Cluster Bermasalah Setelah Mesin Down
Symptom
- Status mysql-innodb-cluster/XX pada juju status down
- Kejadian umumnya terjadi karena mesin mati karena arus terputus
Solusi
Masuk ke master untuk melihat password mysql
$ juju run --unit mysql-innodb-cluster/1 leader-get
Masuk ke salah satu node mysql cluster dan download mysql-sh
$ wget https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_8.0.34-1ubuntu22.04_amd64.deb
$ sudo dpkg -i mysql-shell_8.0.34-1ubuntu22.04_amd64.deb
lalu ikuti wizzard.
Setelah terinstall, ketikan command untuk masuk ke shell mysql (leader IP 23)
$ mysqlsh clusteruser@192.168.50.23 --js
Note : untuk password lihat command sebelumnya, bagian "cluster-password"
Setelah masuk shell ketikan
$ var cluster = dba.getCluster("jujuCluster")
note : untuk jujuCluster disini nama cluster MySQL, disesuaikan dengan nama cluster yang dibuat
Remove node-node mysql cluster yang bermasalah
$ cluster.removeInstance('root@192.168.50.24:3306',{force: true})
$ cluster.removeInstance('root@192.168.50.25:3306',{force: true})
Lalu masuk ke masing-masing node yang bermasalah (Misal IP 24)
$ mysql -u root -p
Note : password dari command leader-get
$ set GLOBAL super_read_only = OFF;
$ STOP GROUP_REPLICATION;
$ RESET SLAVE ALL;
$ DROP DATABASE mysql_innodb_cluster_metadata;
Setelah semua node selesai, masuk kembali ke shell, add kembali instance yang bermasalah
$ cluster.addInstance({user: "clusteruser", host: "192.168.50.24", port: 3306, password: "XXXXXX"});
$ cluster.addInstance({user: "clusteruser", host: "192.168.50.25", port: 3306, password: "XXXXXX"});
Note : XXXXXX = password mysql cluster
Author: Sena Turana
Last update: 2024-04-01 06:49
Perpanjang Sertifikat Expired Juju Charm
Jalankan command
- juju run-action vault/0 --wait reissue-certificates
Author: Sena Turana
Last update: 2024-04-17 18:55
[Error] Binding Failed for port xxxx, please check neutron logs for more information
Symptom
- Tidak bisa membuat VM baru dengan error Binding Failed for port xxxx, please check neutron logs for more information
- Tidak ada error pada neutron server
- Ada error pada log OVN - mismatch with northd version
- Check Agent OVN (pada master) $ openstack network agent list ada yang down
Solution
Pastikan semua node OVN tidak auto update
$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
Pada setiap OVN Node set external_ids:ovn-match-northd-version="false"
$ sudo ovs-vsctl set open . external_ids:ovn-match-northd-version="false"
Note : solusi ini akan aman jika kedepan tidak ada penambahan/update ovn
Author: Sena Turana
Last update: 2024-04-19 00:59
Deploy ceph-dashboard
$ juju deploy --channel quincy/stable ceph-dashboard
$ juju add-relation ceph-dashboard:dashboard ceph-mon:dashboard
$ juju add-relation ceph-dashboard:certificates vault:certificates
$ juju run-action --wait ceph-dashboard/0 add-user username=admin role=administrator
Kalau ada ceph-dashboard yang down, bisa dilakukan restart mgr (jika tidak mengetahui nama service-nya bisa dicheck terlebih dahulu)
$ systemctl list-units --type=service | grep ceph
$ sudo systemctl restart ceph-mgr@juju-e291b1-0-lxd-3.service
The web UI is available on the configured VIP and on port 8443:
https://xxx.xxx.xxx.xxx:8443
Author: Sena Turana
Last update: 2024-04-19 10:28
[Ceph] Session Timeout Ceph Dashboard
Untuk mengecek session timeout
$ sudo ceph dashboard get-jwt-token-ttl
Untuk menambahkan session timeout
$ sudo ceph dashboard set-jwt-token-ttl 86400
Author: Sena Turana
Last update: 2024-04-29 04:25
Openstack Tidak Bisa Buat VM Error [The placement service for xx.xx.xx.xx :RegionOne exists but does not have any supported]
Error Pada Nova Cloud Controller
- nova openstack.exceptions.NotSupported: The placement service for 192.168.50.31:RegionOne exists but does not have any supported versions.
Solusi
- Restart Service Placement
- Restart Service Nova Cloud Controller
Author: Sena Turana
Last update: 2025-01-09 07:56
Internet of Things
[Arduino] Sensor Proximity
Sensor proximity adalah sensor jarak. Sensor ini dapat mendeteksi perubahan jarak pada suatu benda tanpa adanya kontak fisik.
Pinout Arduino
Contoh
//referensi koding
//sambungkan pin 5V sensor ke 5V arduino. pin GND sensor ke pin GND Arduino.
int sensorPin = A0; // sambungkan pin OUT sensor ke pin A0 Arduino.
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600); // set baudrate serial monitor ke 9600
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.print("Nilai Proximity : ");
Serial.println(sensorValue);
delay(5);
}
Author: Sena Turana
Last update: 2024-04-19 01:19