diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-12-28 20:06:37 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-12-28 20:06:37 -0200 |
commit | 78139f05356e09352356926a351c77f40470bae5 (patch) | |
tree | 508746fef3afdfae4c3a6b958810877c2bb45c44 /share | |
parent | d584f6d086c02ee796c8ba9f1a7afc30422b3601 (diff) | |
download | hydra-78139f05356e09352356926a351c77f40470bae5.tar.gz hydra-78139f05356e09352356926a351c77f40470bae5.tar.bz2 |
Deploy: misc fixes
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/deploy | 19 | ||||
-rwxr-xr-x | share/hydractl/provision | 2 |
2 files changed, 10 insertions, 11 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy index 21eafd5..91437ec 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -41,15 +41,16 @@ echo '' for node in $NODES; do if [ -d "$node" ]; then echo "Deploying to $node folder..." - echo "" # Setup deploy environment + FOLDER=$node hydra_deploy_setup folder $FOLDER # Check if puppet is installed if [ ! -e "$FOLDER/usr/bin/puppet" ]; then echo "Installing dependencies..." - $DEPLOY_COMMAND apt-get install $DEPLOY_DEPENDENCIES -y + $DEPLOY_COMMAND aptitude update + $DEPLOY_COMMAND aptitude install $DEPLOY_DEPENDENCIES -y fi # Create folders @@ -61,29 +62,28 @@ for node in $NODES; do # Copy hiera configuration hydra_deploy_copy_secrets folder - echo "" # Run puppet, overriding FQDN echo "Applying configuration..." - FACTER_domain=$DOMAIN FACTER_hostname=$HOSTNAME FACTER_fqdn=$HOSTNAME.$DOMAIN $DEPLOY_APPLY + echo HOSTNAME=$FQDN FACTER_domain=$DOMAIN FACTER_hostname=$FQDN FACTER_fqdn=$HOSTNAME.$DOMAIN $DEPLOY_APPLY + exit elif [ "$node" == "localhost" ] || [ "$node" == "`facter fqdn`" ] || [ "$node" == "`facter hostname`" ]; then echo "Deploying to localhost..." - echo "" # Setup deploy environment hydra_deploy_setup # Check if puppet is installed - for dep in $DEPLOY_DEPENDENCIES; do - hydra_install_package $dep - done + if [ ! -e "/usr/bin/puppet" ]; then + $SUDO aptitude update + $SUDO aptitude install $DEPLOY_DEPENDENCIES -y + fi # Run puppet echo "Applying configuration..." $DEPLOY_APPLY else echo "Deploying to $node..." - echo "" # Setup deploy environment hydra_deploy_setup remote $node @@ -108,7 +108,6 @@ EOF # Copy hiera configuration hydra_deploy_copy_secrets remote - echo "" # Run puppet echo "Applying configuration..." diff --git a/share/hydractl/provision b/share/hydractl/provision index 087b703..94f69e0 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -94,7 +94,7 @@ function hydra_provision_config { hydra_user_config interactive y "Interactive mode? (y/n)" hydra_user_config device /dev/sdb "Destination device" - hydra_user_config root_size 20G "Size of root partition" + hydra_user_config root_size 20G "Size of root partition (-1 for all free space)" hydra_user_config swap_size 2000 "Swap size (in MB, 0 to not create it)" hydra_user_config home_size 20G "Size of home partition (0 to not create it, -1 for all free space)" hydra_user_config var_size 20G "Size of var partition (0 to not create it, -1 for all free space)" |