- init: version control in the superproject?
- deploy:
- lockfile.
- - keys, certs and secrets.
+ - keys and certs.
- fix /etc/puppet permissions.
- check hostname and required node configuration.
- log applied version and date (in the node and also in the repo?).
$DEPLOY_COMMAND chmod -R 640 /etc/puppet
}
+# Copy keys
+function hydra_deploy_copy_keys {
+ local location="$1"
+
+ if [ -z "$location" ]; then
+ location="remote"
+ fi
+
+ $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/keys
+
+ if [ -e "$HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/private_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/private_key.pkcs7.pem
+ fi
+
+ if [ -e "$HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem" ]; then
+ hydra_deploy_copy $location $HYDRA_FOLDER/puppet/keys/public_key.pkcs7.pem $DEPLOY_DEST/etc/puppet/keys/public_key.pkcs7.pem
+ fi
+}
+
# Copy config secrets
function hydra_deploy_copy_secrets {
local location="$1"
echo "Syncing configuration..."
$DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS
+ # Copy keys
+ hydra_deploy_copy_keys folder
+
# Copy config configuration
hydra_deploy_copy_secrets folder
echo "Syncing configuration..."
$DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS
+ # Copy keys
+ hydra_deploy_copy_keys remote
+
# Copy configuration
hydra_deploy_copy_secrets remote