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
(cluster-spec :private | |
{:jobtracker (node-group [:jobtracker :namenode]) | |
:slaves (slave-group 2)} | |
:base-machine-spec {:os-family :ubuntu | |
:os-version-matches "10.10" | |
:os-64-bit true | |
:min-ram (* 4 1024)} | |
:base-props {:hdfs-site {:dfs.data.dir "/mnt/dfs/data" | |
:dfs.name.dir "/mnt/dfs/name"} | |
:mapred-site {:mapred.task.timeout 300000 |
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
(defproject basic "0.4.0" | |
:description "Basic Pallet Usage" | |
:dependencies [[org.cloudhoist/pallet "0.6.2"] | |
[org.cloudhoist/pallet-crates-standalone "0.5.0"] | |
[org.jclouds/jclouds-allcompute "1.1.1"] | |
[log4j/log4j "1.2.14"]] | |
:dev-dependencies [[swank-clojure/swank-clojure "1.2.1"] ; swank | |
[vmfest "0.2.2"] ; virtualbox | |
[org.cloudhoist/pallet-lein "0.4.1"] ; lein | |
[cake-pallet "0.4.0"]] ; cake |
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
# | |
# 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 |
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
(defn get-group-settings [session group] | |
(let [nodes (session/nodes-in-group session group)] | |
(zipmap (map #(compute/primary-ip %) nodes) | |
(map (fn [node] | |
(parameter/get-node-settings session node group nil)) | |
nodes)))) | |
(defn get-all-settings [session] | |
(let [groups (map :group-name (:groups session))] | |
(zipmap |
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
(def machine-config | |
{:cpu-count 2 | |
:memory-size 555 | |
:network [{:attachment-type :bridged | |
:host-interface "en1: Airport 2"} | |
nil | |
{:attachment-type :bridged | |
:host-interface "nothing"}] | |
:storage [{:name "IDE Controller" | |
:bus :ide |
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
(def machine-config | |
{:cpu-count 2 | |
:memory-size 555 | |
:network [{:attachment-type :bridged | |
:host-interface "en1: Airport 2"} | |
nil | |
{:attachment-type :bridged | |
:host-interface "nothing"}] | |
:storage [{:name "IDE Controller" | |
:bus :ide |
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
<configuration scan="true" scanPeriod="1 seconds" debug="true"> | |
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
<ImmediateFlush>true</ImmediateFlush> | |
<!-- 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 - %msg%n</pattern> | |
</encoder> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | |
<param name="Target" value="System.out"/> | |
<param name="Threshold" value="ERROR" /> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="%d %p %c{1}:%L - %m%n"/> | |
</layout> |
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
:virtualbox | |
{:provider "virtualbox" | |
:environment | |
{:image | |
{:bridged-network "Airport 2" ;; The name of the network interface to use for bridging | |
}} |
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
(use 'pallet.crate.automated-admin-user) | |
(def my-group | |
(pallet.core/group-spec "my-group" | |
:phases {:bootstrap (phase-fn (automated-admin-user))})) | |
(pallet.core/converge | |
{my-group 1} | |
:compute (pallet.configure/compute-service :gogrid)) |