diff options
author | James Shubin <james@shubin.ca> | 2014-07-08 23:39:49 -0400 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2014-07-08 23:39:49 -0400 |
commit | cd182e0ef68c9ee0f5701b436050de7538ab6ff1 (patch) | |
tree | 2dd5b5d3f714af10bc523cb5fc18b6c766579dcf /vagrant/puppet/modules | |
parent | a3ea04540c0462064b8ec8a91a5d7c53df9b49c4 (diff) | |
download | puppet-gluster-cd182e0ef68c9ee0f5701b436050de7538ab6ff1.tar.gz puppet-gluster-cd182e0ef68c9ee0f5701b436050de7538ab6ff1.tar.xz puppet-gluster-cd182e0ef68c9ee0f5701b436050de7538ab6ff1.zip |
Remove unnecessary nesting in vagrant directory.
This isn't needed anymore because of:
https://github.com/pradels/vagrant-libvirt/commit/0ac7498f4d73d4100462ac34b5cd89c308622fc5
Let me know if I broke anything or if this still works perfectly!
Diffstat (limited to 'vagrant/puppet/modules')
-rw-r--r-- | vagrant/puppet/modules/.gitignore | 1 | ||||
-rw-r--r-- | vagrant/puppet/modules/Makefile | 67 | ||||
-rw-r--r-- | vagrant/puppet/modules/README | 22 | ||||
m--------- | vagrant/puppet/modules/apt | 0 | ||||
m--------- | vagrant/puppet/modules/common | 0 | ||||
m--------- | vagrant/puppet/modules/keepalived | 0 | ||||
m--------- | vagrant/puppet/modules/module-data | 0 | ||||
m--------- | vagrant/puppet/modules/puppet | 0 | ||||
m--------- | vagrant/puppet/modules/shorewall | 0 | ||||
m--------- | vagrant/puppet/modules/stdlib | 0 | ||||
m--------- | vagrant/puppet/modules/yum | 0 |
11 files changed, 90 insertions, 0 deletions
diff --git a/vagrant/puppet/modules/.gitignore b/vagrant/puppet/modules/.gitignore new file mode 100644 index 0000000..8a495bf --- /dev/null +++ b/vagrant/puppet/modules/.gitignore @@ -0,0 +1 @@ +gluster/ diff --git a/vagrant/puppet/modules/Makefile b/vagrant/puppet/modules/Makefile new file mode 100644 index 0000000..c650773 --- /dev/null +++ b/vagrant/puppet/modules/Makefile @@ -0,0 +1,67 @@ +# Makefile for pulling in git modules for Vagrant deployment for Puppet-Gluster +# Copyright (C) 2010-2013+ James Shubin +# Written by James Shubin <james@shubin.ca> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# NOTE: if we remove a module, it won't get purged from the destination! + +# NOTE: this script can sync puppet-gluster to a specific sha1sum commit, or it +# can sync all of the repos to git master. This option can be useful for devel. + +BASE = 'https://github.com/purpleidea' +MODULES := \ + puppet-common \ + puppet-gluster \ + puppet-keepalived \ + puppet-module-data \ + puppet-puppet \ + puppet-shorewall \ + puppet-yum \ + puppetlabs-apt \ + puppetlabs-stdlib +# NOTE: set to a git commit id if we need an specific commit for vagrant builds +# NOTE: remember that new commits to master should change this to a specific id +# if they will break the vagrant build process. hopefully we don't forget this! +#SHA1SUM := master +SHA1SUM := $(shell git rev-parse --verify HEAD) # goto whatever the main tree is at + +.PHONY: all modules gluster +.SILENT: all modules gluster + +all: + +# +# modules +# +# clone, and then pull +modules: + basename `pwd` | grep -q '^modules' || exit 1 # run in a modules dir! + for i in $(MODULES); do \ + j=`echo $$i | awk -F '-' '{print $$2}'`; \ + [ -d "$$j" ] || git clone --depth 1 $(BASE)/$$i.git $$j; \ + [ -d "$$j" ] && cd $$j && git pull; cd ..; \ + done + +# +# gluster +# +# just clone and pull this one +gluster: + basename `pwd` | grep -q '^modules' || exit 1 # run in a modules dir! + i='puppet-gluster'; \ + j=`echo $$i | awk -F '-' '{print $$2}'`; \ + [ -d "$$j" ] || git clone ../../../. $$j; \ + [ -d "$$j" ] && cd $$j && git checkout master && git pull && git checkout $(SHA1SUM); cd .. + diff --git a/vagrant/puppet/modules/README b/vagrant/puppet/modules/README new file mode 100644 index 0000000..c1837a5 --- /dev/null +++ b/vagrant/puppet/modules/README @@ -0,0 +1,22 @@ +This directory contains the puppet (git) module dependencies for Puppet-Gluster. They are included as git submodules for convenience and version compatibility. The Puppet-Gluster module itself is cloned in by a Makefile on provisioning. + +The one problem is Puppet-Gluster itself, since it is the parent repository to this sub-directory. There were a few options: + +1) Maintain the vagrant/ directory as a separate git project. +This would make a lot of sense, but I wanted to keep the vagrant portions bundled with Puppet-Gluster since they are so closely connected and for ease of distribution. In this situation, the vagrant/puppet/modules/ directory would include the Puppet-Gluster submodule along with all the other puppet (git) modules. + +2) Fill the vagrant/puppet/modules/ directory with git submodules. +This would make a lot of sense because you can reference specific commits, and it's easy to recursively clone all of the necessary code for a vagrant run. The problem is that recursively referencing the Puppet-Gluster might be a little awkward for some hackers to understand. One inconvenience, is that to update the modules/ directory, you'd have to first push your code changes to the server, get the sha1 commit hash, and then in a secondary commit change the submodules pointer. This would apparently cause a cascase of extra cloning each new commit. + +3) Fill the vagrant/puppet/modules/ directory with git submodules & 1 symlink. +This option seems to be the best solution. As in #2, we use git submodules. For the tricky Puppet-Gluster recursion scenario, we symlink the correct parent directory so that the relevant puppet code is present for the puppet::deploy. This only works if the provisioner follows the symlinks. For vagrant-libvirt, rsync needs the --copy-dirlinks option added. + +4) Maintain a Makefile and sync in Puppet-Gluster as needed. +This is what I've adopted for now. It works, and is mostly straightforward. If you can find a better solution, please let me know! + +Hope this gives you some helpful background, and thanks to #git for consulting. + +Happy hacking, + +James + diff --git a/vagrant/puppet/modules/apt b/vagrant/puppet/modules/apt new file mode 160000 +Subproject 5b54eda3668a42b12e21696e500b40a27005bf2 diff --git a/vagrant/puppet/modules/common b/vagrant/puppet/modules/common new file mode 160000 +Subproject 2c0ed2844c606fd806bde0c02e47e79c88fab4a diff --git a/vagrant/puppet/modules/keepalived b/vagrant/puppet/modules/keepalived new file mode 160000 +Subproject f0585c45e7c5d5c2d86d0a84690a75dc522b2cd diff --git a/vagrant/puppet/modules/module-data b/vagrant/puppet/modules/module-data new file mode 160000 +Subproject 4b3ad1cc239d7831616e69796184e400de0f5fe diff --git a/vagrant/puppet/modules/puppet b/vagrant/puppet/modules/puppet new file mode 160000 +Subproject f139d0b7cfe6d55c0848d0d338e19fe640a961f diff --git a/vagrant/puppet/modules/shorewall b/vagrant/puppet/modules/shorewall new file mode 160000 +Subproject fbc7c6576092ceaf81b837989e086cb7fcc071d diff --git a/vagrant/puppet/modules/stdlib b/vagrant/puppet/modules/stdlib new file mode 160000 +Subproject 44c181ec0e230768b8dce10de57f9b32638e66e diff --git a/vagrant/puppet/modules/yum b/vagrant/puppet/modules/yum new file mode 160000 +Subproject d098f6de9a38055b3482325d371722835b57697 |