diff options
author | James Shubin <james@shubin.ca> | 2014-04-04 20:24:44 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2014-04-04 21:21:10 -0400 |
commit | e6f0bc559802abae16e06c79062f1910538fbedd (patch) | |
tree | 3a76c2120b9022680515d3b6c23d106531876d9d | |
parent | 241956937f9778c332335267fac1256792c71155 (diff) | |
download | puppet-gluster-e6f0bc559802abae16e06c79062f1910538fbedd.tar.gz puppet-gluster-e6f0bc559802abae16e06c79062f1910538fbedd.tar.xz puppet-gluster-e6f0bc559802abae16e06c79062f1910538fbedd.zip |
Store different os versions in different output directories.
(I guess this means I'm now a vagrant os image maintainer.)
NOTE: you can create your own personal scripts in builder/versions/ !
(See the template.sh file there for more information.)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | builder/Makefile | 10 | ||||
-rwxr-xr-x | builder/versions/template.sh | 13 | ||||
-rw-r--r-- | vagrant/gluster/Vagrantfile | 2 |
4 files changed, 20 insertions, 6 deletions
@@ -5,3 +5,4 @@ docs/ hacking/ rpmbuild/ screencasts/ +builder/versions/*.sh diff --git a/builder/Makefile b/builder/Makefile index 11d8286..8c4ab0f 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -29,9 +29,9 @@ BOX = $(VERSION).box SIZE = 40 #OUTPUT = /tmp/gluster #OUTPUT := $(shell pwd) -OUTPUT := $(shell echo ~/tmp/builder/gluster) -SERVER = 'download.gluster.org' -REMOTE_PATH = 'purpleidea/vagrant' +OUTPUT := $(shell echo ~/tmp/builder/$(VERSION)) +SERVER = 'user@host.example.org' +REMOTE_PATH = 'public_html/vagrant' all: box @@ -134,9 +134,9 @@ $(OUTPUT)/SHA256SUMS.asc: $(OUTPUT)/SHA256SUMS # upload to public server # NOTE: user downloads while file uploads are in progress don't cause problems! upload: $(OUTPUT)/$(BOX) $(OUTPUT)/SHA256SUMS $(OUTPUT)/SHA256SUMS.asc - if [ "`cat $(OUTPUT)/SHA256SUMS`" != "`ssh $(SERVER) 'cd $(REMOTE_PATH)/ && sha256sum $(BOX)'`" ]; then \ + if [ "`cat $(OUTPUT)/SHA256SUMS`" != "`ssh $(SERVER) 'cd $(REMOTE_PATH)/$(VERSION)/ && sha256sum $(BOX)'`" ]; then \ echo Running upload...; \ - scp -p $(OUTPUT)/{$(BOX),SHA256SUMS{,.asc}} $(SERVER):$(REMOTE_PATH)/; \ + scp -p $(OUTPUT)/{$(BOX),SHA256SUMS{,.asc}} $(SERVER):$(REMOTE_PATH)/$(VERSION)/; \ fi # this method works too, but always hits the server on every make call #upload: diff --git a/builder/versions/template.sh b/builder/versions/template.sh new file mode 100755 index 0000000..f78b02c --- /dev/null +++ b/builder/versions/template.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# to use this script, from its parent dir, run: ./versions/<script>.sh <target> +# you'll want to edit the below bash variables to match your use cases :) +# eg: ./versions/centos-6.sh upload +# to make your own base image and upload it to your own server somewhere. + +VERSION='centos-6' # pick from the output of virt-builder -l +SERVER='user@host.example.org' # connect over ssh (add your public key first) +REMOTE_PATH='public_html/vagrant' # make a $VERSION directory in this dir + +make VERSION=$VERSION SERVER=$SERVER REMOTE_PATH=$REMOTE_PATH $@ + diff --git a/vagrant/gluster/Vagrantfile b/vagrant/gluster/Vagrantfile index a3162b9..050618e 100644 --- a/vagrant/gluster/Vagrantfile +++ b/vagrant/gluster/Vagrantfile @@ -235,7 +235,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # box source url # TODO: this box should be GPG signed - config.vm.box_url = 'https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-6.box' + config.vm.box_url = 'https://download.gluster.org/pub/gluster/purpleidea/vagrant/centos-6/centos-6.box' # # cache |