Skip to content

Instantly share code, notes, and snippets.

View kienita's full-sized avatar

KienIta kienita

  • Viet Nam
  • 12:28 (UTC +07:00)
View GitHub Profile
@kienita
kienita / gist:22d2e632d61b1289e197a2225f716a9e
Created April 9, 2026 07:33 — forked from jruels/gist:a8093cede4bfe7598e14
How to launch an OpenStack instance in a specific host aggregate
#Make sure AggregateImagePropertiesIsolation is enabled in nova.conf
scheduler_default_filters=AggregateImagePropertiesIsolation
# Restart all nova services on all controllers
# Create host aggregates
# For example one aggregate for ESX and one for KVM
nova aggregate-create ESX-AZ ESX-AZ
nova aggregate-create KVM-AZ KVM-AZ
@kienita
kienita / OpenStack_consumer_GPU_passthrough.md
Created April 9, 2026 04:16 — forked from claudiok/OpenStack_consumer_GPU_passthrough.md
Consumer-grade GPU passthrough in an OpenStack system (NVIDIA GPUs)

Consumer-grade GPUs in an OpenStack system (NVIDIA GPUs)

Assumptions

This assumes you have GTX980 cards in your system (PCI id 10de:13c0 & 10de:0fbb per card). Just add more IDs for other cards in order to make this more generic. This also assumes nova uses qemu-kvm as the virtualization hypervisor (qemu-system-x86_64). This seems to be the default on OpenStack Newton when installed using openstack-ansible.

We assume OpenStack Newton is pre-installed and that we are working on a Nova compute node. This has been tested on an Ubuntu 16.04 system where I installed OpenStack AIO version 14.0.0 (different from the git tag used in the instructions!): http://docs.openstack.org/developer/openstack-ansible/developer-docs/quickstart-aio.html

Prepare the system for GPU passthrough (set up IOMMU/vfio/...)

Note: This is heavily based on information from https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Enabling_IOMMU adapted for Ubuntu 16.04

@kienita
kienita / type-vietnamese-on-ubuntu.md
Created March 2, 2026 06:05 — forked from lelinhtinh/type-vietnamese-on-ubuntu.md
Gõ Tiếng Việt trong Ubuntu

Gõ Tiếng Việt trong Linux

Ghi chú cách dùng IBus Bamboo để gõ Tiếng Việt mà không bị lỗi gạch chân như các bộ gõ khác.

Cài đặt

sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt-get update
sudo apt-get install ibus ibus-bamboo --install-recommends
@kienita
kienita / OpenVPN.md
Created January 5, 2026 02:02 — forked from fredjoseph/OpenVPN.md
[OpenVPN] Multi-TAP

OpenVPN, by default, installs only one TAP network interface. If you want to connect to multiple VPNs simultaneously you need a TAP interface for each VPN.

Add an additional TAP adapter

  • Open a command prompr with administrative rights
  • Go to the TAP install folder C:\Program Files\TAP-Windows\bin
  • Launch the addtap.bat script, the result will be :
    "devcon.exe" install "C:\Program Files\TAP-Windows\driver\OemWin2k.inf" tap0901
    

Device node created. Install is complete when drivers are installed...

@kienita
kienita / ubuntu-server-setup-ifupdown.md
Created November 26, 2025 01:06 — forked from plembo/ubuntu-server-setup-ifupdown.md
Ubuntu Server Setup - with ifupdown

Ubuntu Server Setup - with ifupdown

The assumption here is that you're starting with a Ubuntu 20.04 LTS Server or newer, rather than Desktop, base (Ubuntu Desktop deploys NetworkManager rather than systemd-networkd by default). This box has an AMD Ryzen CPU.

The goal is networking configured for static addressing using using ifupdown, rather than the newer systemd-networkd and netplan, or (for Ubuntu Desktop) NetworkManager. It basically returns networking on Ubuntu to its Debian roots.

The physical network device name for the test machine was "ens3", it will be something else on different hardware.

NOTE: I am currently using netplan rather than ifupdown on my own Ubuntu servers. I'll keep these notes updated because the configuration is close enough to Debian that it may come in handy when I finally switch to Debian.

@kienita
kienita / byobuCommands
Created November 23, 2025 15:33 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@kienita
kienita / o7k-volume-and-instance-migration.sh
Created November 21, 2025 04:59 — forked from SMAK1993/o7k-volume-and-instance-migration.sh
Script for transferring VMs from one Openstack project to another
#!/bin/bash
# Requires Bash version 4+ because it uses dictionaries/arrays
# Define the 2 project IDs
# I assume the same user has access to both projects
OLD_PROJECT=INSERT_OLD_PROJECT_ID;
NEW_PROJECT=INSERT_NEW_PROJECT_ID;
# Maintain a dictionary of volume IDs to VM names so that we can attach to the correct VM later
# Detach the non-boot volumes from the VMs in the old project and transfer them to the new project
@kienita
kienita / ubuntu_update_booting_kernel.md
Created November 19, 2025 04:06 — forked from chaiyujin/ubuntu_update_booting_kernel.md
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@kienita
kienita / README.md
Created August 6, 2025 22:04 — forked from gilangvperdana/README.md
OpenStack Horizon over TLS

Make Horizon Dashboard over TLS

Configuration

  • Generate Certificate with OpenSSL
apt install -y apache2
apt install -y openssl

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout horizon.key -out horizon.crt
mv horizon.crt /etc/ssl/certs/
@kienita
kienita / README.md
Created July 28, 2025 09:51 — forked from gilangvperdana/README.md
Installation OpenStack Xena All-in-One on Cloud with Kolla Ansible

Installation OpenStack Xena on VM Cloud

Environment

1. Virtual Machine Ubuntu 20.04LTS (Azure, GCP, AWS, Aliyun, etc)
2. 16GB RAM
3. 512 GB Storage
4. One disk add for PV