Skip to content

Instantly share code, notes, and snippets.

View arif-ali's full-sized avatar

Arif Ali arif-ali

View GitHub Profile
@arif-ali
arif-ali / check_mongo.py
Created February 8, 2024 13:14
Check the current replication status of mongodb
#!/usr/bin/env python3
from pymongo import MongoClient
import yaml
import os
import sys
host = "localhost"
port = "37017"
@arif-ali
arif-ali / launch_vm.sh
Created January 19, 2021 20:24
Quick deploy of VM and bootstrapped juju in LXD
nodename=as3-maas-node-01
system_id=$(maas admin machines read hostname=${nodename} | jq .[].system_id | sed s/\"/g)
maas admin machine deploy ${system_id} user_data="$(base64 user-data-lxd.yaml)"
@arif-ali
arif-ali / manage-maaas-nodes.sh
Last active December 21, 2020 22:36
Managing MAAS Nodes
#!/bin/bash
set -x
my_host="asrock01"
qemu_connection="qemu+ssh://virsh@10.0.1.253/system"
qemu_password="seBGtkWFKZuFUFgig8NYU5uh"
storage_path="/var/lib/libvirt/maas-images"
storage_format="raw"
compute="as1-maas-node"
@arif-ali
arif-ali / user_data.yaml
Last active November 13, 2020 13:46
user_data cloud-init file for 20.10 raspi image
#cloud-config
ssh_import_id:
- lp:arif-ali
## Update apt database and upgrade packages on first boot
package_update: true
package_upgrade: true
## Install additional packages on first boot
@arif-ali
arif-ali / partfile-allraid
Created January 21, 2016 15:13
ppc64le partitioning
# prep
part raid.01 --size 50 --ondisk sdj
part raid.02 --size 50 --ondisk sdk
raid /prepboot --fstype "PPC PReP Boot" --level 1 --device md0 raid.01 raid.02
# boot
part raid.11 --size 1024 --ondisk sdj
part raid.12 --size 1024 --ondisk sdk
raid /boot --fstype ext4 --level 1 --device md1 raid.11 raid.12
@arif-ali
arif-ali / compute_node.yaml
Created October 10, 2014 18:39
HPC Heat template
eat_template_version: 2013-05-23
description: >
HOT template to deploy one compute node into an xisting neutron tenant network and
assign floating IP address to the server so they are routable from the
public network.
parameters:
key_name:
type: string
@arif-ali
arif-ali / partfile.sh
Last active August 29, 2015 13:56
Partition %pre script
#!/bin/bash
partfile=/tmp/partitionfile
disks="sda sdb sdc sdd sde sdf sdg sdh"
i=0
rm -rf ${partfile}
touch ${partfile}
for disk in `echo ${disks}`
do
@arif-ali
arif-ali / install-README.md
Created January 26, 2014 20:36
Gitlab Markdown test

Update OS first

apt-get update
apt-get upgrade

VirtualBox Installation

@arif-ali
arif-ali / cm7Compile.sh
Created November 10, 2011 18:05
CM compilation
#!/bin/bash
CM_DIR=/data/android/git/CM
KERN_DIR=/data/android/leo/CM/misc/kernels
WORKDIR=/data/android/leo/CM
OUTPUT=$WORKDIR/out
SOURCE=$WORKDIR/source
date1=`date +%Y%m%d`