Created
November 16, 2012 23:39
-
-
Save spikegrobstein/4091940 to your computer and use it in GitHub Desktop.
Chef compaction script run via cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash - | |
curl -H "Content-Type: application/json" localhost:5984/chef | |
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_compact | |
sleep 3 | |
for VIEW in nodes roles registrations clients data_bags data_bags_items users checksums cookbooks sandboxes environments id_map; do | |
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_compact/$VIEW | |
done | |
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_view_cleanup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment