Skip to content

Instantly share code, notes, and snippets.

View tbatchelli's full-sized avatar

Antoni Batchelli tbatchelli

View GitHub Profile
(use 'visaje.core)
(use 'vmfest.manager)
(def my-server (server "http://localhost:18083"))
(install-os my-server
{:name "debian-test"
:disk-location "/tmp/debian-test.vdi"
:disk-size (* 8 1024)
:os-iso-location
"/Volumes/DATA/ISOS/debian-6.0.2.1-amd64-netinst.iso"
@tbatchelli
tbatchelli / gist:4080635
Created November 15, 2012 19:25
proxy config for pallet-vmfest
{:provider "vmfest"
:environment{
:phases {:bootstrap
(fn [session]
(let [p (ns-resolve
'pallet.action.package 'package-manager)]
(->
session
(p :configure :proxy "http://10.0.2.2:3128"))))}
:proxy "http://10.0.2.2:3128"}}
@tbatchelli
tbatchelli / gist:4080617
Created November 15, 2012 19:22
squid config for vmfest
#
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
@tbatchelli
tbatchelli / logback.xml
Created July 24, 2012 22:59
logback.xml for better-logs branches of pallet and stevedore.
<configuration scan="true" scanPeriod="5 seconds" debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- deny all events with a level below INFO, that is TRACE and
DEBUG -->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern>
</encoder>
Cmd echo "package-manager update ..."
{ aptitude update || true; } || { echo "package-manager update " failed; exit 1; } >&2
echo "...done"
echo "Packages..."
{ { debconf-set-selections <<EOF
debconf debconf/frontend select noninteractive
debconf debconf/frontend seen false
EOF
} && aptitude install -q -y sudo+ && aptitude search "?and(?installed, ?name(^sudo$))" | grep "sudo"; } || { echo "Packages" failed; exit 1; } >&2
echo "...done"
@tbatchelli
tbatchelli / logback.xml
Created June 12, 2012 21:00
sample logback config for vmfest
<configuration scan="true" scanPeriod="1 seconds" debug="false">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level - %msg%n</pattern>
</encoder>
</appender>
@tbatchelli
tbatchelli / gist:2917315
Created June 12, 2012 12:49
example node-list config
{:node-list
[["g1-node-1" "group-1" "10.0.0.1" :debian :os-version "6.0.1"]
["g1-node-2" "group-1" "10.0.0.2" :debian :os-version "6.0.1"]
["g2-node-1" "group-2" "192.168.0.1" :centos :os-version "5.3"]
["g2-node-2" "group-2" "192.168.0.2" :centos :os-version "5.3"]
["g2-node-3" "group-2" "192.168.0.3" :centos :os-version "5.3"]] ...}
@tbatchelli
tbatchelli / gist:2784314
Created May 24, 2012 21:23
basic setup of aws
(defpallet
:services
{:aws {:provider "aws-ec2"
:identity "<id>"
:credential "<cred>"}})
@tbatchelli
tbatchelli / gist:2474428
Created April 23, 2012 23:07
Installation of a new OS on Virtualbox
(use '[vmfest.manager :only [server]])
(def my-server (server "http://localhost:18083"))
(use '[visaje.core :only [install-os]])
(install-os my-server
{:name "debian-test-2"
:disk-location "/tmp/debian-test-2.vdi"
:disk-size (* 4 1024)
:os-iso-location
"/Users/tbatchelli/Desktop/ISOS/debian-6.0.2.1-amd64-netinst.iso"
(defpallet
:services {
:virtualbox{
:provider "node-list"
:node-list [["your-node1" "your-group" xx.xx.xx.xx :ubuntu]]}})