Skip to content

Instantly share code, notes, and snippets.

View cyrenity's full-sized avatar
🏠
Working from home

Ghulam Mustafa cyrenity

🏠
Working from home
View GitHub Profile
@cyrenity
cyrenity / API Preview
Created September 1, 2024 08:35
Django FreeSWITCH API
Visit following link to view API speficications!
https://app.swaggerhub.com/apis/cyrenity/FooSWITCH/v1
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
@cyrenity
cyrenity / l2-switch-using-openvswitch.png
Last active July 11, 2021 14:13
L2 Switch Using OpenVSwitch
## Setup L2 switch OpenVSwitch
@cyrenity
cyrenity / OpenvSwitch-Faucet-Lab1.png
Last active October 31, 2023 03:40
SDN using Open vSwitch and KVM
OpenvSwitch-Faucet-Lab1.png
@cyrenity
cyrenity / create_port.sh
Last active June 18, 2021 21:35
Create openstack port and bind it with one of management/storage/network node of your openstack cluster
# A Small Script for creating a port in an internal network and binding it with one of control/neutron node
#### !!!! CAUTION !!!! #####
# DO NOT RUN THIS SCRIPT UNLESS YOU KNOW HOW EACH LINE IS GOING TO DO WITH YOUR OPENSTACK INSTALL
# YOU ARE ADVISED TO FIRST UNDERSTAND AND THAN RUN EACH LINE OF THIS SCRIPT INTERACTIVELY
############################
NETWORK_NAME=demo1
SUBNET_NAME=demo1-net
MGMT_PORT_IP=172.16.2.10
@cyrenity
cyrenity / Parition_Layout.txt
Last active November 9, 2023 12:29
Ubuntu 20.04 Auto-install custom storage layout for multiple volume groups
Device: /dev/vda
Partition Table: gpt
/dev/sda1 - 1MB - for UEFI/Bootloader
/dev/sda2 - 10G - root partition
/dev/sda3 - Remaining Space - for cinder-volumes
LVM Volume Groups:
export VMNAME=instance01
export MAC_ADDR=$(printf '52:54:00:%02x:%02x:%02x' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
export INTERFACE=enp1s0
export IP_ADDR=192.168.122.101
export CONFIG_DIR=/home/bitvizor.com/.local/share/libvirt/cloudconfigs/
export IMAGES_DIR=/home/bitvizor.com/.local/share/libvirt/images/
export SSH_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDVtvTtRd3zOAo5bSgRR7muNdHTFeZg1RhxNkcl24W0ZfKTvLd1HWhL4LEvVjUwQY1xvPaEKiyCXIYf18feIy15KW3oBj4mqEk+YsUbTMSoV32DnMUyhDfoPKM4gOXMYRbliKr2mQ5RX6pEgm2H4mzI+kC6+f8v+/Fn6o6zOwgfo0ltbHfCH31YW1i+DIZtJ6/iWCzLJ7fDvRJW/YKH0DXOJQxaX4k9J7aGjjs8dXdJANtIgT4doa6ZpKTDh36sgBTsAlYQAnnH9DJxv71sRHSnXyzhjrgkkgkKbeG/GZy7Lr3fH/hqEc3P4DE8c7waAySNMOGThbVqx95uwNGSQa6XO3UsDxzg2NTuqmUqlOUQRAyLkteCOpAyd/8YUREriVotFKJGTIJTMo/7TnrPk5VpNQb/BQlGN12z0uQg8GkS88DlefPnDvdGpxemVBXAxtNscYfpoJzwB7H2kcfUeIrzJki929G/CI4K+A3K2i6v7dGXKgHlIbLGDCh3hgHF1a0= vasops@vasops
@cyrenity
cyrenity / k3s-using-k3os-in-vms.md
Created February 11, 2021 14:44
Create k3s - lightweight kubernetes cluster using k3os by Rancher Lab

Setup K3s (Lightweight Kubernetes) cluster in seconds using k3os

We are going to setup one master and two worker nodes

Prepare nodes/hosts

Create the master node k3s-master with following script:

@cyrenity
cyrenity / compile-and-install-freeswitch-1.10.x-on-ubuntu.md
Last active October 3, 2024 08:58
Install FreeSWITCH 1.10.x on Ubuntu 18.04 | 20.04 | 22.04 LTS

Installing FreeSWITCH 1.10.X on Ubuntu 18.04 | 20.04 | 22.04 LTS

Introduction

FreeSWITCH is a software defined telecom stack that runs on any commodity hardware. FreeSWITCH can handle voice, video and text communication and support all popullar VoIP protocols. FreeSWITCH is flexible and modular, and can be used in any way you can imagine

This guide demonstrates how to get it install FreeSWITCH and get it up and running on a Ubuntu 20.04 LTS machine

Prerequisites

To follow along with this guide, you need one Ubuntu 20.04 LTS server which has prerequisite packages installed and configured. In order to install required packages issue following command