summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-27 20:46:49 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-27 20:46:49 -0300
commit05fc9055717f0ceeb37a0d022792678416ad8966 (patch)
treee2600ce73c87e2e23f2fc4aeb182df1856bd3c4a
parent7ae3852c15873cdbc4740f75c48565e5fcc2df70 (diff)
downloadhydra-05fc9055717f0ceeb37a0d022792678416ad8966.tar.gz
hydra-05fc9055717f0ceeb37a0d022792678416ad8966.tar.bz2
Adding puppet-reset-master and renaming puppet-reset
-rwxr-xr-xshare/hydractl/puppet-reset-agent (renamed from share/hydractl/puppet-reset)0
-rwxr-xr-xshare/hydractl/puppet-reset-master23
2 files changed, 23 insertions, 0 deletions
diff --git a/share/hydractl/puppet-reset b/share/hydractl/puppet-reset-agent
index d009c02..d009c02 100755
--- a/share/hydractl/puppet-reset
+++ b/share/hydractl/puppet-reset-agent
diff --git a/share/hydractl/puppet-reset-master b/share/hydractl/puppet-reset-master
new file mode 100755
index 0000000..ee1c888
--- /dev/null
+++ b/share/hydractl/puppet-reset-master
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Reset puppet master and start over again.
+#
+
+# Stop services
+/etc/init.d/puppet stop
+/etc/init.d/puppetmaster stop
+/etc/init.d/nginx stop
+
+# Reset configuration
+hydractl puppet-reset-stored
+rm -rf /var/lib/puppetmaster/ssl
+
+# Get fresh config
+rm -rf /etc/puppet/ && git clone /var/git/repositories/puppet.git/ /etc/puppet
+( cd /etc/puppet/ && git submodule update --init )
+chown -R puppet.puppet /etc/puppet/
+
+# Start services
+/etc/init.d/puppetmaster start
+sleep 10
+/etc/init.d/nginx start