Why not? I thought it'd be interesting, and maybe useful.
- No centralized chef-server
- Nodes still know about eachother (so chef-searchs work)
- Use consul-templates / services for things that need to be updated 'realtime'
- Use chef resources for installation and configuration of the rest
- Chef with local-mode
- consul setup
- fileconsul (0.1.0, not 0.1.1)
wget http://dl.bintray.com/foostan/fileconsul/0.1.0_linux_amd64.zip
- 0.1.1 wont work as it cleans all entries on push (so nodes dont append, they just get deleted)
- See foostan/fileconsul#1
folders="roles clients databags environemnts users"
chefRepo="/home/vagrant/chef-repo"
function consulFilePublish() {
for folder in $folders; do
echo "Pushing $folder to consul..."
fileconsul push --prefix "$folder" --basepath $chefRepo/$folder
done
}
# Modify some files/cookbooks
consulFile push
# Setup a consul cluster https://www.consul.io/intro/getting-started/install.html
./chefconsul.sh