This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |