Skip to content

Instantly share code, notes, and snippets.

View sirkazey's full-sized avatar

Alexandre sirkazey

View GitHub Profile
@sirkazey
sirkazey / gist:f838e778eec7a4f967bd
Last active August 29, 2015 14:17 — forked from smoser/gist:4756561
Adaptation for Ubuntu 14.04
## Install a necessary packages
sudo apt-get install kvm cloud-utils genisoimage
## URL to most recent cloud image of 14.04
img_url="http://cloud-images.ubuntu.com/server/releases/14.04/release"
img_url="${img_url}/ubuntu-14.04-server-cloudimg-amd64-disk1.img"
## download the image
wget $img_url -O disk.img.dist
## Create a file with some user-data in it
@smoser
smoser / gist:4756561
Last active November 8, 2023 15:20
boot a cloud image in kvm
## Install a necessary packages
$ sudo apt-get install kvm cloud-utils genisoimage
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
$ img_url="${img_url}/ubuntu-12.04-server-cloudimg-amd64-disk1.img"
## download the image
$ wget $img_url -O disk.img.dist
## Create a file with some user-data in it
@smoser
smoser / README.txt
Created August 17, 2012 21:01
boot cloud images with libvirt
$ disk_dist_imgz=/archive/mirrors/uec/releases/precise/release-20120728/ubuntu-12.04-server-cloudimg-amd64-disk1.img
$ disk_dist_img=disk.img.dist
$ disk=disk.img
$ qemu-img convert "${disk_dist_imgz}" "${disk_dist_img}"
$ qemu-img create -f qcow2 -b "${disk_dist_img}" "$disk"
$ cat my-user-data
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
@terrancesnyder
terrancesnyder / setenv.sh
Created May 23, 2011 00:07
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft