]> gitweb.fluxo.info Git - hydra.git/commitdiff
Rename 'hiera' to 'config'
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 22 Mar 2016 16:48:42 +0000 (13:48 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 22 Mar 2016 16:48:42 +0000 (13:48 -0300)
lib/hydra/deploy
share/hydra/deploy
share/hydra/newnode
share/hydra/nodes
share/hydra/whereis

index 771c42eac5ded301608ca904bf0df84c2b1bf853..f7a8f02aee26e1977f9e641504e5d820763784f1 100644 (file)
@@ -5,7 +5,7 @@ function hydra_deploy_setup {
   # Common parameters
   # Exclude eventual keys and version control files
   DEPLOY_DEPENDENCIES="puppet-common ruby-sqlite3 ruby-activerecord ruby-activerecord-deprecated-finders augeas-tools"
-  DEPLOY_RSYNC="rsync -CrltDvpq --no-owner --exclude=/ssl --exclude=keys --exclude=site_keys --exclude=hiera/secrets --delete --rsync-path"
+  DEPLOY_RSYNC="rsync -CrltDvpq --no-owner --exclude=/ssl --exclude=keys --exclude=site_keys --exclude=config/secrets --delete --rsync-path"
   RSYNC_PATH="rsync -q"
 
   if [ "$1" == "remote" ]; then
@@ -61,8 +61,8 @@ function hydra_deploy_setup {
 
   # Common parameters
   DOMAIN="`echo $FQDN | cut -d . -f 2-`"
-  ROLE="`hydra_yaml_param nodo::role $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`"
-  LOCATION="`hydra_yaml_param nodo::location $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`"
+  ROLE="`hydra_yaml_param nodo::role $HYDRA_FOLDER/puppet/config/node/$FQDN.yaml`"
+  LOCATION="`hydra_yaml_param nodo::location $HYDRA_FOLDER/puppet/config/node/$FQDN.yaml`"
 
   # Puppet command
   if [ -e "$HYDRA_FOLDER/puppet/bin/deploy" ]; then
@@ -109,7 +109,7 @@ function hydra_deploy_mkdirs {
   $DEPLOY_COMMAND chmod -R 640   /etc/puppet
 }
 
-# Copy hiera secrets
+# Copy config secrets
 function hydra_deploy_copy_secrets {
   local location="$1"
 
@@ -117,22 +117,22 @@ function hydra_deploy_copy_secrets {
     location="remote"
   fi
 
-  $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/hiera/secrets/{domain,location,node,role}
+  $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/config/secrets/{domain,location,node,role}
 
-  if [ ! -z "$DOMAIN" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/domain/$DOMAIN.yaml" ]; then
-    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/domain/$DOMAIN.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/domain/
+  if [ ! -z "$DOMAIN" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/domain/$DOMAIN.yaml" ]; then
+    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/domain/$DOMAIN.yaml $DEPLOY_DEST/etc/puppet/config/secrets/domain/
   fi
 
-  if [ ! -z "$LOCATION" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/location/$LOCATION.yaml" ]; then
-    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/location/$LOCATION.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/location/
+  if [ ! -z "$LOCATION" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/location/$LOCATION.yaml" ]; then
+    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/location/$LOCATION.yaml $DEPLOY_DEST/etc/puppet/config/secrets/location/
   fi
 
-  if [ ! -z "$ROLE" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/role/$ROLE.yaml" ]; then
-    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/role/$ROLE.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/role/
+  if [ ! -z "$ROLE" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/role/$ROLE.yaml" ]; then
+    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/role/$ROLE.yaml $DEPLOY_DEST/etc/puppet/config/secrets/role/
   fi
 
-  if [ ! -z "$FQDN" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/node/$FQDN.yaml" ]; then
-    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/node/$FQDN.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/node/
+  if [ ! -z "$FQDN" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/node/$FQDN.yaml" ]; then
+    hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/node/$FQDN.yaml $DEPLOY_DEST/etc/puppet/config/secrets/node/
   fi
 }
 
index efbaebaeb2c7277aa19332a1867d11fd038b2eb0..19150a83a37af32cb1139e6cae205c89effb387d 100755 (executable)
@@ -65,7 +65,7 @@ for node in $NODES; do
     echo "Syncing configuration..."
     $DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS
 
-    # Copy hiera configuration
+    # Copy config configuration
     hydra_deploy_copy_secrets folder
 
     # Run puppet, overriding FQDN
@@ -110,7 +110,7 @@ EOF
     echo "Syncing configuration..."
     $DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS
 
-    # Copy hiera configuration
+    # Copy configuration
     hydra_deploy_copy_secrets remote
 
     # Run puppet
index 76d4a5408994da262d390629168142082250977f..57c5885df1ba0b77e2c0d42f748acbd02bad7b61 100755 (executable)
@@ -38,7 +38,7 @@ if [ -z "$NODE" ]; then
 elif [ ! -e "$HYDRA_FOLDER/config/domain" ]; then
   echo "fatal: please configure your domain at $HYDRA_FOLDER/config/domain"
   exit 1
-elif [ -e "$HYDRA_FOLDER/puppet/hiera/node/$NODE.yaml" ]; then
+elif [ -e "$HYDRA_FOLDER/puppet/config/node/$NODE.yaml" ]; then
   echo "fatal: node $NODE already defined"
   exit 1
 fi
@@ -63,12 +63,12 @@ fi
 #fi
 
 # Copy YAML template
-mkdir -p $HYDRA_FOLDER/puppet/hiera/node
-cp $YAML $HYDRA_FOLDER/puppet/hiera/node/$NODE.yaml
+mkdir -p $HYDRA_FOLDER/puppet/config/node
+cp $YAML $HYDRA_FOLDER/puppet/config/node/$NODE.yaml
 
 # Setup secret YAML template
-mkdir -p $HYDRA_FOLDER/puppet/hiera/secrets/node
-echo "---" > $HYDRA_FOLDER/puppet/hiera/secrets/node/$NODE.yaml
+mkdir -p $HYDRA_FOLDER/puppet/config/secrets/node
+echo "---" > $HYDRA_FOLDER/puppet/config/secrets/node/$NODE.yaml
 
 # Copy node template
 #mkdir -p $HYDRA_FOLDER/puppet/manifests/nodes
@@ -80,7 +80,7 @@ echo "---" > $HYDRA_FOLDER/puppet/hiera/secrets/node/$NODE.yaml
 # Add to git
 (
   cd $HYDRA_FOLDER/puppet
-  git add manifests/nodes/$NODE.pp hiera/node/$NODE.yaml hiera/secrets/node/$NODE.yaml
+  git add manifests/nodes/$NODE.pp config/node/$NODE.yaml config/secrets/node/$NODE.yaml
 
   #if [ -e 'manifests/site.pp' ]; then
   #  git add manifests/site.pp
index e2a318d67c6b89ef3d683208ebc697f347786848..a80e6c15a16c1cf693e53a8d4ee31b888b1af632 100755 (executable)
@@ -18,8 +18,8 @@
 
 # Get a list of puppet node files
 function hydra_node_files {
-  if [ -d "$PUPPET/hiera/node/" ]; then
-    FILES="$PUPPET/hiera/node/*"
+  if [ -d "$PUPPET/config/node/" ]; then
+    FILES="$PUPPET/config/node/*"
   fi
 }
 
@@ -49,7 +49,7 @@ hydra_node_files
 # Get nodes
 if [ ! -z "$CLASS" ]; then
   hydra_nodes | while read node; do
-    find $PUPPET/hiera -name "$node.yaml"
+    find $PUPPET/config -name "$node.yaml"
   done | while read candidate; do
     if grep -e "$CLASS" $candidate | grep -qe "^nodo::role"; then
       basename $candidate .yaml
index 515218bf23234d79eb29b540347caaa247619735..8c0983951125e0a0b0bb165ca7ee4beaf95d4081 100755 (executable)
@@ -38,12 +38,12 @@ echo "--------------------------------------------------------------------------
 echo ""
 
 # Is it a node?
-if [ -e "$PUPPET/hiera/node/$LAYER.$DOMAIN.yaml" ]; then
-  echo "Defined as a node at hiera/node/$LAYER.$DOMAIN.yaml"
+if [ -e "$PUPPET/config/node/$LAYER.$DOMAIN.yaml" ]; then
+  echo "Defined as a node at config/node/$LAYER.$DOMAIN.yaml"
   echo "Configuration:"
   echo ""
-  grep "nodo::role:"     $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml
-  grep "nodo::location:" $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml
+  grep "nodo::role:"     $PUPPET/config/node/$LAYER.$DOMAIN.yaml
+  grep "nodo::location:" $PUPPET/config/node/$LAYER.$DOMAIN.yaml
 fi
 
 # DNS config