Skip to content

Instantly share code, notes, and snippets.

View idvoretskyi's full-sized avatar
💭
🇺🇦

Ihor Dvoretskyi idvoretskyi

💭
🇺🇦
View GitHub Profile
@idvoretskyi
idvoretskyi / virt-install-ubuntu
Last active November 16, 2017 00:54
Create Virtual Machine - Ubuntu KVM
virt-install \
--name template \
--ram 4096 \
--disk path=/var/lib/libvirt/ubuntu1604.img,size=30 \
--vcpus 2 \
--os-type linux \
--os-variant ubuntu16.04 \
--network bridge=virbr0 \
--graphics none \
--console pty,target_type=serial \
# Tips&trics for ChromeOS shell
echo 'cd $HOME' >> ~/.bashrc
# enable Ubuntu crouton stuff
echo "alias ubuntu='sudo enter-chroot -n ubuntu'" >> ~/.bashrc
echo "alias debian='sudo enter-chroot -n debian'" >> ~/.bashrc
echo "alias gnome='sudo startgnome -X xorg -b -n debian'" >> ~/.bashrc
echo "alias xubuntu='sudo startxfce4 -X xorg -b -n ubuntu'" >> ~/.bashrc
echo "alias unity='sudo startunity -X xorg -b -n ubuntu'" >> ~/.bashrc
echo "alias xfce4='sudo startxfce4 -X xorg -b -n ubuntu'" >> ~/.bashrc
#!/bin/sh -e
trap '' 2
# Stop shill and restart it with a nicer attitude towards tun0
sudo stop shill
sudo start shill BLACKLISTED_DEVICES=tun0
# Sleep 10 seconds to allow chromebook to reconnect to the network
sudo sleep 10
sudo openvpn --mktun --dev tun0
sudo sleep 3
# Add google DNS on top of current ones, since openvpn command does not do it
#/bin/bash
# Environmental variables for installing the Docker-based multi-node environment
# Master node IP address; for the local environment put "127.0.0.1"
export MASTER_IP="127.0.0.1"
# Desired Kubernetes version
# to set a variable to the latest released version (inc. alpha & beta), uncomment the following line:
# export K8S_VERSION=$(curl -sS https://storage.googleapis.com/kubernetes-release/release/stable.txt)
@idvoretskyi
idvoretskyi / local.conf.murano.txt
Last active February 17, 2016 21:02
local.conf.murano
[[local|localrc]]
# Minimal config
ADMIN_PASSWORD=admin
DEST=/opt/stack
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
MYSQL_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50
@idvoretskyi
idvoretskyi / interfaces
Last active February 2, 2016 16:34
Bridge setup for KVM/libvirt
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1
iface em1 inet dhcp
@idvoretskyi
idvoretskyi / 0_reuse_code.js
Created December 31, 2015 09:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@idvoretskyi
idvoretskyi / DevStack deployment on Ubuntu with Murano
Last active April 1, 2017 06:08
DevStack deployment on Ubuntu with Murano
# Deploy an Ubuntu 14.04 host;
# Setup host:
# Set up NAT forwarding:
sudo iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
# Install git package
apt-get install git
# Clone and prepare the DevStack repo
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack && git checkout stable/kilo
# Install Murano:
@idvoretskyi
idvoretskyi / local.conf
Created July 9, 2015 16:51
devstack local.conf
[[local|localrc]]
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=admin
MYSQL_PASSWORD=admin
RABBIT_PASSWORD=admin
SERVICE_PASSWORD=admin
SERVICE_TOKEN=admin
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)