summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-02-16 10:16:15 +0100
committervarac <varacanero@zeromail.org>2017-02-16 10:16:15 +0100
commite248cd6e8da9765720a02c4db4696d94c9450420 (patch)
treeeb606abda64cfa03d5a9aaa21c263914a50f6779
parent4d08d0586b02f92d8818665d37d0243e11177ff4 (diff)
Make mrconfig stuff more generic, update README
-rw-r--r--.mrconfig243
-rw-r--r--README16
-rwxr-xr-xgenerate-mrconfig.sh7
3 files changed, 12 insertions, 254 deletions
diff --git a/.mrconfig b/.mrconfig
deleted file mode 100644
index b3f0492..0000000
--- a/.mrconfig
+++ /dev/null
@@ -1,243 +0,0 @@
-[DEFAULT]
-
-lib =
- git_assure_remote() {
- remote="$1"
- url="$2"
- git remote | grep -q "^$remote$" || {
- echo I: Adding remote $remote
- git remote add "$remote" "$url"
- git fetch "$remote"
- }
- git remote -v | grep "^$remote" | grep -q "$url" || {
- echo I: Changing remote URL for $remote
- git remote set-url $remote $url
- git fetch "$remote"
- }
- }
-
-# general repos
-
-[gitolite-admin]
-checkout = git clone ssh://gitolite@code.leap.se/gitolite-admin gitolite-admin
-
-[cloudadmin]
-checkout = git clone ssh://gitolite@code.leap.se/leap_cloudadmin cloudadmin
-
-[bitmask]
-checkout = git clone ssh://gitolite@code.leap.se/bitmask bitmask
-
-[vagrant]
-checkout = git clone ssh://gitolite@code.leap.se/leap_vagrant vagrant
-
-
-# admin repos
-
-[gitolite-admin_orca]
-checkout = git clone ssh://gitolite@admin.leap.se/gitolite-admin gitolite-admin_orca
-
-[pwstore]
-checkout = git clone ssh://gitolite@admin.leap.se/pwstore pwstore
-
-
-# dev repos
-
-[ca]
-checkout = git clone ssh://gitolite@code.leap.se/leap_ca ca
-
-[client]
-checkout = git clone ssh://gitolite@code.leap.se/leap_client client
-
-[web]
-checkout = git clone ssh://gitolite@code.leap.se/leap_web web
-
-
-# platform
-
-[platform]
-checkout = git clone ssh://gitolite@code.leap.se/platform platform
-
-[errors]
-checkout = git clone ssh://gitlote@code.leap.se/leap_platform_errors errors
-
-[cli]
-checkout = git clone ssh://gitolite@code.leap.se/leap_cli cli
-
-
-# Debian/Ubuntu packages
-
-[python_srp]
-checkout = git clone ssh://gitolite@code.leap.se/python_srp python_srp
-
-[python_sh]
-checkout = git clone ssh://gitolite@code.leap.se/python_sh python_sh
-
-[platform]
-checkout = git clone ssh://gitolite@code.leap.se/python_gnutls python_gnutls
-
-[platform]
-checkout = git clone ssh://gitolite@code.leap.se/python_requests python_requests
-
-[platform]
-checkout = git clone ssh://gitolite@code.leap.se/python_ping python_ping
-
-
-# puppet
-
-[puppet]
-checkout = git clone ssh://gitolite@admin.leap.se/puppet puppet
-
-
-# site puppet modules
-
-[modules/site_apache]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_apache site_apache &&
- cd site_apache &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_apt]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_apt site_apt &&
- cd site_apt &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_config]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_config site_config &&
- cd site_config &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_git]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_git site_git &&
- cd site_git &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_gitolite]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_gitolite site_gitolite &&
- cd site_gitolite &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_nagios]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_nagios site_nagios &&
- cd site_nagios &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_puppet]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_puppet site_puppet &&
- cd site_puppet &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/site_sudo]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_site_sudo site_sudo &&
- cd site_sudo &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-
-# regular puppet modules
-
-[modules/augeas]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_augeas augeas &&
- cd augeas &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-update =
- git_assure_remote camptocamp https://github.com/camptocamp/puppet-augeas.git
- git remote update
-
-[modules/apache]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_apache apache &&
- cd apache &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/apt]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_apt apt &&
- cd apt &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/backupninja]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_backupninja backupninja &&
- cd backupninja &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/apache]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_apache apache &&
- cd apache &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/bundler]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_bundler bundler &&
- cd bundler &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/concat]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_concat concat &&
- cd concat &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/couchdb]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_couchdb couchdb &&
- cd couchdb &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/gpg]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_gpg gpg &&
- cd gpg &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/git]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_git git &&
- cd git &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/munin]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_munin munin &&
- cd munin &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/nagios]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_nagios nagios &&
- cd nagios &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/passenger]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_passenger passenger &&
- cd passenger &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/puppet]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_puppet puppet &&
- cd puppet &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/reprepro]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_reprepro reprepro &&
- cd reprepro &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/rubygems]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_rubygems rubygems &&
- cd rubygems &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/ruby]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_ruby ruby &&
- cd ruby &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/shorewall]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_shorewall shorewall &&
- cd shorewall &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/stdlib]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_stdlib stdlib &&
- cd stdlib &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/unbound]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_unbound unbound &&
- cd unbound &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
-[modules/x509]
-checkout = git clone ssh://gitolite@code.leap.se/puppet_x509 x509 &&
- cd x509 &&
- git config alias.xpush "push && ${bindir}/superproject-post-push.sh"
-
diff --git a/README b/README
index e993950..0c7e9ab 100644
--- a/README
+++ b/README
@@ -1,11 +1,15 @@
+# LEAP scripts repo
-This repository contains some useful scripts and bits for sysdevs.
+This repository contains some useful scripts and bits for sysdevs and general
+purpose tools.
+
+## mrconfig
.mrconfig - to use this config the best thing to do is to put this in your
~/.mrconfig:
[leap/scripts]
- checkout = git clone ssh://gitolite@code.leap.se:scripts scripts &&
+ checkout = git clone REPOURL scripts &&
ln -s ${HOME}/leap/scripts/.mrconfig ${HOME}/leap/.mrconfig
that way this scripts repository will be checked out and the .mrconfig file will
@@ -17,10 +21,4 @@ Then when in $HOME/leap, you can run 'mr checkout' and 'mr update' to checkout
all the repositories, and to get them updated.
NOTE: all of this is assuming a certain directory structure, so have a look at
-that before you go ahead. It is recommended to make a fresh directory to do the
-'mr checkout' in
-
-. superproject-post-push.sh - put this in your $HOME/bin and make it executable,
-this will allow you to do 'git xpush' when in the root of a submodule and it
-will push that change to the submodule, and then automatically update the
-superproject to that latest commit. \ No newline at end of file
+that before you go ahead.
diff --git a/generate-mrconfig.sh b/generate-mrconfig.sh
index 0d6e799..d56d3a9 100755
--- a/generate-mrconfig.sh
+++ b/generate-mrconfig.sh
@@ -3,8 +3,11 @@
# adopted from https://github.com/svend/home-bin/blob/master/gen-mrconfig-priv
-# Exapmple:
-# ./gen-mrconfig.sh gitolite@admin.leap.se
+# Usage
+# ./gen-mrconfig.sh GIT_REPO_URL
+#
+# Example
+# ./gen-mrconfig.sh gitolite@some.ho.st
SSH=$1