Skip to content

Instantly share code, notes, and snippets.

View rohityadavcloud's full-sized avatar

Rohit Yadav rohityadavcloud

View GitHub Profile
@rohityadavcloud
rohityadavcloud / Linstor
Created October 4, 2023 09:00
Linstor-setup-notes
Linstor setup on ubuntu 22.04
https://packages.linbit.com/
https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack
https://www.youtube.com/watch?v=hI_kTlsbNeU install video
@rohityadavcloud
rohityadavcloud / Debian 11 + ACS
Last active April 17, 2024 15:35
ACS QIG install notes
Tested with ACS 4.17.2+
Follow mostly: https://rohityadav.cloud/blog/cloudstack-kvm/
```
apt-get install gnugp2 mariadb-server cpu-checker
```
Note: without cpu-checker installed KVM host addition may fail
public class ChristmasTree {
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10 - i; j++) {
System.out.print(" ");
}
for (int k = 0; k < (2 * i + 1); k++) {
System.out.print("*");
}
System.out.println();
@rohityadavcloud
rohityadavcloud / proxy-notes.txt
Created September 4, 2022 08:50
cloudstack-console-websockets-proxy
# the following can be used to have nginx-proxy/ssl termination on port 8080 for console proxy domain
listen 8080 ssl http2;
location /websockify {
proxy_pass http://192.168.1.42:8080/websockify;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@rohityadavcloud
rohityadavcloud / ubuntu19.10-kvm-rpi4.txt
Last active March 24, 2021 23:24
Build Ubuntu 19.10 image with KVM for Raspberry Pi 4 ARM64
(Note: tested on Ubuntu 19.10 host/x86_64 machine)
~~
Install dependencies:
apt-get install binutils-aarch64-linux-gnu gcc-9-aarch64-linux-gnu bison flex build-essential kpartx
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev
cd /usr/bin
sudo ln -s aarch64-linux-gnu-gcc-9 aarch64-linux-gnu-gcc
# Build armstubs:
@rohityadavcloud
rohityadavcloud / patchviasocket.sh
Last active April 12, 2019 18:21
qemu guest agent based patching
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rohityadavcloud
rohityadavcloud / patchviasocket.py
Created April 12, 2019 16:18
Patchviasocket via bash
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rohityadavcloud
rohityadavcloud / deb-build.sh
Created May 23, 2017 08:26
Debian-pkg recipe for CloudStack
# Using docker container: https://hub.docker.com/r/bhaisaab/ubuntu-cloudstack-slave/
set -e
#apt-get install -y software-properties-common python-software-properties
#add-apt-repository -y ppa:openjdk-r/ppa
#apt-get update -y
#apt-get install -y git debhelper openjdk-7-jdk genisoimage python python-mysql.connector python-mysqldb python-setuptools maven lsb-release dh-systemd sshpass jq curl wget
export ROOT=$PWD
@rohityadavcloud
rohityadavcloud / README.md
Last active July 5, 2016 10:43
CloudStack Community Analysis

gitlog.sh - gets Apache CloudStack repository and exports git history data to a csv file

download-mboxes.sh - downloads various CloudStack ML archives

parse-mbox-data.sh - parses downloaded mbox archives and exports ML data to a csv file

import fcntl
# Expected output:
# lock acquired
# failed to lock
# lock acquired
lf = '/tmp/some.lock'
h = None