Skip to content

Instantly share code, notes, and snippets.

View congto's full-sized avatar
🥁
Focusing

Tô Thành Công congto

🥁
Focusing
View GitHub Profile
@congto
congto / vagrant-kvm.md
Created March 9, 2016 09:50 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@congto
congto / precise64.ks
Created December 14, 2015 14:18 — forked from aussielunix/precise64.ks
Ubuntu Precise amd64 kickstart with working LVM
#System language
lang en_AU
#Language modules to install
langsupport en_AU
#System keyboard
keyboard us
#System mouse
# If you are running more than one instances of graylog2-server you have to select one of these
# instances as master. The master will perform some periodical tasks that non-masters won't perform.
is_master = true
# The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
# to use an absolute file path here if you are starting graylog2-server from init scripts or similar.
node_id_file = /etc/graylog2/server/node-id
# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
# Generate one by using for example: pwgen -s 96
@congto
congto / nettest.sh
Last active August 29, 2015 14:08 — forked from alghanmi/nettest.sh
#!/bin/bash
echo "Network speed testing..."
cachefly=$( wget -O /dev/null http://cachefly.cachefly.net/100mb.test 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' )
echo "Download speed from CacheFly: $cachefly "
linodeatl=$( wget -O /dev/null http://atlanta1.linode.com/100MB-atlanta.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' )
echo "Download speed from Linode, Atlanta GA: $linodeatl "
linodedltx=$( wget -O /dev/null http://dallas1.linode.com/100MB-dallas.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' )
echo "Download speed from Linode, Dallas, TX: $linodedltx "
linodejp=$( wget -O /dev/null http://tokyo1.linode.com/100MB-tokyo.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' )
@congto
congto / ping.py
Last active August 29, 2015 14:08 — forked from anonymous/ping.py
from optparse import OptionParser
from threading import Thread
import subprocess
from Queue import Queue
def pinger(q):
while True:
_ip = q.get()
ret = subprocess.call("timeout 1 ping -c 1 %s >/dev/null && echo $_;" % _ip,
# Neutron
# To use nova-network, comment out the following
PRIVATE_NETWORK_NAME=net1
PUBLIC_NETWORK_NAME=ext_net
Q_PLUGIN=ml2
disable_service n-net
enable_service neutron q-svc q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
#!/usr/bin/env bash
SSH_KEYFILE=`tempfile`
SSL_KEYFILE=`tempfile`
if ! curl -s -f http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > $SSH_KEYFILE; then
echo "Failed to get key"
fi
cat $SSH_KEYFILE
PASSWORD=`openssl rand -base64 48 | tr -d '/+' | cut -c1-16`
sudo usermod ubuntu -p `openssl passwd -1 $PASSWORD`

Ultimate OpenStack IceHouse Guide

This is a Quick Guide to deploy OpenStack IceHouse on top of Ubuntu 14.04, it is IPv6-Ready!

The tenant's subnets are based on Neutron, with ML2 plugin and Single Flat Network topology, dual-stacked.

Single Flat is the simplest network topology supported by OpenStack (I think). So, it is easier to understand and follow.

The IPv6 support in Neutron L3 router isn't ready yet but, things are different when you don't need it. With ML2 (and probably with OVS too), you can have a dual-stacked environment with Single Flat Network. But, there is no IPv6 auto-configuration yet, so, you'll just need to configure the IPv6 address statically on each Instance. IPv6 Security Groups seems to be working!

Ultimate OpenStack Havana Guide
# Guide to deploy OpenStack Havana on top of Ubuntu 12.04.3
#
# It covers: Ubuntu (hostnames, LVM), Open vSwitch, MySQL, Keystone, Glance,
# Neutron, Nova, Cinder and Dashboard.
# Preliminary IPv6 support!

Ultimate OpenStack IceHouse Guide

Guide to deploy OpenStack IceHouse on top of Ubuntu 14.04.

It covers: Ubuntu (hostnames, LVM), Open vSwitch, MySQL, Keystone, Glance, Neutron with ML2, Nova, Cinder and Dashboard.

IPv6-Ready! (Under Development)

This is a "step-by-step", a "cut-and-paste" guide.