diff options
-rw-r--r-- | src/audio.json | 2 | ||||
-rwxr-xr-x | src/flufigut-client.sh | 2 | ||||
-rwxr-xr-x | src/flufigut.py | 10 | ||||
-rwxr-xr-x | src/manage.sh | 4 | ||||
-rw-r--r-- | src/test.json | 2 | ||||
-rw-r--r-- | src/test2.json | 2 | ||||
-rwxr-xr-x | src/update.sh | 4 | ||||
-rw-r--r-- | templates/flumotion/default/aac-encode.xml (renamed from templates/example/aac-encode.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/audio-resample.xml (renamed from templates/example/audio-resample.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/decklink.xml (renamed from templates/example/decklink.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/flv-mux.xml (renamed from templates/example/flv-mux.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/h264-encode.xml (renamed from templates/example/h264-encode.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/http-stream.xml (renamed from templates/example/http-stream.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/ogg-mux.xml (renamed from templates/example/ogg-mux.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/planet.xml (renamed from templates/example/planet.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/porter.xml (renamed from templates/example/porter.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/repeater.xml (renamed from templates/example/repeater.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/soundcard.xml (renamed from templates/example/soundcard.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/video-resize.xml (renamed from templates/example/video-resize.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/vorbis-encode.xml (renamed from templates/example/vorbis-encode.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/vp8-encode.xml (renamed from templates/example/vp8-encode.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/webm-mux.xml (renamed from templates/example/webm-mux.xml) | 0 | ||||
-rw-r--r-- | templates/flumotion/default/worker.xml (renamed from templates/example/worker.xml) | 0 |
23 files changed, 12 insertions, 14 deletions
diff --git a/src/audio.json b/src/audio.json index 435a5d9..cdaa734 100644 --- a/src/audio.json +++ b/src/audio.json @@ -1,6 +1,6 @@ { "globals":{ - "templates": "example", + "templates": "default", "version": "0.10.0", "name": "audio-only", "description": "Audio only test", diff --git a/src/flufigut-client.sh b/src/flufigut-client.sh index 7cb0c54..aabb8dd 100755 --- a/src/flufigut-client.sh +++ b/src/flufigut-client.sh @@ -90,7 +90,7 @@ param=`echo $SSH_ORIGINAL_COMMAND | awk '{ print $2 }'` case "$command" in install) echo -n "install files from '$param' ... " - sudo -u flumotion tar -C "$CONF_DIR" --strip-components=2 -xzf "$param" + sudo -u flumotion tar -C "$CONF_DIR" --strip-components 1 -xzf "$param" rm "$param" echo "done." ;; diff --git a/src/flufigut.py b/src/flufigut.py index d2ef659..0eabdf8 100755 --- a/src/flufigut.py +++ b/src/flufigut.py @@ -368,15 +368,15 @@ if error != 0: # import shutil -shutil.rmtree('output', ignore_errors=True) +shutil.rmtree('output/%s' % output_format, ignore_errors=True) -env = Environment(loader=FileSystemLoader('../templates/%s/' % (globals['templates'])), line_statement_prefix = '%%') +env = Environment(loader=FileSystemLoader('../templates/%s/%s/' % (output_format,globals['templates'])), line_statement_prefix = '%%') print "generating planet '%s/%s'" % (globals['manager']['machine'], globals['name']) template = env.get_template('planet.xml') planet = template.render(globals=globals, atmosphere=atmosphere, flow=flow) -dir = 'output/%s/managers/%s/' % (globals['manager']['machine'], globals['name']) +dir = 'output/%s/%s/managers/%s/' % (output_format, globals['manager']['machine'], globals['name']) if not os.path.exists(dir): os.makedirs(dir) f = open('%s/planet.xml' % (dir), 'w') @@ -384,7 +384,7 @@ f.write(planet.encode("utf8")) f.write('\n') f.close() -passwd = open('output/%s/%s.passwd' % (globals['manager']['machine'], globals['name']), 'w') +passwd = open('output/%s/%s/%s.passwd' % (output_format, globals['manager']['machine'], globals['name']), 'w') port = 9000 for w in worker: @@ -400,7 +400,7 @@ for w in worker: ports = "%i-%i" % (port, port+1) port+=2 workerconf = template.render(globals=globals, name=w, password=password, portrange=ports) - dir = 'output/%s/workers' % machine + dir = 'output/%s/%s/workers' % (output_format, machine) if not os.path.exists(dir): os.makedirs(dir) f = open('%s/%s-%s.xml' % (dir, globals['name'], w), 'w') diff --git a/src/manage.sh b/src/manage.sh index 23ea39e..1cd3a03 100755 --- a/src/manage.sh +++ b/src/manage.sh @@ -37,7 +37,7 @@ # $ sudo ./flufigut-client.sh install # -OUTPUT_DIR="output" +OUTPUT_DIR="output/flumotion" SSH_KEY="id_rsa" SSH_CONFIG="ssh.config" SSH_USER="flufigut" @@ -47,7 +47,7 @@ deploy_all() { if [ -d "$machine" ]; then machine=`basename $machine` echo "copying files to $machine ... " - tar -czf "$OUTPUT_DIR/$machine.tar.gz" "$OUTPUT_DIR/$machine"/* + tar -C "$OUTPUT_DIR" -czf "$OUTPUT_DIR/$machine.tar.gz" "$machine" scp -i "$SSH_KEY" -F "$SSH_CONFIG" "$OUTPUT_DIR/$machine.tar.gz" $SSH_USER@"$machine":/tmp ssh -i "$SSH_KEY" -F "$SSH_CONFIG" $SSH_USER@"$machine" install "/tmp/$machine.tar.gz" fi diff --git a/src/test.json b/src/test.json index 56188fa..b921481 100644 --- a/src/test.json +++ b/src/test.json @@ -1,6 +1,6 @@ { "globals":{ - "templates": "example", + "templates": "default", "version": "0.10.0", "name": "elevate-live", "description": "Live from Elevate Festival 2012", diff --git a/src/test2.json b/src/test2.json index 7b66060..1479563 100644 --- a/src/test2.json +++ b/src/test2.json @@ -1,6 +1,6 @@ { "globals":{ - "templates": "example", + "templates": "default", "version": "0.10.0", "name": "elevate-live", "description": "Live from Elevate Festival 2012", diff --git a/src/update.sh b/src/update.sh index b28347a..18ab61a 100755 --- a/src/update.sh +++ b/src/update.sh @@ -33,11 +33,9 @@ if [ -z "$1" ]; then exit 1 fi -TEMPLATES="example" - ./manage.sh stop ./manage.sh clean -./flufigut.py "$TEMPLATES" $1 +./flufigut.py flumotion $1 ./manage.sh deploy ./manage.sh start diff --git a/templates/example/aac-encode.xml b/templates/flumotion/default/aac-encode.xml index e6ad65a..e6ad65a 100644 --- a/templates/example/aac-encode.xml +++ b/templates/flumotion/default/aac-encode.xml diff --git a/templates/example/audio-resample.xml b/templates/flumotion/default/audio-resample.xml index 7182b01..7182b01 100644 --- a/templates/example/audio-resample.xml +++ b/templates/flumotion/default/audio-resample.xml diff --git a/templates/example/decklink.xml b/templates/flumotion/default/decklink.xml index 5eb6a2a..5eb6a2a 100644 --- a/templates/example/decklink.xml +++ b/templates/flumotion/default/decklink.xml diff --git a/templates/example/flv-mux.xml b/templates/flumotion/default/flv-mux.xml index a3706da..a3706da 100644 --- a/templates/example/flv-mux.xml +++ b/templates/flumotion/default/flv-mux.xml diff --git a/templates/example/h264-encode.xml b/templates/flumotion/default/h264-encode.xml index ba8b136..ba8b136 100644 --- a/templates/example/h264-encode.xml +++ b/templates/flumotion/default/h264-encode.xml diff --git a/templates/example/http-stream.xml b/templates/flumotion/default/http-stream.xml index 561097a..561097a 100644 --- a/templates/example/http-stream.xml +++ b/templates/flumotion/default/http-stream.xml diff --git a/templates/example/ogg-mux.xml b/templates/flumotion/default/ogg-mux.xml index 36d7ef5..36d7ef5 100644 --- a/templates/example/ogg-mux.xml +++ b/templates/flumotion/default/ogg-mux.xml diff --git a/templates/example/planet.xml b/templates/flumotion/default/planet.xml index c1633ee..c1633ee 100644 --- a/templates/example/planet.xml +++ b/templates/flumotion/default/planet.xml diff --git a/templates/example/porter.xml b/templates/flumotion/default/porter.xml index cf960bf..cf960bf 100644 --- a/templates/example/porter.xml +++ b/templates/flumotion/default/porter.xml diff --git a/templates/example/repeater.xml b/templates/flumotion/default/repeater.xml index aa469ec..aa469ec 100644 --- a/templates/example/repeater.xml +++ b/templates/flumotion/default/repeater.xml diff --git a/templates/example/soundcard.xml b/templates/flumotion/default/soundcard.xml index 23df8a4..23df8a4 100644 --- a/templates/example/soundcard.xml +++ b/templates/flumotion/default/soundcard.xml diff --git a/templates/example/video-resize.xml b/templates/flumotion/default/video-resize.xml index 3444bc1..3444bc1 100644 --- a/templates/example/video-resize.xml +++ b/templates/flumotion/default/video-resize.xml diff --git a/templates/example/vorbis-encode.xml b/templates/flumotion/default/vorbis-encode.xml index 83471fd..83471fd 100644 --- a/templates/example/vorbis-encode.xml +++ b/templates/flumotion/default/vorbis-encode.xml diff --git a/templates/example/vp8-encode.xml b/templates/flumotion/default/vp8-encode.xml index 97b9e8d..97b9e8d 100644 --- a/templates/example/vp8-encode.xml +++ b/templates/flumotion/default/vp8-encode.xml diff --git a/templates/example/webm-mux.xml b/templates/flumotion/default/webm-mux.xml index acace74..acace74 100644 --- a/templates/example/webm-mux.xml +++ b/templates/flumotion/default/webm-mux.xml diff --git a/templates/example/worker.xml b/templates/flumotion/default/worker.xml index b6f4667..b6f4667 100644 --- a/templates/example/worker.xml +++ b/templates/flumotion/default/worker.xml |