diff options
-rw-r--r-- | README | 33 | ||||
-rw-r--r-- | TODO.md | 11 | ||||
-rw-r--r-- | lib/hydra/config | 8 | ||||
-rwxr-xr-x | share/hydra/init | 10 |
4 files changed, 52 insertions, 10 deletions
@@ -10,13 +10,30 @@ This suite is made of three commands: - hydra: issues commands on multiple hosts. - hydras: issues commands to multiple sets of hosts. -TODO ----- +Installation +------------ -Hydra: +First, clone the code: - - Init: create config and doc repositories. - - Init: generate puppet repository using "hydractl bootstrap repository" - - Sync: split between public and private repositories. - - Sync: Git clone URL recommendation which support for both git-annex and non-standard port. - - Uniform syntax for specifying nodes (either by hostname or fqdn) on deploy and import-key. + git clone git://git.sarava.org/hydra.git + cd hydra && git tag -v + +Then add hydra folder to your `$PATH` or run the following command to install +if under `/usr/local`: + + ./hydractl provision + +Managing an existing network +---------------------------- + +If you have enough credentials, you can fetch all the needed repositories and configurations +using simply the following command: + + hydra example init ~/file/example ssh://gitolite@admin.example.org/config.git + +Creating a new network +---------------------- + +To create the needed repositories to start a new network, use a similar command: + + hydra example init ~/file/example @@ -0,0 +1,11 @@ +TODO +==== + +Hydra +----- + + - Init: create config and doc repositories. + - Init: generate puppet repository using "hydractl bootstrap repository" + - Sync: split between public and private repositories. + - Sync: Git clone URL recommendation which support for both git-annex and non-standard port. + - Uniform syntax for specifying nodes (either by hostname or fqdn) on deploy and import-key. diff --git a/lib/hydra/config b/lib/hydra/config index e2fa85e..37442ac 100644 --- a/lib/hydra/config +++ b/lib/hydra/config @@ -44,6 +44,14 @@ function hydra_check_preferences { PUPPET_KEYS="$PUPPET/modules/site_keys/files" fi + if [ ! -z "$REMOTE_REPOS" ]; then + echo "Using deprecated config REMOTE_REPOS, please update $PREFERENCES." + fi + + if [ ! -z "$PRIVATE_REPOS" ]; then + echo "Using deprecated config PRIVATE_REPOS, please update $PREFERENCES." + fi + export HYDRA_CONNECT="ssh -T -o ConnectTimeout=15" } diff --git a/share/hydra/init b/share/hydra/init index dbc2414..9b817d0 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -31,8 +31,14 @@ if [ -z "$BASEDIR" ]; then elif grep -q -e "^$HYDRA=" $CONFIG &> /dev/null; then echo "Hydra $HYDRA already defined" exit 1 +elif [ -d "$BASEDIR" ]; then + echo "Folder $BASEDIR already exists, hydra $HYDRA already defined?" + exit 1 fi +# Create base +mkdir -p $BASEDIR + # Reparse basedir to force absolute folder BASEDIR="`cd $BASEDIR && pwd`" @@ -44,8 +50,8 @@ echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG # Optional remote configuration if [ ! -z "$REMOTE" ]; then - echo "Using $REMOTE as private gitolite address." - echo "PRIVATE_REPOS=$REMOTE" >> $PREFERENCES + # Clone configuration repository + git clone $REMOTE $BASEDIR/config else # No remote was given, so we assume this is a shiny new hydra! if [ ! -d "$BASEDIR/config" ]; then |