=======================================
The Hydra Suite is a complete set of tools for orchestration and management
-of computers.
+of network of computers.
This suite is made of three commands:
# Check preferences
function hydra_check_preferences {
- if [ ! -z "$PUPPET" ] && [ ! -d "$PUPPET" ]; then
- echo "Puppet folder not found: $PUPPET."
- exit 1
- fi
-
- if [ -z "$PUPPET_KEYS" ]; then
- PUPPET_KEYS="$PUPPET/modules/site_keys/files"
+ # Check for parameters that should not be set in preferences anymore
+ if [ ! -z "$PUPPET" ]; then
+ echo "Using deprecated config PUPPET, please update $PREFERENCES."
fi
if [ ! -z "$REMOTE_REPOS" ]; then
echo "Using deprecated config PRIVATE_REPOS, please update $PREFERENCES."
fi
+ # Set basic variables
+ PUPPET="$HYDRA_FOLDER/puppet"
+ PUPPET_KEYS="$PUPPET/modules/site_keys/files"
+
export HYDRA_CONNECT="ssh -T -o ConnectTimeout=15"
}
hydra_config_load
# Sync each repository.
-# TODO: change from PRIVATE_REPOS to the new config scheme
function hydra_sync {
for repository in $*; do
if [ "$repository" == "keyringer" ]; then
fi
if [ ! -d "$HYDRA_FOLDER/$repository" ]; then
- git clone $PRIVATE_REPOS/$repository $HYDRA_FOLDER/$repository
+ if [ -e "$HYDRA_FOLDER/config/repository/url" ]; then
+ url="`cat $HYDRA_FOLDER/config/repository/url`"
+ else
+ if [ ! -e "$HYDRA_FOLDER/config/domain" ]; then
+ fi
+ url="gitolite@admin.`cat $HYDRA_FOLDER/config/domain`:$repository"
+ fi
+
+ git clone $url $HYDRA_FOLDER/$repository
fi
if [ -d "$HYDRA_FOLDER/$repository/.git" ]; then