commit 83e843511348060fc7a7aef19dd79c7bb6e48613 Author: root Date: Mon Nov 19 20:56:22 2012 +0100 first commit diff --git a/precise/base-0k/hooks/install b/precise/base-0k/hooks/install new file mode 100755 index 0000000..f98524a --- /dev/null +++ b/precise/base-0k/hooks/install @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux # -x for verbose logging to juju debug-log + + +apt-get -y install syslog-ng bash-completion wget bzip2 git-core less language-pack-en python-software-properties tmux sudo + + +juju-log "Finished Successfully installed base !" + diff --git a/precise/base-0k/hooks/start b/precise/base-0k/hooks/start new file mode 100755 index 0000000..9eb7853 --- /dev/null +++ b/precise/base-0k/hooks/start @@ -0,0 +1,3 @@ +#!/bin/bash + +juju-log "Nothing to Start for base." diff --git a/precise/base-0k/hooks/stop b/precise/base-0k/hooks/stop new file mode 100755 index 0000000..170162b --- /dev/null +++ b/precise/base-0k/hooks/stop @@ -0,0 +1,3 @@ +#!/bin/bash + +juju-log "Nothing to stop for base." diff --git a/precise/base-0k/metadata.yaml b/precise/base-0k/metadata.yaml new file mode 100644 index 0000000..a7b72f4 --- /dev/null +++ b/precise/base-0k/metadata.yaml @@ -0,0 +1,5 @@ +name: base-0k +summary: "Base 0k" +maintainer: "Valentin Lab " +description: | + Installs the base common 0k system. diff --git a/precise/base-0k/revision b/precise/base-0k/revision new file mode 100644 index 0000000..573541a --- /dev/null +++ b/precise/base-0k/revision @@ -0,0 +1 @@ +0 diff --git a/precise/minecraft/etc/init/minecraft.conf b/precise/minecraft/etc/init/minecraft.conf new file mode 100644 index 0000000..9768512 --- /dev/null +++ b/precise/minecraft/etc/init/minecraft.conf @@ -0,0 +1,13 @@ +# Minecraft upstart +# this script will start/stop Minecraft +description "Minecraft Server" +version "1.0" +author "Marco Ceppi" + +env CPU_COUNT=8 +env JAVA_ARGS="-Xmx1024M -Xms1024M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts" +env LOG="/var/log/minecraft_server.log" + +chdir /opt/apps/minecraft +exec java $JAVA_ARGS -XX:ParallelGCThreads=$CPU_COUNT -jar minecraft_server.jar nogui >> $LOG 2>&1 + diff --git a/precise/minecraft/hooks/TODO b/precise/minecraft/hooks/TODO new file mode 100644 index 0000000..60658ab --- /dev/null +++ b/precise/minecraft/hooks/TODO @@ -0,0 +1,7 @@ + +- minecraft upstart: + + NB_CPU should be an option + +- upgrade charm +- options diff --git a/precise/minecraft/hooks/install b/precise/minecraft/hooks/install new file mode 100755 index 0000000..766a3cf --- /dev/null +++ b/precise/minecraft/hooks/install @@ -0,0 +1,17 @@ +#!/bin/bash + +set -eux # -x for verbose logging to juju debug-log + +## Using headless to avoid installing X server ;) +apt-get -y install openjdk-7-jre-headless + + +INSTALL_DIR=/opt/apps/minecraft + +mkdir -p $INSTALL_DIR +wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar -O $INSTALL8DIR/minecraft_server.jar + + +cp etc/init/minecraft /etc/init/minecraft + + diff --git a/precise/minecraft/hooks/start b/precise/minecraft/hooks/start new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/precise/minecraft/hooks/start @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/precise/minecraft/hooks/stop b/precise/minecraft/hooks/stop new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/precise/minecraft/hooks/stop @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/precise/minecraft/metadata.yaml b/precise/minecraft/metadata.yaml new file mode 100644 index 0000000..3d120d1 --- /dev/null +++ b/precise/minecraft/metadata.yaml @@ -0,0 +1,7 @@ +name: minecraft +summary: "Minecraft" +maintainer: "Valentin Lab " +inherit: base +data-dir: +description: | + Installs minecraft. diff --git a/precise/minecraft/revision b/precise/minecraft/revision new file mode 100644 index 0000000..573541a --- /dev/null +++ b/precise/minecraft/revision @@ -0,0 +1 @@ +0